From 6013f45f920f8b208e945007697a5601f6f956fc Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Fri, 22 Apr 2016 06:51:37 +0000 Subject: 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 --- llvm/lib/Analysis/LoopPass.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'llvm/lib/Analysis/LoopPass.cpp') diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 3181e4f9921..8163231c332 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -16,7 +16,6 @@ #include "llvm/Analysis/LoopPass.h" #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LLVMContext.h" -#include "llvm/IR/OptBisect.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" @@ -336,16 +335,11 @@ void LoopPass::assignPassManager(PMStack &PMS, LPPM->add(this); } -bool LoopPass::skipLoop(const Loop *L) const { +// Containing function has Attribute::OptimizeNone and transformation +// passes should skip it. +bool LoopPass::skipOptnoneFunction(const Loop *L) const { const Function *F = L->getHeader()->getParent(); - if (!F) - return false; - // Check the opt bisect limit. - LLVMContext &Context = F->getContext(); - if (!Context.getOptBisect().shouldRunPass(this, *L)) - return true; - // Check for the OptimizeNone attribute. - if (F->hasFnAttribute(Attribute::OptimizeNone)) { + if (F && F->hasFnAttribute(Attribute::OptimizeNone)) { // FIXME: Report this to dbgs() only once per function. DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' in function " << F->getName() << "\n"); -- cgit v1.2.3