Reapply r138695. Fix PassManager stack depths.

Patch by Xiaoyi Guo!

llvm-svn: 138737
This commit is contained in:
Andrew Trick
2011-08-29 17:07:00 +00:00
parent d6238f4717
commit 0896621a50
8 changed files with 42 additions and 31 deletions

View File

@@ -73,8 +73,8 @@ static void createDebugInfoProbe() {
char LPPassManager::ID = 0;
LPPassManager::LPPassManager(int Depth)
: FunctionPass(ID), PMDataManager(Depth) {
LPPassManager::LPPassManager()
: FunctionPass(ID), PMDataManager() {
skipThisLoop = false;
redoThisLoop = false;
LI = NULL;
@@ -357,8 +357,8 @@ void LoopPass::assignPassManager(PMStack &PMS,
assert (!PMS.empty() && "Unable to create Loop Pass Manager");
PMDataManager *PMD = PMS.top();
// [1] Create new Call Graph Pass Manager
LPPM = new LPPassManager(PMD->getDepth() + 1);
// [1] Create new Loop Pass Manager
LPPM = new LPPassManager();
LPPM->populateInheritedAnalysis(PMS);
// [2] Set up new manager's top level manager