[RISCV][GISel] Pass APInt by const reference. NFC

This commit is contained in:
Craig Topper 2024-10-17 11:55:31 -07:00
parent ab75180501
commit a9d39ce5d2
2 changed files with 2 additions and 2 deletions

View File

@ -670,7 +670,7 @@ bool RISCVLegalizerInfo::legalizeVAStart(MachineInstr &MI,
return true;
}
bool RISCVLegalizerInfo::shouldBeInConstantPool(APInt APImm,
bool RISCVLegalizerInfo::shouldBeInConstantPool(const APInt &APImm,
bool ShouldOptForSize) const {
assert(APImm.getBitWidth() == 32 || APImm.getBitWidth() == 64);
int64_t Imm = APImm.getSExtValue();

View File

@ -38,7 +38,7 @@ public:
MachineInstr &MI) const override;
private:
bool shouldBeInConstantPool(APInt APImm, bool ShouldOptForSize) const;
bool shouldBeInConstantPool(const APInt &APImm, bool ShouldOptForSize) const;
bool legalizeShlAshrLshr(MachineInstr &MI, MachineIRBuilder &MIRBuilder,
GISelChangeObserver &Observer) const;