This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Disable 'Skip Uniform Regions' optimization by default for AMDGPU; add support for -opt-bisect-limit; update tests.
ClosedPublic

Authored by kpyzhov on Apr 1 2020, 10:02 AM.

Details

Summary

Disable the 'Skip Uniform Regions' optimization in the 'Structurize CFG' pass by default since it causes several functional issues in HIP applications.
The optimization still can be turned on manually by using the "-structurizecfg-relaxed-uniform-regions" option.
The LIT tests affected by this change are updated.

Diff Detail

Event Timeline

kpyzhov created this revision.Apr 1 2020, 10:02 AM
kpyzhov updated this revision to Diff 254253.Apr 1 2020, 10:45 AM
sameerds added inline comments.Apr 1 2020, 7:24 PM
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
1011

This seems to be related to opt-bisect, and should go into a different commit. I am also not sure how this will work. There wouldn't be any guarantee of producing valid ISA if the structurizer skipped entire regions during a bisect.

sameerds added inline comments.Apr 1 2020, 7:26 PM
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
854

This only changes the invocation in AMDGPU, but does not change the structurizer default itself. If that is the intention, then commit message needs to reflect that correctly, and should start with the flag [AMDGPU].

kpyzhov updated this revision to Diff 254568.Apr 2 2020, 10:58 AM
kpyzhov retitled this revision from [AMDGPU] Disable 'Skip Uniform Regions' optimization by default; add support for -opt-bisect-limit; update tests. to [AMDGPU] Disable 'Skip Uniform Regions' optimization by default for AMDGPU; add support for -opt-bisect-limit; update tests..
kpyzhov marked 2 inline comments as done.Apr 2 2020, 11:00 AM
sameerds accepted this revision.Apr 2 2020, 8:01 PM
This revision is now accepted and ready to land.Apr 2 2020, 8:01 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Apr 6 2020, 10:24 AM

Looks like this broke check-llvm.