This supports the codegen for global procedure pointer in BoxedProcedure
pass. Reset the boxproc type.
Depends on D136842.
Paths
| Differential D138273
[flang] Support codegen for global procedure pointer ClosedPublic Authored by peixin on Nov 18 2022, 2:07 AM.
Details Summary This supports the codegen for global procedure pointer in BoxedProcedure Depends on D136842.
Diff Detail Event TimelineComment Actions I think you may need to use updateRootInPlace, otherwise LGTM
Comment Actions Thanks @jeanPerier and @clementval . You are right. As mlir/docs/PatternRewriter.md, matchAndRewrite has the restriction of "the root operation is required to either be: updated in-place, replaced, or erased.", and an operation is updated in-place using the transaction-like API (start|cancel|finalize)RootUpdate. Fixed. This revision is now accepted and ready to land.Nov 21 2022, 12:37 AM Closed by commit rGfeb9d33a2aa5: [flang] Support codegen for global procedure pointer (authored by peixin). · Explain WhyDec 7 2022, 5:25 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 476386 flang/docs/ProcedurePointer.md
flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
flang/test/Fir/boxproc-2.fir
|
I will let @clementval or someone else familiar will MLIR patterns, but I think that if you update an operation in place, you need to use rewriter.updateRootInPlace (or startRootUpdate/finalizeRootUpdate).