[llvm-commits] [llvm] r40606 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Devang Patel
dpatel at apple.com
Mon Jul 30 14:10:45 PDT 2007
Author: dpatel
Date: Mon Jul 30 16:10:44 2007
New Revision: 40606
URL: http://llvm.org/viewvc/llvm-project?rev=40606&view=rev
Log:
Remove dead code.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=40606&r1=40605&r2=40606&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Mon Jul 30 16:10:44 2007
@@ -452,28 +452,22 @@
else
OrigIDom = OrigIDomNode->getBlock();
- // Initially use Orig's immediate dominator as NewBB's immediate dominator.
- BasicBlock *NewIDom = OrigIDom;
- DenseMap<const Value*, Value*>::iterator I = VM.find(OrigIDom);
- if (I != VM.end()) {
- // if (!DT->getNode(OrigIDom))
- // CloneDomInfo(NewIDom, OrigIDom, NewPreheader, OrigPreheader,
- // OrigHeader, DT, DF, VM);
-
- NewIDom = cast<BasicBlock>(I->second);
-
- // If NewIDom does not have corresponding dominatore tree node then
- // get one.
- if (!DT->getNode(NewIDom))
+ // Initially use Orig's immediate dominator as NewBB's immediate dominator.
+ BasicBlock *NewIDom = OrigIDom;
+ DenseMap<const Value*, Value*>::iterator I = VM.find(OrigIDom);
+ if (I != VM.end()) {
+ NewIDom = cast<BasicBlock>(I->second);
+
+ // If NewIDom does not have corresponding dominatore tree node then
+ // get one.
+ if (!DT->getNode(NewIDom))
CloneDomInfo(NewIDom, OrigIDom, NewPreheader, OrigPreheader,
OrigHeader, DT, DF, VM);
}
- // if (NewBB == NewIDom) {
- // DT->addNewBlock(NewBB, OrigIDom);
- // DT->changeImmediateDominator(NewBB, NewIDom);
- //} else
- DT->addNewBlock(NewBB, NewIDom);
-
+
+ DT->addNewBlock(NewBB, NewIDom);
+
+ // Copy cloned dominance frontiner set
DominanceFrontier::DomSetType NewDFSet;
if (DF) {
DominanceFrontier::iterator DFI = DF->find(Orig);
More information about the llvm-commits
mailing list