[PATCH] D21040: [PM] Preserve GlobalsAA for SROA
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 06:27:52 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272009: [PM] Preserve GlobalsAA for SROA. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D21040?vs=59773&id=59878#toc
Repository:
rL LLVM
http://reviews.llvm.org/D21040
Files:
llvm/trunk/lib/Transforms/Scalar/SROA.cpp
Index: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp
@@ -4232,9 +4232,14 @@
PostPromotionWorklist.clear();
} while (!Worklist.empty());
+ if (!Changed)
+ return PreservedAnalyses::all();
+
// FIXME: Even when promoting allocas we should preserve some abstract set of
// CFG-specific analyses.
- return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
+ PreservedAnalyses PA;
+ PA.preserve<GlobalsAA>();
+ return PA;
}
PreservedAnalyses SROA::run(Function &F, AnalysisManager<Function> &AM) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21040.59878.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/57d82599/attachment.bin>
More information about the llvm-commits
mailing list