aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/OldPoolAllocate.cpp13
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp14
-rw-r--r--lib/Transforms/LevelRaise.cpp29
3 files changed, 34 insertions, 22 deletions
diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp
index 50f21e2397..eb463b8e13 100644
--- a/lib/Transforms/IPO/OldPoolAllocate.cpp
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -52,13 +52,18 @@ enum PtrSize {
Ptr8bits, Ptr16bits, Ptr32bits
};
-static cl::Enum<enum PtrSize> ReqPointerSize("ptrsize", 0,
- "Set pointer size for -poolalloc pass",
+static cl::opt<PtrSize>
+ReqPointerSize("poolalloc-ptr-size",
+ cl::desc("Set pointer size for -poolalloc pass"),
+ cl::values(
clEnumValN(Ptr32bits, "32", "Use 32 bit indices for pointers"),
clEnumValN(Ptr16bits, "16", "Use 16 bit indices for pointers"),
- clEnumValN(Ptr8bits , "8", "Use 8 bit indices for pointers"), 0);
+ clEnumValN(Ptr8bits , "8", "Use 8 bit indices for pointers"),
+ 0));
-static cl::Flag DisableRLE("no-pool-load-elim", "Disable pool load elimination after poolalloc pass", cl::Hidden);
+static cl::opt<bool>
+DisableRLE("no-pool-load-elim", cl::Hidden,
+ cl::desc("Disable pool load elimination after poolalloc pass"));
const Type *POINTERTYPE;
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 57230c6b77..3d5ff45ccf 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -12,8 +12,6 @@
#include "llvm/iMemory.h"
#include "llvm/iTerminators.h"
#include "llvm/iOther.h"
-#include "llvm/BasicBlock.h"
-#include "llvm/Function.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Assembly/Writer.h"
@@ -24,11 +22,13 @@
using std::vector;
using std::string;
-static cl::Flag DisablePtrHashing("tracedisablehashdisable",
- "Disable pointer hashing", cl::NoFlags);
+static cl::opt<bool>
+DisablePtrHashing("tracedisablehashdisable", cl::Hidden,
+ cl::desc("Disable pointer hashing"));
-static cl::StringList TraceFuncName ("tracefunc", "trace only specific funct"
- "ions", cl::NoFlags);
+static cl::list<string>
+TraceFuncName("tracefunc", cl::desc("trace only specific functions"),
+ cl::value_desc("function"));
// We trace a particular function if no functions to trace were specified
@@ -37,7 +37,7 @@ static cl::StringList TraceFuncName ("tracefunc", "trace only specific funct"
inline bool
TraceThisFunction(Function* func)
{
- if (TraceFuncName.getNumOccurances() == 0)
+ if (TraceFuncName.size() == 0)
return true;
return std::find(TraceFuncName.begin(), TraceFuncName.end(), func->getName())
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index 7e27c5f7f0..b4d1755544 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/lib/Transforms/LevelRaise.cpp
@@ -26,17 +26,24 @@ using std::cerr;
// raising pass to start at instruction "foo", which is immensely useful for
// debugging!
//
-static cl::String StartInst("raise-start-inst", "Start raise pass at the "
- "instruction with the specified name", cl::Hidden);
-
-static Statistic<> NumLoadStorePeepholes("raise\t\t- Number of load/store "
- "peepholes");
-static Statistic<> NumGEPInstFormed("raise\t\t- Number of other "
- "getelementptr's formed");
-static Statistic<> NumExprTreesConv("raise\t\t- Number of expression trees"
- " converted");
-static Statistic<> NumCastOfCast("raise\t\t- Number of cast-of-self removed");
-static Statistic<> NumDCEorCP("raise\t\t- Number of insts DCEd or constprop'd");
+static cl::opt<std::string>
+StartInst("raise-start-inst", cl::Hidden, cl::value_desc("inst name"),
+ cl::desc("Start raise pass at the instruction with the specified name"));
+
+static Statistic<>
+NumLoadStorePeepholes("raise\t\t- Number of load/store peepholes");
+
+static Statistic<>
+NumGEPInstFormed("raise\t\t- Number of other getelementptr's formed");
+
+static Statistic<>
+NumExprTreesConv("raise\t\t- Number of expression trees converted");
+
+static Statistic<>
+NumCastOfCast("raise\t\t- Number of cast-of-self removed");
+
+static Statistic<>
+NumDCEorCP("raise\t\t- Number of insts DCEd or constprop'd");
#define PRINT_PEEPHOLE(ID, NUM, I) \