llvm-project
decb5d3f - [CIR] Remove branch through cleanup fixups (#182953)

Commit
60 days ago
[CIR] Remove branch through cleanup fixups (#182953) Because we are using a structured representation of cleanups in CIR, we don't need to handle branching through cleanups during codegen. These branches are created during CFG flattening instead. However, we had already committed some code that copied the classic codegen behavior for branching through cleanups. This change deletes that unneeded code. The most significant change here is that when we encounter a return statement we emit the return directly in the current location. The coroutine implementation still creates a return block in the current lexical scope and branches to that block. Cleaning up that representation is left as future work. The popCleanupBlock handling still has a significant amount of logic that is carried over from the classic codegen implementation. It is left in place until we can be sure we won't need it.
Author
Parents
Loading