1//===- SimplifyCFG.cpp - Code to perform CFG simplification ---------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 1580 unchanged lines hidden (view full) --- 1589 return true; 1590} 1591 1592/// EliminateDuplicatePHINodes - Check for and eliminate duplicate PHI 1593/// nodes in this block. This doesn't try to be clever about PHI nodes 1594/// which differ only in the order of the incoming values, but instcombine 1595/// orders them so it usually won't matter. 1596/// |
1597bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) { |
1598 bool Changed = false; 1599 1600 // This implementation doesn't currently consider undef operands 1601 // specially. Theroetically, two phis which are identical except for 1602 // one having an undef where the other doesn't could be collapsed. 1603 1604 // Map from PHI hash values to PHI nodes. If multiple PHIs have 1605 // the same hash value, the element is the first PHI in the --- 502 unchanged lines hidden --- |