This instruction is optional and marks the last use of temporaries introduced by SAIL. More...
#include <DropVariable.h>
Public Member Functions | |
DropVariable (Variable *temp, bool is_temp) | |
Variable * | get_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 |
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.
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.