diff options
author | David Green <david.green@arm.com> | 2024-03-06 17:40:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 17:40:13 +0000 |
commit | 44be5a7fdc20a7f90d63dc18699a470e900bd3ba (patch) | |
tree | f99af6c6d0a725e730d0dc5708e2fe4348f4ed60 /llvm/lib/CodeGen/TargetInstrInfo.cpp | |
parent | 5dc5bfbb70f96cc001dc1173cbecfadab2e48fbf (diff) | |
download | llvm-44be5a7fdc20a7f90d63dc18699a470e900bd3ba.zip llvm-44be5a7fdc20a7f90d63dc18699a470e900bd3ba.tar.gz llvm-44be5a7fdc20a7f90d63dc18699a470e900bd3ba.tar.bz2 |
[Codegen] Make Width in getMemOperandsWithOffsetWidth a LocationSize. (#83875)
This is another part of #70452 which makes getMemOperandsWithOffsetWidth
use a LocationSize for Width, as opposed to the unsigned it currently
uses. The advantages on it's own are not super high if
getMemOperandsWithOffsetWidth usually uses known sizes, but if the
values can come from an MMO it can help be more accurate in case they
are Unknown (and in the future, scalable).
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index 4783742..5b02c1b 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -1365,7 +1365,7 @@ bool TargetInstrInfo::getMemOperandWithOffset( const MachineInstr &MI, const MachineOperand *&BaseOp, int64_t &Offset, bool &OffsetIsScalable, const TargetRegisterInfo *TRI) const { SmallVector<const MachineOperand *, 4> BaseOps; - unsigned Width; + LocationSize Width = 0; if (!getMemOperandsWithOffsetWidth(MI, BaseOps, Offset, OffsetIsScalable, Width, TRI) || BaseOps.size() != 1) |