mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +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;
|
||||
|
||||
// Look up the constant in the table first to ensure uniqueness
|
||||
std::vector<Constant*> argVec(1, C);
|
||||
ExprMapKeyType Key(opc, argVec);
|
||||
// Look up the constant in the table first to ensure uniqueness.
|
||||
ArrayRef<Constant*> Ops(&C, 1);
|
||||
ExprMapKeyType Key(opc, Ops);
|
||||
|
||||
return pImpl->ExprConstants.getOrCreate(Ty, Key);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user