Skip to content

Commit a9d39ce

Browse files
committed
[RISCV][GISel] Pass APInt by const reference. NFC
1 parent ab75180 commit a9d39ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ bool RISCVLegalizerInfo::legalizeVAStart(MachineInstr &MI,
670670
return true;
671671
}
672672

673-
bool RISCVLegalizerInfo::shouldBeInConstantPool(APInt APImm,
673+
bool RISCVLegalizerInfo::shouldBeInConstantPool(const APInt &APImm,
674674
bool ShouldOptForSize) const {
675675
assert(APImm.getBitWidth() == 32 || APImm.getBitWidth() == 64);
676676
int64_t Imm = APImm.getSExtValue();

llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class RISCVLegalizerInfo : public LegalizerInfo {
3838
MachineInstr &MI) const override;
3939

4040
private:
41-
bool shouldBeInConstantPool(APInt APImm, bool ShouldOptForSize) const;
41+
bool shouldBeInConstantPool(const APInt &APImm, bool ShouldOptForSize) const;
4242
bool legalizeShlAshrLshr(MachineInstr &MI, MachineIRBuilder &MIRBuilder,
4343
GISelChangeObserver &Observer) const;
4444

0 commit comments

Comments
 (0)