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:
9f24ad7
)
Encode small integers more densely in foldingset, avoiding overflowing the SmallVecto...
author
Chris Lattner
<sabre@nondot.org>
Sun, 4 Feb 2007 01:48:10 +0000
(
01:48
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 4 Feb 2007 01:48:10 +0000
(
01:48
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33864
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/FoldingSet.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/FoldingSet.cpp
b/lib/Support/FoldingSet.cpp
index 1b0e81e466f806995d889445f2381090c7b21258..ecb700dfd6108fec1ea218efbc919f9aad894f59 100644
(file)
--- a/
lib/Support/FoldingSet.cpp
+++ b/
lib/Support/FoldingSet.cpp
@@
-44,7
+44,10
@@
void FoldingSetImpl::NodeID::AddInteger(unsigned I) {
}
void FoldingSetImpl::NodeID::AddInteger(uint64_t I) {
Bits.push_back(unsigned(I));
- Bits.push_back(unsigned(I >> 32));
+
+ // If the integer is small, encode it just as 32-bits.
+ if ((uint64_t)(int)I != I)
+ Bits.push_back(unsigned(I >> 32));
}
void FoldingSetImpl::NodeID::AddFloat(float F) {
Bits.push_back(FloatToBits(F));