mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Simplify & microoptimize code. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
811ad8690b
commit
8d4dd79526
@ -64,10 +64,8 @@ void FoldingSetNodeID::AddPointer(const void *Ptr) {
|
|||||||
// depend on the host. It doesn't matter however, because hashing on
|
// depend on the host. It doesn't matter however, because hashing on
|
||||||
// pointer values in inherently unstable. Nothing should depend on the
|
// pointer values in inherently unstable. Nothing should depend on the
|
||||||
// ordering of nodes in the folding set.
|
// ordering of nodes in the folding set.
|
||||||
intptr_t PtrI = (intptr_t)Ptr;
|
Bits.append(reinterpret_cast<unsigned *>(&Ptr),
|
||||||
Bits.push_back(unsigned(PtrI));
|
reinterpret_cast<unsigned *>(&Ptr+1));
|
||||||
if (sizeof(intptr_t) > sizeof(unsigned))
|
|
||||||
Bits.push_back(unsigned(uint64_t(PtrI) >> 32));
|
|
||||||
}
|
}
|
||||||
void FoldingSetNodeID::AddInteger(signed I) {
|
void FoldingSetNodeID::AddInteger(signed I) {
|
||||||
Bits.push_back(I);
|
Bits.push_back(I);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user