llvm-project
593683f9 - [OpenACC][NFC] Generalize wrapMultiBlockRegionWithSCFExecuteRegion (#187359)

Commit
69 days ago
[OpenACC][NFC] Generalize wrapMultiBlockRegionWithSCFExecuteRegion (#187359) Simplify `wrapMultiBlockRegionWithSCFExecuteRegion` by replacing the `bool convertFuncReturn` parameter with a generic `getNumSuccessors() == 0` check. Terminators with no successors are by definition region exit points, so they can be identified automatically without requiring callers to specify types. This enables downstream dialects (e.g., CUF with fir::FirEndOp) to reuse the utility without modifying it. ``` // Before: wrapMultiBlockRegionWithSCFExecuteRegion(region, mapping, loc, rewriter, /*convertFuncReturn=*/true); // After: wrapMultiBlockRegionWithSCFExecuteRegion(region, mapping, loc, rewriter); ```
Author
Parents
Loading