projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
119003f
)
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
author
Nadav Rotem
<nrotem@apple.com>
Thu, 7 Mar 2013 01:30:40 +0000
(
01:30
+0000)
committer
Nadav Rotem
<nrotem@apple.com>
Thu, 7 Mar 2013 01:30:40 +0000
(
01:30
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176602
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/Constants.cpp
b/lib/IR/Constants.cpp
index 8093a09749fb1d702461cd1de72601a02f52fa0f..dafca987fe7fac97992ab89e23139c499df6d786 100644
(file)
--- a/
lib/IR/Constants.cpp
+++ b/
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);
}