All low-level instructions defined by SAIL inherit from Instruction. More...
#include <Instruction.h>
Public Member Functions | |
virtual string | to_string () const =0 |
virtual string | to_string (bool pretty_print) const =0 |
il::node * | get_original_node () |
virtual bool | is_save_instruction () |
virtual instruction_type | get_instruction_id () |
virtual bool | is_removable ()=0 |
void | get_rhs_symbols (set< Symbol * > &syms) |
void | get_symbols (set< Symbol * > &syms) |
Public Attributes | |
int | line |
Protected Attributes | |
il::node * | original |
instruction_type | inst_id |
Friends | |
class | boost::serialization::access |
All low-level instructions defined by SAIL inherit from Instruction.
instruction_type sail::Instruction::get_instruction_id | ( | ) | [virtual] |
il::node * sail::Instruction::get_original_node | ( | ) |
This function provides the mapping between the low and the high-level representations.
Reimplemented in sail::Assignment, sail::Assume, sail::AssumeSize, and sail::StaticAssert.
bool sail::Instruction::is_removable | ( | ) | [pure 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.
Implemented in sail::AddressLabel, sail::AddressString, sail::AddressVar, sail::ArrayRefRead, sail::ArrayRefWrite, sail::Assembly, sail::Assignment, sail::Assume, sail::AssumeSize, sail::Binop, sail::Branch, sail::Cast, sail::DropVariable, sail::FieldRefRead, sail::FieldRefWrite, sail::FunctionCall, sail::FunctionPointerCall, sail::Jump, sail::Label, sail::Load, sail::LoopInvocationInstruction, sail::StaticAssert, sail::Store, and sail::Unop.