- Skip unreachable predecessors during header detection in SCC. Those unreachable blocks would be generated in the switch lowering pass in the corner cases or other frontends. Even though they could be removed through the CFG simplification, we should skip them during header detection.
Details
Details
- Reviewers
sameerds - Commits
- rG0b4cf802fad4: [fix-irreducible] Skip unreachable predecessors.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@cdevadas reported that other parts of the AMDGPU backend are also affected by the unreachable blocks being produced in the switch lowering. Instead of fixing each such pass separately, it seems the best way forward it to put the block elimination earlier in the flow. @cdevadas is already working on such a change.
Comment Actions
I understand the cleanup of switch-lower pass could avoid the issue. But, as a general pass, it should be prepared to handle the general cases similar to other general passes. Also, it's a blocking issue to our schedule. Could you review this trivial change?