[flang-commits] [flang] [flang][Lower] Treat directives with nested evaluations as constructs (PR #91614)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Fri May 10 06:44:17 PDT 2024
kparzysz wrote:
Yeah, this patch doesn't really fix the problem... I think we may need to revamp the block/branch generation. What I'm thinking is to generate empty blocks and linking (unconditional) branches early, and then fill them out in `genFIR`. For example, for a `if/then/else` statement we would insert branches from the "then" and the "else" blocks to the successor of the "if" statement right away. If the code inside of the then/else wants to insert its own terminator (like "unreachable" or something), then it would need to replace the existing one.
It seems to me like that should work, but maybe there are some special cases that would cause complications. What do you think?
https://github.com/llvm/llvm-project/pull/91614
More information about the flang-commits
mailing list