[llvm] [Statepoint] Optimize Location structure size (PR #78600)
Danila Malyutin via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 07:37:23 PST 2024
================
@@ -238,7 +238,23 @@ StackMaps::parseOperand(MachineInstr::const_mop_iterator MOI,
++MOI;
assert(MOI->isImm() && "Expected constant operand.");
int64_t Imm = MOI->getImm();
- Locs.emplace_back(Location::Constant, sizeof(int64_t), 0, Imm);
+ if (isInt<32>(Imm)) {
+ Locs.emplace_back(Location::Constant, sizeof(int64_t), 0, Imm);
----------------
danilaml wrote:
Not sure about sizeof(int64_t). I think the size field is not really used for constants, since they are always 4 bytes, so I just kept it as 8 to reduce tests diff.
https://github.com/llvm/llvm-project/pull/78600
More information about the llvm-commits
mailing list