This is an archive of the discontinued LLVM Phabricator instance.

StructurizeCFG: Relax uniformity checks.
ClosedPublic

Authored by sheredom on May 21 2019, 7:37 AM.

Details

Summary

This change relaxes the checks for hasOnlyUniformBranches such that our region is uniform if:

  1. All conditional branches that are direct children are uniform.
  2. And either: a. All sub-regions are uniform. b. There is one or less conditional branches among the direct children.

Diff Detail

Event Timeline

sheredom created this revision.May 21 2019, 7:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 7:37 AM

I'm personally not confident enough in this change to enable it unconditionally immediately. I think this should be guarded with an option.

test/CodeGen/AMDGPU/control-flow-optnone.ll
18–19

I think this doesn't fit with what the test is actually trying to test. There's a comment above that says it wants to be changed to optnone. Perhaps better to change the run line accordingly?

sheredom updated this revision to Diff 200661.May 22 2019, 1:31 AM

Guarded the change by an option to allow users of the structurizer to turn this functionality on in their own time.

I'm personally not confident enough in this change to enable it unconditionally immediately. I think this should be guarded with an option.

I've introduced an option and enabled it only for the uniform-regions.ll test.

This revision is now accepted and ready to land.May 24 2019, 12:42 AM
This revision was automatically updated to reflect the committed changes.