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,
180180 const MachineRegisterInfo &MRI);
181181
182182// / \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);
184184
185185// / Simple struct used to hold a constant integer value and a virtual
186186// / register.
Original file line number Diff line number Diff line change @@ -287,7 +287,8 @@ std::optional<APInt> llvm::getIConstantVRegVal(Register VReg,
287287 return ValAndVReg->Value ;
288288}
289289
290- APInt llvm::getIConstantFromReg (Register Reg, const MachineRegisterInfo &MRI) {
290+ const APInt &llvm::getIConstantFromReg (Register Reg,
291+ const MachineRegisterInfo &MRI) {
291292 MachineInstr *Const = MRI.getVRegDef (Reg);
292293 assert ((Const && Const->getOpcode () == TargetOpcode::G_CONSTANT) &&
293294 " expected a G_CONSTANT on Reg" );
You can’t perform that action at this time.
0 commit comments