summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-03-07 01:30:40 +0000
committerNadav Rotem <nrotem@apple.com>2013-03-07 01:30:40 +0000
commit883304333dad1ff00114700b5a6fde73751fa3cd (patch)
tree55968c2ca9b8b8aadc7732467a7b8079ff09b4da /llvm/lib/IR/Constants.cpp
parentb41977f85254c4f8512200e5006fa56d55316d52 (diff)
downloadbcm5719-llvm-883304333dad1ff00114700b5a6fde73751fa3cd.tar.gz
bcm5719-llvm-883304333dad1ff00114700b5a6fde73751fa3cd.zip
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
llvm-svn: 176602
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 8093a09749f..dafca987fe7 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -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);
}
OpenPOWER on IntegriCloud