File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
include/llvm/CodeGen/GlobalISel Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ std::optional<int64_t> getIConstantVRegSExtVal(Register VReg,
180
180
const MachineRegisterInfo &MRI);
181
181
182
182
// / \p VReg is defined by a G_CONSTANT, return the corresponding value.
183
- APInt getIConstantFromReg (Register VReg, const MachineRegisterInfo &MRI);
183
+ const APInt & getIConstantFromReg (Register VReg, const MachineRegisterInfo &MRI);
184
184
185
185
// / Simple struct used to hold a constant integer value and a virtual
186
186
// / register.
Original file line number Diff line number Diff line change @@ -287,7 +287,8 @@ std::optional<APInt> llvm::getIConstantVRegVal(Register VReg,
287
287
return ValAndVReg->Value ;
288
288
}
289
289
290
- APInt llvm::getIConstantFromReg (Register Reg, const MachineRegisterInfo &MRI) {
290
+ const APInt &llvm::getIConstantFromReg (Register Reg,
291
+ const MachineRegisterInfo &MRI) {
291
292
MachineInstr *Const = MRI.getVRegDef (Reg);
292
293
assert ((Const && Const->getOpcode () == TargetOpcode::G_CONSTANT) &&
293
294
" expected a G_CONSTANT on Reg" );
You can’t perform that action at this time.
0 commit comments