mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[Polly][ScopInliner] Indicate if the IR has changed.
Return true to indicate that the IR has changed if the nested pass manager has changed it. Fixes the ScopInliner tests in the LLVM_ENABLE_EXPENSIVE_CHECKS=ON configuration. Thanks to Alexandre Ganea for reporting.
This commit is contained in:
parent
f26adaa28d
commit
e2d4b02404
@ -78,6 +78,7 @@ public:
|
||||
const bool HasScopAsTopLevelRegion =
|
||||
SD.ValidRegions.count(RI.getTopLevelRegion()) > 0;
|
||||
|
||||
bool Changed = false;
|
||||
if (HasScopAsTopLevelRegion) {
|
||||
LLVM_DEBUG(dbgs() << "Skipping " << F->getName()
|
||||
<< " has scop as top level region");
|
||||
@ -90,13 +91,15 @@ public:
|
||||
MPM.addPass(AlwaysInlinerPass());
|
||||
Module *M = F->getParent();
|
||||
assert(M && "Function has illegal module");
|
||||
MPM.run(*M, MAM);
|
||||
PreservedAnalyses PA = MPM.run(*M, MAM);
|
||||
if (!PA.areAllPreserved())
|
||||
Changed = true;
|
||||
} else {
|
||||
LLVM_DEBUG(dbgs() << F->getName()
|
||||
<< " does NOT have scop as top level region\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
return Changed;
|
||||
};
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
|
Loading…
Reference in New Issue
Block a user