Page MenuHomePhabricator

[AMDGPU] Change llvm.debugtrap to be a debug breakpoint that can resume execution.

Authored by t-tye on May 11 2018, 12:56 PM.

Diff Detail

Event Timeline

t-tye created this revision.May 11 2018, 12:56 PM
This revision is now accepted and ready to land.May 11 2018, 1:19 PM
scchan accepted this revision.May 16 2018, 9:16 AM
This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.May 18 2018, 1:35 AM

This can't be a terminator instruction. This will produce a terminator in the middle of the block verifier error. I think this is already an issue in some case

t-tye added inline comments.May 18 2018, 11:49 AM

This was behavior was not introduced by this patch as the original code did this. So can address as a separate patch. Can you point me at examples of how lowering should generate code that introduces new control flow?

arsenm added inline comments.May 18 2018, 12:06 PM

You can't directly. A new dummy node needs to be introduced, and then create new blocks in AdjustInstrPostInstrSelection.

If you add a test with the handler disabled and any instruction after, like a store you'll see this doesn't work.