mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9f24ad79ce
commit
e4116f8553
@ -44,6 +44,9 @@ void FoldingSetImpl::NodeID::AddInteger(unsigned I) {
|
|||||||
}
|
}
|
||||||
void FoldingSetImpl::NodeID::AddInteger(uint64_t I) {
|
void FoldingSetImpl::NodeID::AddInteger(uint64_t I) {
|
||||||
Bits.push_back(unsigned(I));
|
Bits.push_back(unsigned(I));
|
||||||
|
|
||||||
|
// If the integer is small, encode it just as 32-bits.
|
||||||
|
if ((uint64_t)(int)I != I)
|
||||||
Bits.push_back(unsigned(I >> 32));
|
Bits.push_back(unsigned(I >> 32));
|
||||||
}
|
}
|
||||||
void FoldingSetImpl::NodeID::AddFloat(float F) {
|
void FoldingSetImpl::NodeID::AddFloat(float F) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user