[PATCH] D131181: [AMDGPU] Fix si-annotate-control-flow for visited else branch

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 00:17:16 PDT 2022


ruiling added a comment.

I don't think this is the right fix for the failure test. The attached test uncover some issues in passes running before annotate-cf. The test escaped structurization because there are multiple function exit blocks. This is because unify-function-exit did not unify UnreachableBlock that is uniformly reachable from entry(here: %cond.false). Then structurizecfg simply skip the whole function which is wrong. Two possible directions I can see are: a.) make the unify-divergent-exit also unify UnreachableBlock even it is uniformly reachable, this sounds more like a quick fix. b.) teach StructurizeCFG also work on function with multiple (more specifically uniformly reachable) exits.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131181/new/

https://reviews.llvm.org/D131181



More information about the llvm-commits mailing list