[llvm-commits] [llvm] r80204 - in /llvm/trunk: include/llvm/Transforms/IPO/InlinerPass.h include/llvm/Transforms/Utils/InlineCost.h lib/Transforms/IPO/Inliner.cpp
Chris Lattner
sabre at nondot.org
Wed Aug 26 21:32:07 PDT 2009
Author: lattner
Date: Wed Aug 26 23:32:07 2009
New Revision: 80204
URL: http://llvm.org/viewvc/llvm-project?rev=80204&view=rev
Log:
reduce header #include'age
Modified:
llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h
llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h?rev=80204&r1=80203&r2=80204&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h Wed Aug 26 23:32:07 2009
@@ -14,16 +14,17 @@
//
//===----------------------------------------------------------------------===//
-#ifndef INLINER_H
-#define INLINER_H
+#ifndef LLVM_TRANSFORMS_IPO_INLINERPASS_H
+#define LLVM_TRANSFORMS_IPO_INLINERPASS_H
#include "llvm/CallGraphSCCPass.h"
-#include "llvm/Transforms/Utils/InlineCost.h"
-
namespace llvm {
class CallSite;
class TargetData;
+ class InlineCost;
+ template<class PtrType, unsigned SmallSize>
+ class SmallPtrSet;
/// Inliner - This class contains all of the helper code which is used to
/// perform the inlining operations that do not depend on the policy.
@@ -45,11 +46,6 @@
// processing to avoid breaking the SCC traversal.
virtual bool doFinalization(CallGraph &CG);
- // InlineCallIfPossible
- bool InlineCallIfPossible(CallSite CS, CallGraph &CG,
- const SmallPtrSet<Function*, 8> &SCCFunctions,
- const TargetData *TD);
-
/// This method returns the value specified by the -inline-threshold value,
/// specified on the command line. This is typically not directly needed.
///
@@ -83,6 +79,10 @@
/// shouldInline - Return true if the inliner should attempt to
/// inline at the given CallSite.
bool shouldInline(CallSite CS);
+
+ bool InlineCallIfPossible(CallSite CS, CallGraph &CG,
+ const SmallPtrSet<Function*, 8> &SCCFunctions,
+ const TargetData *TD);
};
} // End llvm namespace
Modified: llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h?rev=80204&r1=80203&r2=80204&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h Wed Aug 26 23:32:07 2009
@@ -14,7 +14,6 @@
#ifndef LLVM_TRANSFORMS_UTILS_INLINECOST_H
#define LLVM_TRANSFORMS_UTILS_INLINECOST_H
-#include "llvm/ADT/SmallPtrSet.h"
#include <cassert>
#include <climits>
#include <map>
@@ -25,6 +24,8 @@
class Value;
class Function;
class CallSite;
+ template<class PtrType, unsigned SmallSize>
+ class SmallPtrSet;
/// InlineCost - Represent the cost of inlining a function. This
/// supports special values for functions which should "always" or
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=80204&r1=80203&r2=80204&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Wed Aug 26 23:32:07 2009
@@ -21,10 +21,12 @@
#include "llvm/Support/CallSite.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Transforms/IPO/InlinerPass.h"
+#include "llvm/Transforms/Utils/InlineCost.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include <set>
using namespace llvm;
@@ -57,7 +59,8 @@
Function *Callee = CS.getCalledFunction();
Function *Caller = CS.getCaller();
- if (!InlineFunction(CS, &CG, TD)) return false;
+ if (!InlineFunction(CS, &CG, TD))
+ return false;
// If the inlined function had a higher stack protection level than the
// calling function, then bump up the caller's stack protection level.
More information about the llvm-commits
mailing list