From: Devang Patel Date: Fri, 27 Jul 2007 20:06:09 +0000 (+0000) Subject: Add facility to dump pass manager structure X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19fe8f907e4addad1a33b7590b3f05893c39b3a6;p=oota-llvm.git 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 --- diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index 5cbb77a7791..9b6f551f6d8 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 0cd1cfaa117..af0849d580b 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() {