mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Remove dependency on the structure of ValueHolder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e545981a6a
commit
20a155f5ab
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user