LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
A location independent piece of tree::Tree code. More...
#include <basic-block.hh>
Public Types | |
typedef tree::rTree | rTree |
typedef tree::tree_list_type | tree_list_type |
Public Member Functions | |
BasicBlock (tree_list_type::iterator begin, tree_list_type::iterator end) | |
Build a block with the instructions from begin to end. | |
const BasicBlock * | push_back (const rTree &tree) |
Append tree. | |
temp::Label | label_in_get () const |
The incoming label (that of the first instruction). | |
temp::label_list_type | labels_out_get () const |
The list (one for Jump, two for CJump) of outgoing labels. | |
tree_list_type & | trees_get () |
The list of instructions of this. | |
std::ostream & | dump (std::ostream &ostr) const |
Report this on ostr. |
Private Attributes | |
tree_list_type | trees_ |
The Tree instructions. |
A location independent piece of tree::Tree code.
It starts with a tree::Label, ending with a tree::Jump or tree::CJump, and contains none of these three in between. Therefore, we may output it anywhere.
typedef tree::rTree canon::BasicBlock::rTree |
|
inline |
Build a block with the instructions from begin to end.
std::ostream & canon::BasicBlock::dump | ( | std::ostream & | ostr | ) | const |
Report this on ostr.
References misc::decindent(), misc::incendl(), label_in_get(), labels_out_get(), and trees_.
Referenced by canon::operator<<().
temp::Label canon::BasicBlock::label_in_get | ( | ) | const |
temp::label_list_type canon::BasicBlock::labels_out_get | ( | ) | const |
The list (one for Jump, two for CJump) of outgoing labels.
References tree::Jump::label_get(), tree::Cjump::labels_get(), precondition, and trees_.
Referenced by dump().
|
inline |
Append tree.
References trees_.
|
inline |
The list of instructions of this.
References trees_.
|
private |
The Tree instructions.
Referenced by dump(), label_in_get(), labels_out_get(), push_back(), and trees_get().