[llvm-commits] [poolalloc] r58516 - in /poolalloc/trunk: include/poolalloc/PoolAllocate.h lib/PoolAllocate/PoolAllocate.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Oct 31 09:52:16 PDT 2008
Author: alenhar2
Date: Fri Oct 31 11:52:16 2008
New Revision: 58516
URL: http://llvm.org/viewvc/llvm-project?rev=58516&view=rev
Log:
add safecode as a commandline option too
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=58516&r1=58515&r2=58516&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Fri Oct 31 11:52:16 2008
@@ -26,6 +26,7 @@
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/VectorExtras.h"
#include "llvm/ADT/hash_set.h"
+#include "llvm/Support/CommandLine.h"
#include "dsa/DataStructure.h"
#include "poolalloc/Config/config.h"
@@ -41,6 +42,8 @@
namespace PA {
+ extern cl::opt<bool> PA_SAFECODE;
+
class Heuristic;
/// FuncInfo - Represent the pool allocation information for one function in
@@ -179,7 +182,7 @@
intptr_t IDp = (intptr_t) (&ID))
: ModulePass((intptr_t)IDp),
PassAllArguments(passAllArguments)
- {SAFECodeEnabled = BoundsChecksEnabled = SAFECode;}
+ {SAFECodeEnabled = BoundsChecksEnabled = SAFECode | PA::PA_SAFECODE;}
virtual bool runOnModule(Module &M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=58516&r1=58515&r2=58516&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Fri Oct 31 11:52:16 2008
@@ -46,6 +46,8 @@
const Type *PoolAllocate::PoolDescPtrTy = 0;
+cl::opt<bool> PA::PA_SAFECODE("pa-safecode", cl::ReallyHidden);
+
#if 0
#define TIME_REGION(VARNAME, DESC) \
NamedRegionTimer VARNAME(DESC)
More information about the llvm-commits
mailing list