1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Remove dependency on the structure of ValueHolder.

llvm-svn: 182
This commit is contained in:
Chris Lattner 2001-07-14 06:11:26 +00:00
parent f3410f8701
commit 10ff90d678

View File

@ -53,14 +53,13 @@ struct BasicBlockDCE {
};
template<class ValueSubclass, class ItemParentType, class DCEController>
static bool RemoveUnusedDefs(ValueHolder<ValueSubclass, ItemParentType> &Vals,
DCEController DCEControl) {
template<class Container, class DCEController>
static bool RemoveUnusedDefs(Container &Vals, DCEController DCEControl) {
bool Changed = false;
typedef ValueHolder<ValueSubclass, ItemParentType> Container;
int Offset = DCEController::EndOffs;
for (Container::iterator DI = Vals.begin(); DI != Vals.end()-Offset; ) {
for (typename Container::iterator DI = Vals.begin();
DI != Vals.end()-Offset; ) {
// Look for un"used" definitions...
if ((*DI)->use_empty() && DCEController::isDCEable(*DI)) {
// Bye bye