From: Eugene Zelenko Date: Thu, 31 Aug 2017 22:06:09 +0000 (+0000) Subject: [IR] Missing changes for r312289 (NFC). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3df2f4a7e2a89a3fad3315519158357d10d4b729;p=llvm [IR] Missing changes for r312289 (NFC). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312290 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/OptBisect.h b/include/llvm/IR/OptBisect.h index 185a5ac956f..09e67aa7924 100644 --- a/include/llvm/IR/OptBisect.h +++ b/include/llvm/IR/OptBisect.h @@ -1,4 +1,4 @@ -//===----------- llvm/IR/OptBisect.h - LLVM Bisect support -------------===// +//===- llvm/IR/OptBisect.h - LLVM Bisect support ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,11 +15,11 @@ #ifndef LLVM_IR_OPTBISECT_H #define LLVM_IR_OPTBISECT_H +#include "llvm/ADT/StringRef.h" + namespace llvm { class Pass; -class StringRef; -class Twine; /// This class implements a mechanism to disable passes and individual /// optimizations at compile time based on a command line option diff --git a/lib/IR/OptBisect.cpp b/lib/IR/OptBisect.cpp index f1c70058fac..dc7dcd2e4a9 100644 --- a/lib/IR/OptBisect.cpp +++ b/lib/IR/OptBisect.cpp @@ -1,4 +1,4 @@ -//===------- llvm/IR/OptBisect/Bisect.cpp - LLVM Bisect support --------===// +//===- llvm/IR/OptBisect/Bisect.cpp - LLVM Bisect support -----------------===// // // The LLVM Compiler Infrastructure // @@ -6,31 +6,38 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -/// +// /// \file /// This file implements support for a bisecting optimizations based on a /// command line option. -/// +// //===----------------------------------------------------------------------===// #include "llvm/IR/OptBisect.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/CallGraphSCCPass.h" -#include "llvm/Analysis/LazyCallGraph.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/RegionInfo.h" +#include "llvm/IR/BasicBlock.h" +#include "llvm/IR/Function.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" +#include +#include +#include using namespace llvm; static cl::opt OptBisectLimit("opt-bisect-limit", cl::Hidden, - cl::init(INT_MAX), cl::Optional, + cl::init(std::numeric_limits::max()), + cl::Optional, cl::desc("Maximum optimization to perform")); OptBisect::OptBisect() { - BisectEnabled = OptBisectLimit != INT_MAX; + BisectEnabled = OptBisectLimit != std::numeric_limits::max(); } static void printPassMessage(const StringRef &Name, int PassNum,