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

A location independent piece of tree::Tree code. More...

#include <basic-block.hh>

Collaboration diagram for canon::BasicBlock:

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 BasicBlockpush_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_typetrees_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.

Detailed Description

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.

Member Typedef Documentation

typedef tree::rTree canon::BasicBlock::rTree

Constructor & Destructor Documentation

canon::BasicBlock::BasicBlock ( tree_list_type::iterator  begin,
tree_list_type::iterator  end 
)
inline

Build a block with the instructions from begin to end.

Member Function Documentation

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

The incoming label (that of the first instruction).

References assertion, and trees_.

Referenced by dump().

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().

const BasicBlock * canon::BasicBlock::push_back ( const rTree tree)
inline

Append tree.

References trees_.

BasicBlock::tree_list_type & canon::BasicBlock::trees_get ( )
inline

The list of instructions of this.

References trees_.

Member Data Documentation

tree_list_type canon::BasicBlock::trees_
private

The Tree instructions.

Referenced by dump(), label_in_get(), labels_out_get(), push_back(), and trees_get().


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