summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-04-22 06:51:37 +0000
committerVedant Kumar <vsk@apple.com>2016-04-22 06:51:37 +0000
commit6013f45f920f8b208e945007697a5601f6f956fc (patch)
treefe324d8bb253f369bf9294cbc5c0b13e6ba99570 /llvm/lib/Transforms/IPO
parentae720dbbb61f8dcfe8bf44ec01160183c07cf40e (diff)
downloadbcm5719-llvm-6013f45f920f8b208e945007697a5601f6f956fc.tar.gz
bcm5719-llvm-6013f45f920f8b208e945007697a5601f6f956fc.zip
Revert "Initial implementation of optimization bisect support."
This reverts commit r267022, due to an ASan failure: http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/1549 llvm-svn: 267115
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/ConstantMerge.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/CrossDSOCFI.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/ElimAvailExtern.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/ExtractGV.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp9
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/GlobalDCE.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/IPConstantPropagation.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp7
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/Internalize.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/LoopExtractor.cpp5
-rw-r--r--llvm/lib/Transforms/IPO/LowerBitSets.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/PartialInlining.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/PruneEH.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp7
-rw-r--r--llvm/lib/Transforms/IPO/StripSymbols.cpp11
-rw-r--r--llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp7
22 files changed, 2 insertions, 91 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 8823b811748..1c0f5900d8d 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -114,9 +114,6 @@ Pass *llvm::createArgumentPromotionPass(unsigned maxElements) {
}
bool ArgPromotion::runOnSCC(CallGraphSCC &SCC) {
- if (skipSCC(SCC))
- return false;
-
bool Changed = false, LocalChange;
do { // Iterate until we stop promoting from this SCC.
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
index 87f35fd64f0..0aa49d6fde0 100644
--- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
@@ -96,8 +96,6 @@ unsigned ConstantMerge::getAlignment(GlobalVariable *GV) const {
}
bool ConstantMerge::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
// Find all the globals that are marked "used". These cannot be merged.
SmallPtrSet<const GlobalValue*, 8> UsedGlobals;
diff --git a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
index 4c62cbe2da5..9cf57dc1004 100644
--- a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
+++ b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp
@@ -158,9 +158,6 @@ void CrossDSOCFI::buildCFICheck() {
}
bool CrossDSOCFI::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
if (M.getModuleFlag("Cross-DSO CFI") == nullptr)
return false;
buildCFICheck();
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 3ca5acda34c..27379bed7ed 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -1092,9 +1092,6 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
}
bool DAE::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
// First pass: Do a simple check to see if any functions can have their "..."
diff --git a/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp b/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
index 083debc3148..af313a6b001 100644
--- a/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
+++ b/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
@@ -50,9 +50,6 @@ ModulePass *llvm::createEliminateAvailableExternallyPass() {
}
bool EliminateAvailableExternally::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
// Drop initializers of available externally global variables.
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp
index e1bd676373b..23e517797ca 100644
--- a/llvm/lib/Transforms/IPO/ExtractGV.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp
@@ -68,9 +68,6 @@ namespace {
: ModulePass(ID), Named(GVs.begin(), GVs.end()), deleteStuff(deleteS) {}
bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
// Visit the global inline asm.
if (!deleteStuff)
M.setModuleInlineAsm("");
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index a9a2db17a63..ec6062a51f0 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -987,9 +987,6 @@ static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) {
PreservedAnalyses PostOrderFunctionAttrsPass::run(LazyCallGraph::SCC &C,
CGSCCAnalysisManager &AM) {
- if (skipPassForSCC(name(), C))
- return PreservedAnalyses::all();
-
Module &M = *C.begin()->getFunction().getParent();
const ModuleAnalysisManager &MAM =
AM.getResult<ModuleAnalysisManagerCGSCCProxy>(C).getManager();
@@ -1084,9 +1081,6 @@ INITIALIZE_PASS_END(PostOrderFunctionAttrsLegacyPass, "functionattrs",
Pass *llvm::createPostOrderFunctionAttrsLegacyPass() { return new PostOrderFunctionAttrsLegacyPass(); }
bool PostOrderFunctionAttrsLegacyPass::runOnSCC(CallGraphSCC &SCC) {
- if (skipSCC(SCC))
- return false;
-
TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
bool Changed = false;
@@ -1201,9 +1195,6 @@ static bool addNoRecurseAttrsTopDown(Function &F) {
}
bool ReversePostOrderFunctionAttrs::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
// We only have a post-order SCC traversal (because SCCs are inherently
// discovered in post-order), so we accumulate them in a vector and then walk
// it in reverse. This is simpler than using the RPO iterator infrastructure
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index cb8d6331d79..25d413030f4 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -499,9 +499,6 @@ public:
: ModulePass(ID), Index(Index) {}
bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
if (SummaryFile.empty() && !Index)
report_fatal_error("error: -function-import requires -summary-file or "
"file from frontend\n");
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
index 63d3032e131..531aa4d50c0 100644
--- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -75,9 +75,6 @@ INITIALIZE_PASS(GlobalDCE, "globaldce",
ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
bool GlobalDCE::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
// Remove empty functions from the global ctors list.
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index a9c2a95a479..60d1e7ccbe6 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2528,9 +2528,6 @@ bool GlobalOpt::OptimizeEmptyGlobalCXXDtors(Function *CXAAtExitFn) {
}
bool GlobalOpt::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
auto &DL = M.getDataLayout();
diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
index a1533b3630e..060aac19efa 100644
--- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -54,9 +54,6 @@ INITIALIZE_PASS(IPCP, "ipconstprop",
ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
bool IPCP::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
bool LocalChange = true;
diff --git a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
index 02fc1f605ef..030a6464522 100644
--- a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
@@ -14,7 +14,6 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/OptBisect.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -956,9 +955,6 @@ static bool inferAllPrototypeAttributes(Module &M,
PreservedAnalyses InferFunctionAttrsPass::run(Module &M,
AnalysisManager<Module> &AM) {
- if (skipPassForModule(name(), M))
- return PreservedAnalyses::all();
-
auto &TLI = AM.getResult<TargetLibraryAnalysis>(M);
if (!inferAllPrototypeAttributes(M, TLI))
@@ -983,9 +979,6 @@ struct InferFunctionAttrsLegacyPass : public ModulePass {
}
bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
auto &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
return inferAllPrototypeAttributes(M, TLI);
}
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index d598c5f0f3c..2c696cc609a 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -356,9 +356,6 @@ static bool InlineHistoryIncludes(Function *F, int InlineHistoryID,
}
bool Inliner::runOnSCC(CallGraphSCC &SCC) {
- if (skipSCC(SCC))
- return false;
-
CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
ACT = &getAnalysis<AssumptionCacheTracker>();
auto &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index 6db826ffe62..ca868e9d224 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -105,9 +105,6 @@ public:
}
bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
CallGraphWrapperPass *CGPass =
getAnalysisIfAvailable<CallGraphWrapperPass>();
CallGraph *CG = CGPass ? &CGPass->getCallGraph() : nullptr;
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index 7578e6a6d19..3c6a7bb7a17 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -81,7 +81,7 @@ INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
Pass *llvm::createLoopExtractorPass() { return new LoopExtractor(); }
bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &) {
- if (skipLoop(L))
+ if (skipOptnoneFunction(L))
return false;
// Only visit top-level loops.
@@ -249,9 +249,6 @@ void BlockExtractorPass::SplitLandingPadPreds(Function *F) {
}
bool BlockExtractorPass::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
std::set<BasicBlock*> TranslatedBlocksToNotExtract;
for (unsigned i = 0, e = BlocksToNotExtract.size(); i != e; ++i) {
BasicBlock *BB = BlocksToNotExtract[i];
diff --git a/llvm/lib/Transforms/IPO/LowerBitSets.cpp b/llvm/lib/Transforms/IPO/LowerBitSets.cpp
index 78981fdedad..db5bab0cb10 100644
--- a/llvm/lib/Transforms/IPO/LowerBitSets.cpp
+++ b/llvm/lib/Transforms/IPO/LowerBitSets.cpp
@@ -1051,9 +1051,6 @@ bool LowerBitSets::eraseBitSetMetadata() {
}
bool LowerBitSets::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = buildBitSets();
Changed |= eraseBitSetMetadata();
return Changed;
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index e16749c76b8..4e27898b570 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -1525,9 +1525,6 @@ bool MergeFunctions::doSanityCheck(std::vector<WeakVH> &Worklist) {
}
bool MergeFunctions::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
// All functions in the module, ordered by hash. Functions with a unique
diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp
index 7b1b0985043..0c5c84bbcca 100644
--- a/llvm/lib/Transforms/IPO/PartialInlining.cpp
+++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp
@@ -149,9 +149,6 @@ Function* PartialInliner::unswitchFunction(Function* F) {
}
bool PartialInliner::runOnModule(Module& M) {
- if (skipModule(M))
- return false;
-
std::vector<Function*> worklist;
worklist.reserve(M.size());
for (Module::iterator FI = M.begin(), FE = M.end(); FI != FE; ++FI)
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index 04383f4f3fa..940f97b3d33 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/lib/Transforms/IPO/PruneEH.cpp
@@ -63,9 +63,6 @@ Pass *llvm::createPruneEHPass() { return new PruneEH(); }
bool PruneEH::runOnSCC(CallGraphSCC &SCC) {
- if (skipSCC(SCC))
- return false;
-
SmallPtrSet<CallGraphNode *, 8> SCCNodes;
CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
bool MadeChange = false;
diff --git a/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp b/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp
index 2ac854f8e32..c94cc7c74a8 100644
--- a/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp
+++ b/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp
@@ -17,7 +17,6 @@
#include "llvm/Transforms/IPO/StripDeadPrototypes.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/OptBisect.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/IPO.h"
@@ -55,9 +54,6 @@ static bool stripDeadPrototypes(Module &M) {
}
PreservedAnalyses StripDeadPrototypesPass::run(Module &M) {
- if (skipPassForModule(name(), M))
- return PreservedAnalyses::all();
-
if (stripDeadPrototypes(M))
return PreservedAnalyses::none();
return PreservedAnalyses::all();
@@ -73,9 +69,6 @@ public:
*PassRegistry::getPassRegistry());
}
bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
return stripDeadPrototypes(M);
}
};
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp
index 3202837ec30..64595424226 100644
--- a/llvm/lib/Transforms/IPO/StripSymbols.cpp
+++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp
@@ -229,9 +229,6 @@ static bool StripSymbolNames(Module &M, bool PreserveDbgInfo) {
}
bool StripSymbols::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
Changed |= StripDebugInfo(M);
if (!OnlyDebugInfo)
@@ -240,15 +237,10 @@ bool StripSymbols::runOnModule(Module &M) {
}
bool StripNonDebugSymbols::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
return StripSymbolNames(M, true);
}
bool StripDebugDeclare::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
Function *Declare = M.getFunction("llvm.dbg.declare");
std::vector<Constant*> DeadConstants;
@@ -294,9 +286,6 @@ bool StripDebugDeclare::runOnModule(Module &M) {
/// optimized away by the optimizer. This special pass removes debug info for
/// such symbols.
bool StripDeadDebugInfo::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
bool Changed = false;
LLVMContext &C = M.getContext();
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
index e7c161dd029..48b05b62c36 100644
--- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
@@ -265,12 +265,7 @@ struct WholeProgramDevirt : public ModulePass {
WholeProgramDevirt() : ModulePass(ID) {
initializeWholeProgramDevirtPass(*PassRegistry::getPassRegistry());
}
- bool runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
- return DevirtModule(M).run();
- }
+ bool runOnModule(Module &M) { return DevirtModule(M).run(); }
};
} // anonymous namespace
OpenPOWER on IntegriCloud