mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aee7940d53
commit
f6437a3023
@ -211,15 +211,13 @@ bool ImmediateDominators::runOnFunction(Function &F) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ImmediateDominatorsBase::print(std::ostream &o) const {
|
void ImmediateDominatorsBase::print(std::ostream &o) const {
|
||||||
for (const_iterator I = begin(), E = end(); I != E; ++I) {
|
Function *F = getRoots()[0]->getParent();
|
||||||
|
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
|
||||||
o << " Immediate Dominator For Basic Block:";
|
o << " Immediate Dominator For Basic Block:";
|
||||||
if (I->first)
|
WriteAsOperand(o, I, false);
|
||||||
WriteAsOperand(o, I->first, false);
|
|
||||||
else
|
|
||||||
o << " <<exit node>>";
|
|
||||||
o << " is:";
|
o << " is:";
|
||||||
if (I->second)
|
if (BasicBlock *ID = get(I))
|
||||||
WriteAsOperand(o, I->second, false);
|
WriteAsOperand(o, ID, false);
|
||||||
else
|
else
|
||||||
o << " <<exit node>>";
|
o << " <<exit node>>";
|
||||||
o << "\n";
|
o << "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user