llvm-project
a6f7a60e - [AMDGPU] Add islands to StructurizeCFG

Commit
65 days ago
[AMDGPU] Add islands to StructurizeCFG Handle an "island", i.e. a block whose terminator is not rewritable (e.g., a callbr) in this context and considered immutable from this pass's perspective. The island is left untouched; its edges are split into forwarders that converge at a new Flow block (ExitFlow). The callbr's runtime target choice is recovered as a per-target i1 "sel" phi and re-dispatched by a structured ladder of 2-way branches: callbr / | \ fwd_0 fwd_1 fwd_2 forwarders (intermediate target blocks) \ | / ExitFlow (Flow_0) -- sel_0? --> real_0 | else Flow_1 --------- sel_1? --> real_1 | else real_2 or Flow_2 (if real_1 == real_2) ------> real_2 (shared last target)
Author
Committer
Parents
Loading