Skip to content

Commit 077dc67

Browse files
committed
[TSAR, Parallel, DVMH] Fix, allow IPO if there are no parents of IPO root.
1 parent 3e9eda3 commit 077dc67

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Transform/Clang/DVMHSMAutoPar.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,8 +2503,11 @@ bool ClangDVMHSMParallelization::runOnModule(llvm::Module &M) {
25032503
return;
25042504
}
25052505
// Enable IPO only if all children of the IPO root is valid.
2506-
if (PI == &mIPORoot && !PD->children().empty() && !PD->isRequired()) {
2507-
mIPORoot.invalidate();
2506+
if (PI == &mIPORoot) {
2507+
if (!PD->children().empty())
2508+
mIPORoot.invalidate();
2509+
else
2510+
mIPORoot.skip();
25082511
return;
25092512
}
25102513
auto PIItr{DeferredPragmas.find_as(PI)};

0 commit comments

Comments
 (0)