Don't indent the entire function.

llvm-svn: 29093
This commit is contained in:
Owen Anderson 2006-07-10 22:03:18 +00:00
parent fbc80692e4
commit ae8aa646f1
1 changed files with 51 additions and 52 deletions

View File

@ -6255,14 +6255,14 @@ static bool DeadPHICycle(PHINode *PN, std::set<PHINode*> &PotentiallyDeadPHIs) {
// PHINode simplification
//
Instruction *InstCombiner::visitPHINode(PHINode &PN) {
// If LCSSA is around, don't nuke PHIs.
if (!mustPreserveAnalysisID(LCSSAID)) {
if (mustPreservePassID(LCSSAID)) return 0;
if (Value *V = PN.hasConstantValue())
return ReplaceInstUsesWith(PN, V);
// If the only user of this instruction is a cast instruction, and all of
//the incoming values are constants, change this PHI to merge together the
// casted constants.
// If the only user of this instruction is a cast instruction, and all of the
// incoming values are constants, change this PHI to merge together the casted
// constants.
if (PN.hasOneUse())
if (CastInst *CI = dyn_cast<CastInst>(PN.use_back()))
if (CI->getType() != PN.getType()) { // noop casts will be folded
@ -6296,9 +6296,9 @@ Instruction *InstCombiner::visitPHINode(PHINode &PN) {
if (Instruction *Result = FoldPHIArgOpIntoPHI(PN))
return Result;
// If this is a trivial cycle in the PHI node graph, remove it. Basically,
// if this PHI only has a single use (a PHI), and if that PHI only has one
// use (a PHI)... break the cycle.
// If this is a trivial cycle in the PHI node graph, remove it. Basically, if
// this PHI only has a single use (a PHI), and if that PHI only has one use (a
// PHI)... break the cycle.
if (PN.hasOneUse())
if (PHINode *PU = dyn_cast<PHINode>(PN.use_back())) {
std::set<PHINode*> PotentiallyDeadPHIs;
@ -6306,7 +6306,6 @@ Instruction *InstCombiner::visitPHINode(PHINode &PN) {
if (DeadPHICycle(PU, PotentiallyDeadPHIs))
return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType()));
}
}
return 0;
}