This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Unify divergent function exits.
ClosedPublic

Authored by arsenm on Mar 10 2017, 2:01 PM.

Details

Summary

StructurizeCFG can't handle cases with multiple
returns creating regions with multiple exits.
Create a copy of UnifyFunctionExitNodes that only
unifies exit nodes that skips exit nodes
with uniform branch sources.

Diff Detail

Event Timeline

arsenm created this revision.Mar 10 2017, 2:01 PM
arsenm updated this revision to Diff 91629.Mar 13 2017, 3:25 PM

Fix assert on many unreachable blocks

jlebar edited edge metadata.Mar 17 2017, 2:31 PM

Something in particular you'd like me to review here? I'm probably not the best person to review inside AMDGPU/.

Something in particular you'd like me to review here? I'm probably not the best person to review inside AMDGPU/.

You were looking at some structurizer issues, so this may have been related to some of them. One concern I have is now there's a fragile pass ordering issue. My original attempt was able to add a pass dependency on the generic UnifyFunctionExit pass, so it auto-ensures this invariant when running the structurize pass. However I don't think I can easily add a dependency on the target specific divergence aware version

t-tye added a subscriber: t-tye.Mar 22 2017, 6:40 PM
tony-tye removed a subscriber: tony-tye.Mar 22 2017, 6:47 PM
This revision is now accepted and ready to land.Mar 24 2017, 12:37 PM
arsenm closed this revision.Mar 24 2017, 1:04 PM

r298729