[llvm] [mlir] [mlir][OpenMP] Allow composite SIMD REDUCTION and IF (PR #147568)
Tom Eccles via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 02:16:22 PDT 2025
================
@@ -5370,58 +5370,90 @@ void OpenMPIRBuilder::unrollLoopHeuristic(DebugLoc, CanonicalLoopInfo *Loop) {
void OpenMPIRBuilder::createIfVersion(CanonicalLoopInfo *CanonicalLoop,
Value *IfCond, ValueToValueMapTy &VMap,
+ LoopAnalysis &LIA, LoopInfo &LI, Loop *L,
const Twine &NamePrefix) {
Function *F = CanonicalLoop->getFunction();
- // Define where if branch should be inserted
- Instruction *SplitBefore = CanonicalLoop->getPreheader()->getTerminator();
-
- // TODO: We should not rely on pass manager. Currently we use pass manager
- // only for getting llvm::Loop which corresponds to given CanonicalLoopInfo
- // object. We should have a method which returns all blocks between
- // CanonicalLoopInfo::getHeader() and CanonicalLoopInfo::getAfter()
- FunctionAnalysisManager FAM;
----------------
tblah wrote:
Just to clarify: these passes are removed from createIfVersion because there is already a LoopAnalysis run in the calling function.
Further I wanted to use the same `Loop` instance in both so that I could add the new block to it.
https://github.com/llvm/llvm-project/pull/147568
More information about the llvm-commits
mailing list