IfScope
#146
Replies: 1 comment
-
This pattern is generated to correctly handle return, break and continue. For example, the register is set to false after a return has been seen to ensure no code after a return statement is run. This is necessary as MLIR does not support a return statement from a nested region. This code should be simplified when run with mem2reg and canonicalize |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I was looking at the generated code from Polygeist and I stumble upon this code pattern that is created for every function.
This code is generated by the MLIRScanner Ctor as well as the IfScope Ctor:
I'm not getting the importance of this "branching" code. Since it's generated on hard-coded constant value true.
Why not just have the
... do stuff
inside the function region instead of creating subregions?Beta Was this translation helpful? Give feedback.
All reactions