mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
Required some APInt massaging to get proper empty/tombstone values. Apart from making the code a bit simpler this also reduces the bucket size of the ConstantInt map from 32 to 24 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,6 +91,8 @@ class APInt {
|
||||
APINT_WORD_SIZE = static_cast<unsigned int>(sizeof(uint64_t))
|
||||
};
|
||||
|
||||
friend struct DenseMapAPIntKeyInfo;
|
||||
|
||||
/// \brief Fast internal constructor
|
||||
///
|
||||
/// This constructor is used only internally for speed of construction of
|
||||
@@ -277,7 +279,6 @@ public:
|
||||
/// Simply makes *this a copy of that.
|
||||
/// @brief Copy Constructor.
|
||||
APInt(const APInt &that) : BitWidth(that.BitWidth), VAL(0) {
|
||||
assert(BitWidth && "bitwidth too small");
|
||||
if (isSingleWord())
|
||||
VAL = that.VAL;
|
||||
else
|
||||
|
Reference in New Issue
Block a user