Changes in directory llvm/lib/Transforms/Instrumentation:
BlockProfiling.cpp updated: 1.23 -> 1.24 EdgeProfiling.cpp updated: 1.13 -> 1.14 RSProfiling.cpp updated: 1.25 -> 1.26 RSProfiling.h updated: 1.5 -> 1.6 --- Log message: Use 'static const char' instead of 'static const int'. Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. --- Diffs of the changes: (+12 -12) BlockProfiling.cpp | 8 ++++---- EdgeProfiling.cpp | 4 ++-- RSProfiling.cpp | 10 +++++----- RSProfiling.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.23 llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.24 --- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.23 Tue May 1 16:15:47 2007 +++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp Wed May 2 16:39:19 2007 @@ -33,11 +33,11 @@ namespace { class VISIBILITY_HIDDEN FunctionProfiler : public RSProfilers_std { public: - static const int ID; + static const char ID; bool runOnModule(Module &M); }; - const int FunctionProfiler::ID = 0; + const char FunctionProfiler::ID = 0; RegisterPass<FunctionProfiler> X("insert-function-profiling", "Insert instrumentation for function profiling"); @@ -84,10 +84,10 @@ class BlockProfiler : public RSProfilers_std { bool runOnModule(Module &M); public: - static const int ID; + static const char ID; }; - const int BlockProfiler::ID = 0; + const char BlockProfiler::ID = 0; RegisterPass<BlockProfiler> Y("insert-block-profiling", "Insert instrumentation for block profiling"); RegisterAnalysisGroup<RSProfilers> YG(Y); Index: llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.13 llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.14 --- llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.13 Tue May 1 16:15:47 2007 +++ llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp Wed May 2 16:39:19 2007 @@ -33,11 +33,11 @@ class VISIBILITY_HIDDEN EdgeProfiler : public ModulePass { bool runOnModule(Module &M); public: - static const int ID; // Pass identifcation, replacement for typeid + static const char ID; // Pass identifcation, replacement for typeid EdgeProfiler() : ModulePass((intptr_t)&ID) {} }; - const int EdgeProfiler::ID = 0; + const char EdgeProfiler::ID = 0; RegisterPass<EdgeProfiler> X("insert-edge-profiling", "Insert instrumentation for edge profiling"); } Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.25 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.26 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.25 Wed May 2 15:37:47 2007 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Wed May 2 16:39:19 2007 @@ -69,7 +69,7 @@ /// measuring framework overhead class VISIBILITY_HIDDEN NullProfilerRS : public RSProfilers { public: - static const int ID; // Pass identifcation, replacement for typeid + static const char ID; // Pass identifcation, replacement for typeid bool isProfiling(Value* v) { return false; } @@ -139,7 +139,7 @@ /// ProfilerRS - Insert the random sampling framework struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass { - static const int ID; // Pass identifcation, replacement for typeid + static const char ID; // Pass identifcation, replacement for typeid ProfilerRS() : FunctionPass((intptr_t)&ID) {} std::map<Value*, Value*> TransCache; @@ -162,9 +162,9 @@ "Insert random sampling instrumentation framework"); } -const int RSProfilers::ID = 0; -const int NullProfilerRS::ID = 0; -const int ProfilerRS::ID = 0; +const char RSProfilers::ID = 0; +const char NullProfilerRS::ID = 0; +const char ProfilerRS::ID = 0; //Local utilities static void ReplacePhiPred(BasicBlock* btarget, Index: llvm/lib/Transforms/Instrumentation/RSProfiling.h diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.5 llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.6 --- llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.5 Tue May 1 16:15:47 2007 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.h Wed May 2 16:39:19 2007 @@ -17,7 +17,7 @@ /// RSProfilers_std - a simple support class for profilers that handles most /// of the work of chaining and tracking inserted code. struct RSProfilers_std : public RSProfilers { - static const int ID; + static const char ID; std::set<Value*> profcode; // Lookup up values in profcode virtual bool isProfiling(Value* v); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits