mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Added documentation. Constant fold terminators.
llvm-svn: 106
This commit is contained in:
parent
44cd71222f
commit
81bbbcfe1f
@ -165,10 +165,19 @@ private:
|
|||||||
BBWorkList.push_back(BB); // Add the block to the work list!
|
BBWorkList.push_back(BB); // Add the block to the work list!
|
||||||
}
|
}
|
||||||
|
|
||||||
void OperandChangedState(User *U);
|
|
||||||
void UpdateInstruction(Instruction *I);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// UpdateInstruction - Something changed in this instruction... Either an
|
||||||
|
// operand made a transition, or the instruction is newly executable. Change
|
||||||
|
// the value type of I to reflect these changes if appropriate.
|
||||||
|
//
|
||||||
|
void UpdateInstruction(Instruction *I);
|
||||||
|
|
||||||
|
// OperandChangedState - This method is invoked on all of the users of an
|
||||||
|
// instruction that was just changed state somehow.... Based on this
|
||||||
|
// information, we need to update the specified user of this instruction.
|
||||||
|
//
|
||||||
|
void OperandChangedState(User *U);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -259,9 +268,12 @@ bool SCCP::doSCCP() {
|
|||||||
|
|
||||||
// Hey, we just changed something!
|
// Hey, we just changed something!
|
||||||
MadeChanges = true;
|
MadeChanges = true;
|
||||||
} else {
|
continue; // Skip the ++II at the end of the loop here...
|
||||||
++II;
|
} else if (Inst->isTerminator()) {
|
||||||
|
MadeChanges |= ConstantFoldTerminator((TerminatorInst*)Inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++II;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge identical constants last: this is important because we may have just
|
// Merge identical constants last: this is important because we may have just
|
||||||
@ -491,7 +503,6 @@ void SCCP::OperandChangedState(User *U) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DoSparseConditionalConstantProp - Use Sparse Conditional Constant Propogation
|
// DoSparseConditionalConstantProp - Use Sparse Conditional Constant Propogation
|
||||||
// to prove whether a value is constant and whether blocks are used.
|
// to prove whether a value is constant and whether blocks are used.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user