diff options
author | Devang Patel <dpatel@apple.com> | 2007-05-01 21:15:47 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-05-01 21:15:47 +0000 |
commit | 794fd75c67a2cdc128d67342c6d88a504d186896 (patch) | |
tree | 6b805aa4a576e9de6cbf096d2fb85063b3fb8fca /lib/Transforms/Instrumentation/RSProfiling.cpp | |
parent | e50fb9ac174b791047ffa8648443ab94b2097cd9 (diff) |
Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/RSProfiling.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/RSProfiling.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index f97b2bcd3e..ad9a841cb0 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -69,6 +69,7 @@ namespace { /// measuring framework overhead class VISIBILITY_HIDDEN NullProfilerRS : public RSProfilers { public: + static const int ID; // Pass identifcation, replacement for typeid bool isProfiling(Value* v) { return false; } @@ -80,7 +81,9 @@ namespace { } }; + const int RSProfilers::ID = 0; static RegisterAnalysisGroup<RSProfilers> A("Profiling passes"); + const int NullProfilerRS::ID = 0; static RegisterPass<NullProfilerRS> NP("insert-null-profiling-rs", "Measure profiling framework overhead"); static RegisterAnalysisGroup<RSProfilers, true> NPT(NP); @@ -138,6 +141,9 @@ namespace { /// ProfilerRS - Insert the random sampling framework struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + ProfilerRS() : FunctionPass((intptr_t)&ID) {} + std::map<Value*, Value*> TransCache; std::set<BasicBlock*> ChoicePoints; Chooser* c; @@ -154,6 +160,7 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const; }; + const int ProfilerRS::ID = 0; RegisterPass<ProfilerRS> X("insert-rs-profiling-framework", "Insert random sampling instrumentation framework"); } |