[llvm-commits] [llvm] r40560 - in /llvm/trunk: include/llvm/Transforms/Utils/InlineCost.h lib/Transforms/IPO/InlineSimple.cpp lib/Transforms/Utils/BasicInliner.cpp lib/Transforms/Utils/InlineCost.cpp
Devang Patel
dpatel at apple.com
Fri Jul 27 11:34:27 PDT 2007
Author: dpatel
Date: Fri Jul 27 13:34:27 2007
New Revision: 40560
URL: http://llvm.org/viewvc/llvm-project?rev=40560&view=rev
Log:
Use SmallPtrSet.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h
llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp
llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp
llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
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=40560&r1=40559&r2=40560&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h Fri Jul 27 13:34:27 2007
@@ -14,7 +14,7 @@
#ifndef INLINECOST_H
#define INLINECOST_H
-#include <set>
+#include "llvm/ADT/SmallPtrSet.h"
#include <map>
#include <vector>
@@ -73,7 +73,7 @@
// getInlineCost - The heuristic used to determine if we should inline the
// function call or not.
//
- int getInlineCost(CallSite CS, std::set<const Function *> &NeverInline);
+ int getInlineCost(CallSite CS, SmallPtrSet<const Function *, 16> &NeverInline);
};
}
Modified: llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp?rev=40560&r1=40559&r2=40560&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Fri Jul 27 13:34:27 2007
@@ -23,14 +23,15 @@
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/InlinerPass.h"
#include "llvm/Transforms/Utils/InlineCost.h"
-#include <set>
+#include "llvm/ADT/SmallPtrSet.h"
using namespace llvm;
namespace {
class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
- std::set<const Function*> NeverInline; // Functions that are never inlined
+ // Functions that are never inlined
+ SmallPtrSet<const Function*, 16> NeverInline;
InlineCostAnalyzer CA;
public:
SimpleInliner() : Inliner(&ID) {}
Modified: llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp?rev=40560&r1=40559&r2=40560&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp Fri Jul 27 13:34:27 2007
@@ -23,7 +23,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <vector>
-#include <set>
using namespace llvm;
@@ -65,7 +64,7 @@
private:
TargetData *TD;
std::vector<Function *> Functions;
- std::set<const Function *> NeverInline;
+ SmallPtrSet<const Function *, 16> NeverInline;
SmallPtrSet<Function *, 8> DeadFunctions;
InlineCostAnalyzer CA;
};
Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=40560&r1=40559&r2=40560&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Fri Jul 27 13:34:27 2007
@@ -141,7 +141,7 @@
// getInlineCost - The heuristic used to determine if we should inline the
// function call or not.
//
-int InlineCostAnalyzer::getInlineCost(CallSite CS, std::set<const Function *> &NeverInline) {
+int InlineCostAnalyzer::getInlineCost(CallSite CS, SmallPtrSet<const Function *, 16> &NeverInline) {
Instruction *TheCall = CS.getInstruction();
Function *Callee = CS.getCalledFunction();
const Function *Caller = TheCall->getParent()->getParent();
More information about the llvm-commits
mailing list