sail::DropVariable Class Reference

This instruction is optional and marks the last use of temporaries introduced by SAIL. More...

#include <DropVariable.h>

Inheritance diagram for sail::DropVariable:
sail::Instruction

List of all members.

Public Member Functions

 DropVariable (Variable *temp, bool is_temp)
Variableget_var ()
bool is_temp ()
virtual bool is_removable ()
virtual string to_string () const
virtual string to_string (bool pretty_print) const

Friends

class boost::serialization::access

Detailed Description

This instruction is optional and marks the last use of temporaries introduced by SAIL.

Since SAIL often introduces a very large number of temporaries, cleaning the temporaries up after their last use is often a good idea. DropVariable instructions are generated only if ADD_DROP_TEMP_INSTRUCTIONS defined in Function.h is set to true.


Member Function Documentation

bool sail::DropVariable::is_removable (  )  [virtual]

An instruction is removable if it's not present in the original source code, but introduced in the translation from the high-level language to the low-level language. For instance, if **x is an expression used in the original code, the low-level language will introduce a temporary t=*x; such instructions are "removable" for printing purposes.

Implements sail::Instruction.


The documentation for this class was generated from the following files:
Generated on Sun Oct 17 14:01:32 2010 by  doxygen 1.6.3