This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Move trap lowering to DAG
ClosedPublic

Authored by arsenm on Apr 13 2017, 3:01 PM.

Details

Reviewers
kzhuravl
Summary

Fixes traps in any block besides the entry block,
and fixes depending on a live-in physical register
by using a virtual register copy.

Also happens to stop emitting a nop in the case
debug trap is not supported.

Diff Detail

Event Timeline

arsenm created this revision.Apr 13 2017, 3:01 PM
lib/Target/AMDGPU/SIISelLowering.cpp
2404

Can we make it an error?

arsenm added inline comments.Apr 14 2017, 11:57 AM
lib/Target/AMDGPU/SIISelLowering.cpp
2404

We decided this should be a warning before, this isn't changing that

t-tye added inline comments.Apr 14 2017, 2:20 PM
lib/Target/AMDGPU/SIISelLowering.cpp
2404

If there is no trap handler (namely it is not amdhsa) then the code generated is simply ignoring the llvm.debugtrap. So in this case is it better to give a warning or an error? If the llvm.debugtrap was present for a reason then ignoring it without giving an error may not be very helpful.

arsenm updated this revision to Diff 95475.Apr 17 2017, 1:05 PM

Update AMDGPUUsage

kzhuravl added inline comments.Apr 24 2017, 10:00 AM
docs/AMDGPUUsage.rst
86

formatting.

lib/Target/AMDGPU/SIISelLowering.cpp
2404

was the question answered?

arsenm added inline comments.Apr 24 2017, 10:01 AM
lib/Target/AMDGPU/SIISelLowering.cpp
2404

Changing the behavior is beyond the scope of this verifier error fixing patch

kzhuravl accepted this revision.Apr 24 2017, 10:02 AM

LGTM with formatting fix.

This revision is now accepted and ready to land.Apr 24 2017, 10:02 AM
arsenm closed this revision.Apr 24 2017, 11:02 AM

r301206