Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.

llvm-svn: 176602
This commit is contained in:
Nadav Rotem 2013-03-07 01:30:40 +00:00
parent b41977f852
commit 883304333d
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}