Changes in directory llvm/lib/CodeGen:
IfConversion.cpp updated: 1.48 -> 1.49 --- Log message: If BB is predicated, invalidate its predecessor(s) which would if-convert it. It needs to be re-analyzed. --- Diffs of the changes: (+7 -3) IfConversion.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/IfConversion.cpp diff -u llvm/lib/CodeGen/IfConversion.cpp:1.48 llvm/lib/CodeGen/IfConversion.cpp:1.49 --- llvm/lib/CodeGen/IfConversion.cpp:1.48 Thu Jun 14 16:26:08 2007 +++ llvm/lib/CodeGen/IfConversion.cpp Thu Jun 14 18:13:19 2007 @@ -656,15 +656,19 @@ } /// ReTryPreds - Invalidate predecessor BB info so it would be re-analyzed -/// to determine if it can be if-converted. +/// to determine if it can be if-converted. If predecessor is already +/// enqueud, dequeue it! void IfConverter::ReTryPreds(MachineBasicBlock *BB) { for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(), E = BB->pred_end(); PI != E; ++PI) { BBInfo &PBBI = BBAnalysis[(*PI)->getNumber()]; - if (!PBBI.IsDone && PBBI.Kind == ICNotClassfied) { + if (PBBI.IsDone) + continue; + if (PBBI.Kind == ICNotClassfied) { assert(!PBBI.IsEnqueued && "Unexpected"); PBBI.IsAnalyzed = false; - } + } else if (PBBI.IsEnqueued && PBBI.BB != BB) + PBBI.IsEnqueued = false; } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits