mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +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 {
|
||||
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:";
|
||||
if (I->first)
|
||||
WriteAsOperand(o, I->first, false);
|
||||
else
|
||||
o << " <<exit node>>";
|
||||
WriteAsOperand(o, I, false);
|
||||
o << " is:";
|
||||
if (I->second)
|
||||
WriteAsOperand(o, I->second, false);
|
||||
if (BasicBlock *ID = get(I))
|
||||
WriteAsOperand(o, ID, false);
|
||||
else
|
||||
o << " <<exit node>>";
|
||||
o << "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user