[PATCH] D103186: [Attributor] Fix AAExecutionDomain returning true on invalid states
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 15:30:10 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1cfdcae65314: [Attributor] Fix AAExecutionDomain returning true on invalid states (authored by jhuber6).
Herald added a subscriber: ormris.
Changed prior to commit:
https://reviews.llvm.org/D103186?vs=348013&id=353807#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103186/new/
https://reviews.llvm.org/D103186
Files:
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Index: llvm/lib/Transforms/IPO/OpenMPOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -2311,7 +2311,7 @@
}
bool isExecutedByInitialThreadOnly(const BasicBlock &BB) const override {
- return SingleThreadedBBs.contains(&BB);
+ return isValidState() && SingleThreadedBBs.contains(&BB);
}
/// Set of basic blocks that are executed by a single thread.
@@ -2331,8 +2331,9 @@
const auto &ExecutionDomainAA = A.getAAFor<AAExecutionDomain>(
*this, IRPosition::function(*ACS.getInstruction()->getFunction()),
DepClassTy::REQUIRED);
- return ExecutionDomainAA.isExecutedByInitialThreadOnly(
- *ACS.getInstruction());
+ return ACS.isDirectCall() &&
+ ExecutionDomainAA.isExecutedByInitialThreadOnly(
+ *ACS.getInstruction());
};
if (!A.checkForAllCallSites(PredForCallSite, *this,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103186.353807.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210622/9c193184/attachment.bin>
More information about the llvm-commits
mailing list