mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Change indentation of a whole bunch of code, no real changes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -305,9 +305,7 @@ bool ADCE::doADCE() {
|
||||
}
|
||||
});
|
||||
|
||||
// Find the first postdominator of the entry node that is alive. Make it the
|
||||
// new entry node...
|
||||
//
|
||||
// All blocks being live is a common case, handle it specially.
|
||||
if (AliveBlocks.size() == Func->size()) { // No dead blocks?
|
||||
for (Function::iterator I = Func->begin(), E = Func->end(); I != E; ++I) {
|
||||
// Loop over all of the instructions in the function deleting instructions
|
||||
@@ -319,14 +317,17 @@ bool ADCE::doADCE() {
|
||||
// unconditional branch), is not needed to make the decision of where to
|
||||
// go to, because all outgoing edges go to the same place. We must remove
|
||||
// the use of the condition (because it's probably dead), so we convert
|
||||
// the terminator to a conditional branch.
|
||||
// the terminator to an unconditional branch.
|
||||
//
|
||||
TerminatorInst *TI = I->getTerminator();
|
||||
if (!LiveSet.count(TI))
|
||||
convertToUnconditionalBranch(TI);
|
||||
}
|
||||
|
||||
} else { // If there are some blocks dead...
|
||||
return MadeChanges;
|
||||
}
|
||||
|
||||
|
||||
// If the entry node is dead, insert a new entry node to eliminate the entry
|
||||
// node as a special case.
|
||||
//
|
||||
@@ -349,10 +350,10 @@ bool ADCE::doADCE() {
|
||||
TerminatorInst *TI = BB->getTerminator();
|
||||
|
||||
// If the terminator instruction is alive, but the block it is contained
|
||||
// in IS alive, this means that this terminator is a conditional branch
|
||||
// on a condition that doesn't matter. Make it an unconditional branch
|
||||
// to ONE of the successors. This has the side effect of dropping a use
|
||||
// of the conditional value, which may also be dead.
|
||||
// in IS alive, this means that this terminator is a conditional branch on
|
||||
// a condition that doesn't matter. Make it an unconditional branch to
|
||||
// ONE of the successors. This has the side effect of dropping a use of
|
||||
// the conditional value, which may also be dead.
|
||||
if (!LiveSet.count(TI))
|
||||
TI = convertToUnconditionalBranch(TI);
|
||||
|
||||
@@ -370,18 +371,18 @@ bool ADCE::doADCE() {
|
||||
|
||||
// There is a special case here... if there IS no post-dominator for
|
||||
// the block we have no owhere to point our branch to. Instead,
|
||||
// convert it to a return. This can only happen if the code
|
||||
// branched into an infinite loop. Note that this may not be
|
||||
// desirable, because we _are_ altering the behavior of the code.
|
||||
// This is a well known drawback of ADCE, so in the future if we
|
||||
// choose to revisit the decision, this is where it should be.
|
||||
// convert it to a return. This can only happen if the code branched
|
||||
// into an infinite loop. Note that this may not be desirable,
|
||||
// because we _are_ altering the behavior of the code. This is a well
|
||||
// known drawback of ADCE, so in the future if we choose to revisit
|
||||
// the decision, this is where it should be.
|
||||
//
|
||||
if (LastNode == 0) { // No postdominator!
|
||||
// Call RemoveSuccessor to transmogrify the terminator instruction
|
||||
// to not contain the outgoing branch, or to create a new
|
||||
// terminator if the form fundamentally changes (i.e.,
|
||||
// unconditional branch to return). Note that this will change a
|
||||
// branch into an infinite loop into a return instruction!
|
||||
// to not contain the outgoing branch, or to create a new terminator
|
||||
// if the form fundamentally changes (i.e., unconditional branch to
|
||||
// return). Note that this will change a branch into an infinite
|
||||
// loop into a return instruction!
|
||||
//
|
||||
RemoveSuccessor(TI, i);
|
||||
|
||||
@@ -435,7 +436,6 @@ bool ADCE::doADCE() {
|
||||
//
|
||||
deleteDeadInstructionsInLiveBlock(BB);
|
||||
}
|
||||
}
|
||||
|
||||
// Loop over all of the basic blocks in the function, dropping references of
|
||||
// the dead basic blocks. We must do this after the previous step to avoid
|
||||
|
Reference in New Issue
Block a user