summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Pass.cpp
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/IR/Pass.cpp
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/IR/Pass.cpp')
-rw-r--r--llvm/lib/IR/Pass.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp
index 69299fea763..8ce65596b76 100644
--- a/llvm/lib/IR/Pass.cpp
+++ b/llvm/lib/IR/Pass.cpp
@@ -17,8 +17,6 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassNameParser.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IR/OptBisect.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -47,10 +45,6 @@ PassManagerType ModulePass::getPotentialPassManagerType() const {
return PMT_ModulePassManager;
}
-bool ModulePass::skipModule(Module &M) const {
- return !M.getContext().getOptBisect().shouldRunPass(this, M);
-}
-
bool Pass::mustPreserveAnalysisID(char &AID) const {
return Resolver->getAnalysisIfAvailable(&AID, true) != nullptr;
}
@@ -146,13 +140,10 @@ PassManagerType FunctionPass::getPotentialPassManagerType() const {
return PMT_FunctionPassManager;
}
-bool FunctionPass::skipFunction(const Function &F) const {
- if (!F.getContext().getOptBisect().shouldRunPass(this, F))
- return true;
-
+bool FunctionPass::skipOptnoneFunction(const Function &F) const {
if (F.hasFnAttribute(Attribute::OptimizeNone)) {
- DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function "
- << F.getName() << "\n");
+ DEBUG(dbgs() << "Skipping pass '" << getPassName()
+ << "' on function " << F.getName() << "\n");
return true;
}
return false;
@@ -177,13 +168,9 @@ bool BasicBlockPass::doFinalization(Function &) {
return false;
}
-bool BasicBlockPass::skipBasicBlock(const BasicBlock &BB) const {
+bool BasicBlockPass::skipOptnoneFunction(const BasicBlock &BB) const {
const Function *F = BB.getParent();
- if (!F)
- return false;
- if (!F->getContext().getOptBisect().shouldRunPass(this, BB))
- return true;
- if (F->hasFnAttribute(Attribute::OptimizeNone)) {
+ if (F && F->hasFnAttribute(Attribute::OptimizeNone)) {
// Report this only once per function.
if (&BB == &F->getEntryBlock())
DEBUG(dbgs() << "Skipping pass '" << getPassName()
OpenPOWER on IntegriCloud