Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
lir_gen_walker Class Reference#include <lir_gen_walker.h>
Inheritance diagram for lir_gen_walker:
List of all members.
|
Public Types |
enum | Order { Preorder,
Postorder,
Both
} |
| The order in which AST Nodes should be visited. More...
|
enum | Depth { Subtree,
NodeOnly
} |
| Which Nodes in the AST tree should be visited. More...
|
Public Member Functions |
| lir_gen_walker () |
virtual void | at_unit (unitNode *the_unit, Order ord) |
virtual void | at_proc (procNode *the_proc, Order ord) |
virtual void | at_threeAddr (threeAddrNode *the_3addr, Order ord) |
virtual void | at_goto (gotoNode *the_goto, Order ord) |
virtual void | at_label (labelNode *the_label, Order ord) |
virtual void | at_conditiongoto (conditiongotoNode *the_condgoto, Order ord) |
virtual void | at_return (returnNode *the_return, Walker::Order ord) |
|
Methods to get and set fields in the class.
|
Order | order () const |
| Return the order in which Nodes of an AST should be visited.
|
Depth | depth () const |
| Return which Nodes of an AST should be visited.
|
|
Methods to get and set fields in the class.
|
Order | order () const |
| Return the order in which Nodes of an AST should be visited.
|
Depth | depth () const |
| Return which Nodes of an AST should be visited.
|
|
These methods define the functions that should be performed when different classes of Nodes are encountered in the AST. The most specific "at_" method that matches a given Node's class will be called.
|
virtual void | at_node (Node *the_node, Order ord) |
virtual void | at_def (defNode *the_def, Order ord) |
virtual void | at_decl (declNode *the_decl, Order ord) |
virtual void | at_subdecl (subdeclNode *the_subdecl, Order ord) |
virtual void | at_type (typeNode *the_type, Order ord) |
virtual void | at_prim (primNode *the_prim, Order ord) |
virtual void | at_tdef (tdefNode *the_tdef, Order ord) |
virtual void | at_ptr (ptrNode *the_ptr, Order ord) |
virtual void | at_array (arrayNode *the_array, Order ord) |
virtual void | at_func (funcNode *the_func, Order ord) |
virtual void | at_sue (sueNode *the_sue, Order ord) |
virtual void | at_struct (structNode *the_struct, Order ord) |
virtual void | at_union (unionNode *the_union, Order ord) |
virtual void | at_enum (enumNode *the_enum, Order ord) |
virtual void | at_suespec (suespecNode *the_suespec, Order ord) |
virtual void | at_expr (exprNode *the_expr, Order ord) |
virtual void | at_index (indexNode *the_index, Order ord) |
virtual void | at_const (constNode *the_const, Order ord) |
virtual void | at_id (idNode *the_id, Order ord) |
virtual void | at_binary (binaryNode *the_binary, Order ord) |
virtual void | at_unary (unaryNode *the_unary, Order ord) |
virtual void | at_cast (castNode *the_cast, Order ord) |
virtual void | at_comma (commaNode *the_comma, Order ord) |
virtual void | at_ternary (ternaryNode *the_ternary, Order ord) |
virtual void | at_call (callNode *the_call, Order ord) |
virtual void | at_initializer (initializerNode *the_initializer, Order ord) |
virtual void | at_stmt (stmtNode *the_stmt, Order ord) |
virtual void | at_block (blockNode *the_block, Order ord) |
virtual void | at_basicblock (basicblockNode *the_basicblock, Order ord) |
virtual void | at_exprstmt (exprstmtNode *the_exprstmt, Order ord) |
virtual void | at_target (targetNode *the_target, Order ord) |
virtual void | at_case (caseNode *the_case, Order ord) |
virtual void | at_selection (selectionNode *the_selection, Order ord) |
virtual void | at_if (ifNode *the_if, Order ord) |
virtual void | at_switch (switchNode *the_switch, Order ord) |
virtual void | at_loop (loopNode *the_loop, Order ord) |
virtual void | at_while (whileNode *the_while, Order ord) |
virtual void | at_do (doNode *the_do, Order ord) |
virtual void | at_for (forNode *the_for, Order ord) |
virtual void | at_jump (jumpNode *the_jump, Order ord) |
virtual void | at_continue (continueNode *the_continue, Order ord) |
virtual void | at_break (breakNode *the_break, Order ord) |
virtual void | at_return (returnNode *the_return, Order ord) |
virtual void | at_attrib (attribNode *the_attrib, Order ord) |
virtual void | at_operand (operandNode *the_oper, Order ord) |
virtual void | at_text (textNode *the_text, Order ord) |
Private Member Functions |
expr_list * | flatten_init (exprNode *) |
virtual void | gen_global_decl (defNode *) |
virtual void | gen_arg_decl (declNode *, AllocToMemWalker &) |
virtual void | gen_local_decl (declNode *, AllocToMemWalker &) |
virtual void | gen_assignment (threeAddrNode *) |
virtual void | gen_simple_assignment (threeAddrNode *) |
virtual void | gen_unary_assignment (threeAddrNode *) |
virtual void | gen_binary_assignment (threeAddrNode *) |
virtual void | gen_call_assignment (threeAddrNode *) |
virtual void | gen_conditional_branch (conditiongotoNode *) |
virtual void | gen_goto (gotoNode *) |
virtual void | gen_label (labelNode *) |
virtual void | gen_return (returnNode *) |
virtual void | gen_call (threeAddrNode *) |
virtual pair< Register, declNode * > | gen_load (indexNode *) |
virtual pair< Register, declNode * > | gen_load (operandNode *) |
virtual int | field_offset (operandNode *) |
virtual pair< reg_or_const,
declNode * > | index_offset (operandNode *) |
virtual pair< Register, declNode * > | load_global (operandNode *) |
virtual pair< Register, declNode * > | load_global_ea (operandNode *) |
virtual pair< Register, declNode * > | load_global_value (operandNode *) |
virtual pair< Register, declNode * > | load_global_var (idNode *) |
virtual pair< Register, declNode * > | load_global_addr (idNode *) |
virtual pair< Register, declNode * > | load_stack (operandNode *) |
virtual pair< Register, declNode * > | load_stack_ea (operandNode *) |
virtual pair< Register, declNode * > | load_stack_value (operandNode *) |
virtual pair< Register, declNode * > | load_stack_var (idNode *) |
virtual pair< Register, declNode * > | load_stack_addr (idNode *) |
virtual pair< Register, declNode * > | load_const (constNode *the_const) |
virtual void | gen_store (operandNode *, Register, declNode *) |
virtual void | store_global (operandNode *, Register, declNode *) |
virtual void | store_stack (operandNode *, Register, declNode *) |
virtual void | gen_move (Register dest, declNode *, Register src, declNode *) |
bool | needs_conversion (typeNode *, typeNode *) |
virtual pair< Register, declNode * > | gen_conversion (typeNode *, Register, declNode *) |
Static Private Member Functions |
void | init_maps (void) |
Private Attributes |
unitNode * | _unit |
procNode * | _proc |
storage_alloc | _alloc |
Static Private Attributes |
map< unsigned int, BinaryInstProc > | binary_map |
map< unsigned int, UnaryInstProc > | unary_map |
map< unsigned int, Compare_type > | opid_cmptype_map |
Member Enumeration Documentation
enum Walker::Depth [inherited]
|
|
|
Which Nodes in the AST tree should be visited.
- Enumeration values:
-
Subtree |
The entire AST should be traversed. |
NodeOnly |
Only the root Node should be visited. |
Definition at line 155 of file walker.h. |
enum Walker::Order [inherited]
|
|
|
The order in which AST Nodes should be visited.
- Enumeration values:
-
Preorder |
Nodes should be visited before their children. |
Postorder |
Nodes should be visited after their children. |
Both |
Nodes should be visited both before and after their children. |
Definition at line 147 of file walker.h.
Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk(). |
Constructor & Destructor Documentation
lir_gen_walker::lir_gen_walker |
( |
|
) |
|
|
Member Function Documentation
virtual void Walker::at_array |
( |
arrayNode * |
the_array, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_attrib |
( |
attribNode * |
the_attrib, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_basicblock |
( |
basicblockNode * |
the_basicblock, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_binary |
( |
binaryNode * |
the_binary, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_block |
( |
blockNode * |
the_block, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_break |
( |
breakNode * |
the_break, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_call |
( |
callNode * |
the_call, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_case |
( |
caseNode * |
the_case, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_cast |
( |
castNode * |
the_cast, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_comma |
( |
commaNode * |
the_comma, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_const |
( |
constNode * |
the_const, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_continue |
( |
continueNode * |
the_continue, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_decl |
( |
declNode * |
the_decl, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
|
Reimplemented in AllocToMemWalker, NodeLocator, W, vcgASTWalker, id_lookup_walker, name_mangle_walker, semcheck_walker, TreeChecker, ProcWalker, print_walker, has_struct_walker, and UnificationBasedPtr.
Definition at line 233 of file walker.h.
References Walker::at_def().
Referenced by Walker::at_subdecl(), and declNode::walk(). |
virtual void Walker::at_def |
( |
defNode * |
the_def, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_do |
( |
doNode * |
the_do, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_enum |
( |
enumNode * |
the_enum, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_expr |
( |
exprNode * |
the_expr, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
|
Reimplemented in NodeLocator, and remove_stale_type_walker.
Definition at line 275 of file walker.h.
References Walker::at_node().
Referenced by Walker::at_binary(), Walker::at_call(), Walker::at_cast(), Walker::at_comma(), Walker::at_index(), Walker::at_initializer(), Walker::at_operand(), Walker::at_ternary(), Walker::at_unary(), and metaexprNode::walk(). |
virtual void Walker::at_exprstmt |
( |
exprstmtNode * |
the_exprstmt, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_for |
( |
forNode * |
the_for, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_func |
( |
funcNode * |
the_func, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
void lir_gen_walker::at_goto |
( |
gotoNode * |
the_goto, |
|
|
Order |
ord |
|
) |
[virtual] |
|
virtual void Walker::at_id |
( |
idNode * |
the_id, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
|
Reimplemented in vcgASTWalker, callGraph, RequiresGatherer, clear_ids_walker, id_lookup_walker, Linker, name_mangle_walker, ref_fix_walker, TreeChecker, print_walker, renumber_walker, and count_walker.
Definition at line 284 of file walker.h.
References Walker::at_index().
Referenced by idNode::walk(). |
virtual void Walker::at_if |
( |
ifNode * |
the_if, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_index |
( |
indexNode * |
the_index, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_initializer |
( |
initializerNode * |
the_initializer, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_jump |
( |
jumpNode * |
the_jump, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
void lir_gen_walker::at_label |
( |
labelNode * |
the_label, |
|
|
Order |
ord |
|
) |
[virtual] |
|
virtual void Walker::at_loop |
( |
loopNode * |
the_loop, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_node |
( |
Node * |
the_node, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
|
Reimplemented in gcWalker, goto_label_walker, set_container_walker, sue_complete_walker, TreeChecker, and df_number_walker.
Definition at line 223 of file walker.h.
Referenced by Walker::at_def(), Walker::at_expr(), Walker::at_stmt(), Walker::at_text(), Walker::at_type(), and Walker::at_unit(). |
virtual void Walker::at_operand |
( |
operandNode * |
the_oper, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_prim |
( |
primNode * |
the_prim, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
void lir_gen_walker::at_proc |
( |
procNode * |
the_proc, |
|
|
Order |
ord |
|
) |
[virtual] |
|
|
Reimplemented from Walker.
Definition at line 113 of file lir_gen_walker.cc.
References _alloc, _proc, CBZ::ArchInfo, funcNode::args(), CBZFAIL, decl_list_p, gen_arg_decl(), gen_local_decl(), arch_info::get_stack_extra_top(), procNode::instructions(), Walker::Preorder, and storage_alloc::reset(). |
virtual void Walker::at_ptr |
( |
ptrNode * |
the_ptr, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_return |
( |
returnNode * |
the_return, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_selection |
( |
selectionNode * |
the_selection, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_stmt |
( |
stmtNode * |
the_stmt, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
|
Reimplemented in NodeLocator, W, init_flowproblem_walker, and LivenessWalker.
Definition at line 308 of file walker.h.
References Walker::at_node().
Referenced by Walker::at_attrib(), Walker::at_block(), Walker::at_exprstmt(), Walker::at_jump(), Walker::at_loop(), Walker::at_selection(), Walker::at_target(), Walker::at_threeAddr(), and metastmtNode::walk(). |
virtual void Walker::at_struct |
( |
structNode * |
the_struct, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_subdecl |
( |
subdeclNode * |
the_subdecl, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_sue |
( |
sueNode * |
the_sue, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_suespec |
( |
suespecNode * |
the_suespec, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_switch |
( |
switchNode * |
the_switch, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_target |
( |
targetNode * |
the_target, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_tdef |
( |
tdefNode * |
the_tdef, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_ternary |
( |
ternaryNode * |
the_ternary, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_text |
( |
textNode * |
the_text, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_type |
( |
typeNode * |
the_type, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_unary |
( |
unaryNode * |
the_unary, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
virtual void Walker::at_union |
( |
unionNode * |
the_union, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
void lir_gen_walker::at_unit |
( |
unitNode * |
the_unit, |
|
|
Order |
ord |
|
) |
[virtual] |
|
virtual void Walker::at_while |
( |
whileNode * |
the_while, |
|
|
Order |
ord |
|
) |
[inline, virtual, inherited] |
|
Depth Walker::depth |
( |
|
) |
const [inline, inherited] |
|
|
Return which Nodes of an AST should be visited.
A value of SubTree specifies that the entire AST should be traversed. A value of NodeOnly specifies that only the root Node in the AST should be visited.
Definition at line 211 of file walker.h.
Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), ternaryNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), arrayNode::walk(), and Walker::Walker(). |
int lir_gen_walker::field_offset |
( |
operandNode * |
|
) |
[private, virtual] |
|
|
Definition at line 615 of file lir_gen_walker.cc.
References typeNode::alloc_align(), decl_list_p, suespecNode::fields(), operandNode::fields(), typeNode::follow_tdefs(), id_list_p, AllocSizeChanger::size(), sueNode::spec(), operandNode::star(), operandNode::type(), typeNode::type(), and operandNode::var().
Referenced by store_global(), and store_stack(). |
|
Definition at line 281 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_register, declNode::Storage_location::_stack_offset, declNode::Storage_location::_type, procNode::alloc_stack_local(), storage_alloc::assign_arg_register(), storage_alloc::assign_arg_stack(), declNode::decl_location(), declNode::FORMAL, procNode::instructions(), typeNode::is_ellipsis(), typeNode::is_void(), AllocToMemWalker::needsMem(), LirUtil::new_auto_decl(), declNode::no_tdef_type(), CBZ::NoRegAlloc, declNode::storage_location(), declNode::Storage_location::storageloc_register, declNode::Storage_location::storageloc_stack, and declNode::type().
Referenced by at_proc(). |
void lir_gen_walker::gen_assignment |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_binary_assignment |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
|
Definition at line 411 of file lir_gen_walker.cc.
References _alloc, _proc, typeNode::alloc_size(), binary_map, constant::constant(), gen_load(), gen_store(), storage_alloc::get_temp_var(), procNode::instructions(), threeAddrNode::lhs(), operandNode::noncast_type(), threeAddrNode::op(), Ptr, threeAddrNode::rhs1(), threeAddrNode::rhs2(), operandNode::type(), and typeNode::type().
Referenced by gen_assignment(). |
void lir_gen_walker::gen_call |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
|
Definition at line 525 of file lir_gen_walker.cc.
References _proc, typeNode::alloc_align(), typeNode::alloc_size(), CBZ::ArchInfo, threeAddrNode::arg_list(), DATA_CONTENTS_STACKP, gen_load(), gen_move(), arch_info::get_regs_param_fixed(), arch_info::get_regs_param_float(), arch_info::get_stack_extra_bottom(), Register::getRegSp(), procNode::instructions(), operand_list, operand_list_p, and AllocSizeChanger::size().
Referenced by at_threeAddr(), and gen_call_assignment(). |
void lir_gen_walker::gen_call_assignment |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_conditional_branch |
( |
conditiongotoNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_global_decl |
( |
defNode * |
|
) |
[private, virtual] |
|
|
Definition at line 218 of file lir_gen_walker.cc.
References declNode::Storage_location::_type, _unit, typeNode::alloc_size(), primNode::basic(), declNode::decl_location(), expr_list, expr_list_p, declNode::EXTERN, flatten_init(), declNode::init(), unitNode::instructions(), typeNode::is_aggregate(), basic_type::is_char(), basic_type::is_float(), basic_type::is_int(), basic_type::is_long(), typeNode::is_pointer(), basic_type::is_short(), declNode::name(), LIR::StaticDataChar(), LIR::StaticDataDouble(), LIR::StaticDataInt(), LIR::StaticDataLong(), LIR::StaticDataShort(), LIR::StaticDataSingle(), LIR::StaticDataString(), LIR::StaticDataUninit(), declNode::storage_class(), declNode::storage_location(), declNode::Storage_location::storageloc_mem_global, declNode::TOP, declNode::type(), and declNode::TYPEDEF.
Referenced by at_unit(), and load_const(). |
void lir_gen_walker::gen_goto |
( |
gotoNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_label |
( |
labelNode * |
|
) |
[private, virtual] |
|
|
Definition at line 589 of file lir_gen_walker.cc.
References CBZFAIL, idNode::decl(), declNode::decl_location(), load_const(), load_global_var(), load_stack_var(), and declNode::TOP.
Referenced by gen_binary_assignment(), gen_call(), gen_conditional_branch(), gen_simple_assignment(), and gen_unary_assignment(). |
|
Definition at line 332 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_register, declNode::Storage_location::_type, procNode::alloc_stack_local(), storage_alloc::assign_register(), declNode::BLOCK, declNode::decl_location(), Register::getRegRetVal(), declNode::init(), procNode::instructions(), AllocToMemWalker::needsMem(), declNode::no_tdef_type(), CBZ::NoRegAlloc, procNode::return_decl(), declNode::STATIC, declNode::storage_class(), declNode::storage_location(), and declNode::Storage_location::storageloc_register.
Referenced by at_proc(). |
void lir_gen_walker::gen_return |
( |
returnNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_simple_assignment |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::gen_unary_assignment |
( |
threeAddrNode * |
|
) |
[private, virtual] |
|
void lir_gen_walker::init_maps |
( |
void |
|
) |
[static, private] |
|
|
Definition at line 61 of file lir_gen_walker.cc.
References LIR::Add(), binary_map, LIR::BitwiseAND(), LIR::BitwiseNOT(), LIR::BitwiseOR(), LIR::BitwiseShiftLeft(), LIR::BitwiseShiftRight(), LIR::BitwiseXOR(), cmp_EQ, cmp_GE, cmp_GT, cmp_LE, cmp_LT, cmp_NE, LIR::Div(), Operator::EQ, Operator::GE, Operator::LE, Operator::LS, LIR::Mod(), LIR::Mul(), Operator::NE, LIR::Neg(), opid_cmptype_map, Operator::RS, LIR::Sub(), Operator::UMINUS, and unary_map.
Referenced by lir_gen_walker(). |
|
Definition at line 1062 of file lir_gen_walker.cc.
References _alloc, _proc, CBZ::ArchInfo, constant::constant(), gen_global_decl(), storage_alloc::get_temp_var(), arch_info::instruction_supports_immediate(), procNode::instructions(), constant::is_str(), declNode::name(), LirUtil::new_static_global(), constant::no_val(), exprNode::type(), and exprNode::value().
Referenced by gen_load(). |
|
Definition at line 843 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_type, constant::constant(), idNode::decl(), storage_alloc::get_temp_var(), procNode::instructions(), idNode::name(), declNode::storage_location(), and exprNode::type().
Referenced by gen_load(), and store_global(). |
|
Definition at line 948 of file lir_gen_walker.cc.
References declNode::Storage_location::_register, declNode::Storage_location::_stack_offset, declNode::Storage_location::_type, constant::constant(), DATA_CONTENTS_FRAMEP, idNode::decl(), Register::getRegFp(), Ptr, declNode::storage_location(), declNode::Storage_location::storageloc_register, Node::typ(), and exprNode::type().
Referenced by load_stack(). |
|
Definition at line 1027 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_register, declNode::Storage_location::_stack_offset, declNode::Storage_location::_type, CBZFAIL, DATA_CONTENTS_FRAMEP, idNode::decl(), storage_alloc::get_temp_var(), Register::getRegFp(), procNode::instructions(), declNode::storage_location(), declNode::Storage_location::storageloc_register, declNode::Storage_location::storageloc_stack, and exprNode::type().
Referenced by gen_load(), and store_stack(). |
Order Walker::order |
( |
|
) |
const [inline, inherited] |
|
|
Return the order in which Nodes of an AST should be visited.
Nodes can be visited before their children (Preorder), after their children (Postorder), or both (Both).
Definition at line 203 of file walker.h.
Referenced by df_number_walker::at_node(), whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk(). |
|
Definition at line 1124 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_type, constant::constant(), idNode::decl(), field_offset(), storage_alloc::get_temp_ptr(), operandNode::index(), index_offset(), procNode::instructions(), load_global_addr(), load_global_var(), idNode::name(), Ptr, operandNode::star(), declNode::storage_location(), LIR::Store(), LIR::StoreStatic(), Node::typ(), operandNode::type(), exprNode::type(), and operandNode::var().
Referenced by gen_store(). |
|
Definition at line 1212 of file lir_gen_walker.cc.
References _alloc, _proc, declNode::Storage_location::_register, declNode::Storage_location::_stack_offset, declNode::Storage_location::_type, constant::constant(), DATA_CONTENTS_FRAMEP, idNode::decl(), field_offset(), operandNode::fields(), gen_move(), storage_alloc::get_temp_ptr(), Register::getRegFp(), operandNode::index(), index_offset(), procNode::instructions(), load_stack_var(), Ptr, operandNode::star(), declNode::storage_location(), declNode::Storage_location::storageloc_register, Node::typ(), operandNode::type(), exprNode::type(), and operandNode::var().
Referenced by gen_store(). |
Member Data Documentation
|
Definition at line 136 of file lir_gen_walker.h.
Referenced by at_proc(), gen_arg_decl(), gen_binary_assignment(), gen_local_decl(), gen_unary_assignment(), load_const(), load_global_addr(), load_global_var(), load_stack_addr(), load_stack_var(), store_global(), and store_stack(). |
procNode* lir_gen_walker::_proc [private]
|
|
|
Definition at line 133 of file lir_gen_walker.h.
Referenced by at_proc(), gen_arg_decl(), gen_binary_assignment(), gen_call(), gen_conditional_branch(), gen_goto(), gen_label(), gen_local_decl(), gen_move(), gen_return(), gen_unary_assignment(), load_const(), load_global_addr(), load_global_var(), load_stack_addr(), load_stack_var(), store_global(), and store_stack(). |
unitNode* lir_gen_walker::_unit [private]
|
|
map< unsigned int, BinaryInstProc > lir_gen_walker::binary_map [static, private]
|
|
map< unsigned int, Compare_type > lir_gen_walker::opid_cmptype_map [static, private]
|
|
map< unsigned int, UnaryInstProc > lir_gen_walker::unary_map [static, private]
|
|
The documentation for this class was generated from the following files:
|