summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/IR/OptBisect.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
committerpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
commitbdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch)
treec50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/IR/OptBisect.cpp
parentPrint a 'p' flag for file descriptors that were opened after pledge(2). (diff)
downloadwireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz
wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/IR/OptBisect.cpp')
-rw-r--r--gnu/llvm/lib/IR/OptBisect.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/gnu/llvm/lib/IR/OptBisect.cpp b/gnu/llvm/lib/IR/OptBisect.cpp
index f1c70058fac..dc7dcd2e4a9 100644
--- a/gnu/llvm/lib/IR/OptBisect.cpp
+++ b/gnu/llvm/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 <cassert>
+#include <limits>
+#include <string>
using namespace llvm;
static cl::opt<int> OptBisectLimit("opt-bisect-limit", cl::Hidden,
- cl::init(INT_MAX), cl::Optional,
+ cl::init(std::numeric_limits<int>::max()),
+ cl::Optional,
cl::desc("Maximum optimization to perform"));
OptBisect::OptBisect() {
- BisectEnabled = OptBisectLimit != INT_MAX;
+ BisectEnabled = OptBisectLimit != std::numeric_limits<int>::max();
}
static void printPassMessage(const StringRef &Name, int PassNum,