mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
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
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user