mmha wrote: > My initial idea was to handle these cases in the FlattenCFG pass.
@Andres-Salamanca Do you mean emitting code past a `co_return` in the same block and cleaning that up later in `FlattenCFG`? The problem with that would be that the IR wouldn't be valid until you flatten it because the `co_return` is a terminator. Or am I misunderstanding you? Whether we fallthrough or not also affects whether we need to emit an implicit `co_return` or not and that shouldn't be handled in FlattenCFG. If you mean removing dead code that's probably fine and just a question of whether we like to remain it at this stage. IIRC we also keep dead code for `if` statements. I don't feel strongly either way. https://github.com/llvm/llvm-project/pull/231046 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
