projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72)
[oota-llvm.git]
/
lib
/
Transforms
/
IPO
/
InlineSimple.cpp
diff --git
a/lib/Transforms/IPO/InlineSimple.cpp
b/lib/Transforms/IPO/InlineSimple.cpp
index 7141064b3b0502f1938445db572828b6ef894958..9b01d81b3c7c1ac8596e0d9e4a6c955e46bb66fa 100644
(file)
--- a/
lib/Transforms/IPO/InlineSimple.cpp
+++ b/
lib/Transforms/IPO/InlineSimple.cpp
@@
-11,8
+11,9
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
-#define DEBUG_TYPE "inline"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO.h"
+#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/IR/CallSite.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/IR/CallSite.h"
@@
-26,6
+27,8
@@
using namespace llvm;
using namespace llvm;
+#define DEBUG_TYPE "inline"
+
namespace {
/// \brief Actual inliner pass implementation.
namespace {
/// \brief Actual inliner pass implementation.
@@
-37,12
+40,12
@@
class SimpleInliner : public Inliner {
InlineCostAnalysis *ICA;
public:
InlineCostAnalysis *ICA;
public:
- SimpleInliner() : Inliner(ID), ICA(
0
) {
+ SimpleInliner() : Inliner(ID), ICA(
nullptr
) {
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
}
SimpleInliner(int Threshold)
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
}
SimpleInliner(int Threshold)
- : Inliner(ID, Threshold, /*InsertLifetime*/ true), ICA(
0
) {
+ : Inliner(ID, Threshold, /*InsertLifetime*/ true), ICA(
nullptr
) {
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
}
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
}
@@
-72,6
+75,8
@@
static int computeThresholdFromOptLevels(unsigned OptLevel,
char SimpleInliner::ID = 0;
INITIALIZE_PASS_BEGIN(SimpleInliner, "inline",
"Function Integration/Inlining", false, false)
char SimpleInliner::ID = 0;
INITIALIZE_PASS_BEGIN(SimpleInliner, "inline",
"Function Integration/Inlining", false, false)
+INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
+INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
INITIALIZE_PASS_DEPENDENCY(InlineCostAnalysis)
INITIALIZE_PASS_END(SimpleInliner, "inline",
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
INITIALIZE_PASS_DEPENDENCY(InlineCostAnalysis)
INITIALIZE_PASS_END(SimpleInliner, "inline",