diff options
author | Devang Patel <dpatel@apple.com> | 2007-07-27 20:06:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-07-27 20:06:09 +0000 |
commit | 19fe8f907e4addad1a33b7590b3f05893c39b3a6 (patch) | |
tree | ea2359973e6de3d5393fd918ee87cd54e8c256bd | |
parent | b116fac90f9b54142ac511a30b4d45b54d3508ba (diff) |
Add facility to dump pass manager structure
to make it easier to understand failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40567 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/PassManagers.h | 5 | ||||
-rw-r--r-- | lib/VMCore/PassManager.cpp | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index 5cbb77a779..9b6f551f6d 100644 --- a/include/llvm/PassManagers.h +++ b/include/llvm/PassManagers.h @@ -227,10 +227,7 @@ public: /// Add RequiredPass into list of lower level passes required by pass P. /// RequiredPass is run on the fly by Pass Manager when P requests it /// through getAnalysis interface. - virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { - assert (0 && - "Unable to handle Pass that requires lower level Analysis pass"); - } + virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); virtual Pass * getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { assert (0 && "Unable to find on the fly pass"); diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 0cd1cfaa11..af0849d580 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -907,6 +907,18 @@ void PMDataManager::dumpAnalysisSetInfo(const char *Msg, Pass *P, } } +/// Add RequiredPass into list of lower level passes required by pass P. +/// RequiredPass is run on the fly by Pass Manager when P requests it +/// through getAnalysis interface. +/// This should be handled by specific pass manager. +void PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { + if (TPM) { + TPM->dumpArguments(); + TPM->dumpPasses(); + } + assert (0 && "Unable to handle Pass that requires lower level Analysis pass"); +} + // Destructor PMDataManager::~PMDataManager() { |