mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176602 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
119003f2a2
commit
82e905aae4
@ -1416,9 +1416,9 @@ static inline Constant *getFoldedCast(
|
|||||||
|
|
||||||
LLVMContextImpl *pImpl = Ty->getContext().pImpl;
|
LLVMContextImpl *pImpl = Ty->getContext().pImpl;
|
||||||
|
|
||||||
// Look up the constant in the table first to ensure uniqueness
|
// Look up the constant in the table first to ensure uniqueness.
|
||||||
std::vector<Constant*> argVec(1, C);
|
ArrayRef<Constant*> Ops(&C, 1);
|
||||||
ExprMapKeyType Key(opc, argVec);
|
ExprMapKeyType Key(opc, Ops);
|
||||||
|
|
||||||
return pImpl->ExprConstants.getOrCreate(Ty, Key);
|
return pImpl->ExprConstants.getOrCreate(Ty, Key);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user