LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
regalloc::UselessMove Class Reference

Predicate (object function) checking whether an instruction is a useless MOVE according to the TEMPMAP, and deleting it. More...

Collaboration diagram for regalloc::UselessMove:

Public Member Functions

 UselessMove (const temp::TempMap &tempmap)
bool operator() (const assem::Instr *instr) const

Private Attributes

const temp::TempMaptempmap_

Detailed Description

Predicate (object function) checking whether an instruction is a useless MOVE according to the TEMPMAP, and deleting it.

Note that a better design would be to subclass std::list for list of pointers that ought to be deallocated, and then to specialize find_if to perform the delete itself.

Constructor & Destructor Documentation

regalloc::UselessMove::UselessMove ( const temp::TempMap tempmap)
inlineexplicit

Member Function Documentation

bool regalloc::UselessMove::operator() ( const assem::Instr instr) const
inline

References precondition, and tempmap_.

Member Data Documentation

const temp::TempMap& regalloc::UselessMove::tempmap_
private

Referenced by operator()().


The documentation for this class was generated from the following file: