[PATCH] D74688: AMDGPU/GlobalISel: Support llvm.trap and llvm.debugtrap intrinsics
Mahesha S via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 22 22:34:41 PST 2020
hsmhsm marked an inline comment as done.
hsmhsm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2244-2247
+void AMDGPULegalizerInfo::insertLiveInCopy(MachineIRBuilder &B,
+ MachineRegisterInfo &MRI,
+ Register LiveIn,
+ Register Reg) const {
----------------
arsenm wrote:
> hsmhsm wrote:
> > arsenm wrote:
> > > I think it would be better to have this only take the physical register input, and return the livein virtreg. This wouldn't have the
> > > // Destination virtual register is already defined, just insert copy
> > >
> > > case. The intrinsic lowering cases would then be responsible for inserting the extra copy to the expected result
> > taken care
> This is halfway there. You're still passing in both the live in physical register and the corresponding virtual register. I was thinking you would call getLiveInRegister with just the physical register, and it would be responsible for finding out the virtual register, and inserting the entry block copy by calling insertLiveInCopy. loadInputValue then wouldn't need to worry about ensuring the entry block copy was inserted like it does now.
Taken care
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74688/new/
https://reviews.llvm.org/D74688
More information about the llvm-commits
mailing list