C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

function_inline Class Reference

#include <inliner.h>

Inheritance diagram for function_inline:

Changer List of all members.

Public Types

enum  Order { Preorder, Postorder, Both }
enum  Depth { Subtree, NodeOnly }

Public Member Functions

 function_inline (set< threeAddrNode * > &m, map< declNode *, procNode * > &m2, set< procNode * > &s1, set< procNode * > &s2)
virtual Node * at_threeAddr (threeAddrNode *ta, Order ord)
virtual Node * at_proc (procNode *p, Order ord)
void insert_proc (procNode *m)
void process (callGraph &cg)
Accessors
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.

bool delete_old () const
 Return whether this Changer deletes Nodes which are removed from the AST by "at_" methods.

"at_" methods
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 Node * at_node (Node *the_node, Order ord)
virtual Node * at_unit (unitNode *the_unit, Order ord)
virtual Node * at_def (defNode *the_def, Order ord)
virtual Node * at_decl (declNode *the_decl, Order ord)
virtual Node * at_subdecl (subdeclNode *the_subdecl, Order ord)
virtual Node * at_type (typeNode *the_type, Order ord)
virtual Node * at_prim (primNode *the_prim, Order ord)
virtual Node * at_tdef (tdefNode *the_tdef, Order ord)
virtual Node * at_ptr (ptrNode *the_ptr, Order ord)
virtual Node * at_array (arrayNode *the_array, Order ord)
virtual Node * at_func (funcNode *the_func, Order ord)
virtual Node * at_sue (sueNode *the_sue, Order ord)
virtual Node * at_struct (structNode *the_struct, Order ord)
virtual Node * at_union (unionNode *the_union, Order ord)
virtual Node * at_enum (enumNode *the_enum, Order ord)
virtual Node * at_suespec (suespecNode *the_suespec, Order ord)
virtual Node * at_expr (exprNode *the_expr, Order ord)
virtual Node * at_index (indexNode *the_index, Order ord)
virtual Node * at_const (constNode *the_const, Order ord)
virtual Node * at_id (idNode *the_id, Order ord)
virtual Node * at_binary (binaryNode *the_binary, Order ord)
virtual Node * at_unary (unaryNode *the_unary, Order ord)
virtual Node * at_cast (castNode *the_cast, Order ord)
virtual Node * at_comma (commaNode *the_comma, Order ord)
virtual Node * at_ternary (ternaryNode *the_ternary, Order ord)
virtual Node * at_call (callNode *the_call, Order ord)
virtual Node * at_initializer (initializerNode *the_initializer, Order ord)
virtual Node * at_stmt (stmtNode *the_stmt, Order ord)
virtual Node * at_block (blockNode *the_block, Order ord)
virtual Node * at_basicblock (basicblockNode *the_basicblock, Order ord)
virtual Node * at_exprstmt (exprstmtNode *the_exprstmt, Order ord)
virtual Node * at_target (targetNode *the_target, Order ord)
virtual Node * at_label (labelNode *the_label, Order ord)
virtual Node * at_case (caseNode *the_case, Order ord)
virtual Node * at_selection (selectionNode *the_selection, Order ord)
virtual Node * at_if (ifNode *the_if, Order ord)
virtual Node * at_switch (switchNode *the_switch, Order ord)
virtual Node * at_loop (loopNode *the_loop, Order ord)
virtual Node * at_while (whileNode *the_while, Order ord)
virtual Node * at_do (doNode *the_do, Order ord)
virtual Node * at_for (forNode *the_for, Order ord)
virtual Node * at_jump (jumpNode *the_jump, Order ord)
virtual Node * at_goto (gotoNode *the_goto, Order ord)
virtual Node * at_continue (continueNode *the_continue, Order ord)
virtual Node * at_break (breakNode *the_break, Order ord)
virtual Node * at_return (returnNode *the_return, Order ord)
virtual Node * at_attrib (attribNode *the_attrib, Order ord)
virtual Node * at_operand (operandNode *the_oper, Order ord)
virtual Node * at_conditiongoto (conditiongotoNode *the_condgoto, Order ord)
virtual Node * at_text (textNode *the_text, Order ord)

Static Public Member Functions

void inline_functions (procNode *root)

Private Member Functions

bool already_inlined_calls (callGraphNode *)
bool inlocalstack (procNode *p)
stmtNode * inliner (idNode *call, procNode *p, threeAddrNode *callsite)

Private Attributes

set< threeAddrNode * > & _callinline
map< declNode *, procNode * > & _procmap
set< procNode * > & _procs
set< procNode * > & _inlined
deque< procNode * > _callstack
deque< procNode * > _localcallstack

Detailed Description

This phase inlines all functions with type inline. It can be called from the command line with -fi. It needs both the cfg and a callgraph, so it calls both cfg_changer and callgraph_walker. This phase is NOT idempotent. It is idempotent assuming no recursive functions have been marked inline.

The function inliner works in two passes. The first identifies callsites which can/should be inlined. Under normal operation, it currently only inlines the call sites of functions of type inline. Hopefully, it will not be difficult to add other heuristics. The second pass inlines all call sites identified by the first pass.

After function inlining is complete, the code is re-dismantled to make certain all variables in each scope are unique.

Definition at line 72 of file inliner.h.


Member Enumeration Documentation

enum Changer::Depth [inherited]
 

Enumeration values:
Subtree 
NodeOnly 

Definition at line 148 of file changer.h.

enum Changer::Order [inherited]
 

Enumeration values:
Preorder 
Postorder 
Both 

Definition at line 147 of file changer.h.

Referenced by whileNode::change(), unitNode::change(), unionNode::change(), unaryNode::change(), threeAddrNode::change(), textNode::change(), ternaryNode::change(), tdefNode::change(), switchNode::change(), suespecNode::change(), subdeclNode::change(), structNode::change(), returnNode::change(), ptrNode::change(), procNode::change(), primNode::change(), operandNode::change(), metastmtNode::change(), metaexprNode::change(), labelNode::change(), initializerNode::change(), ifNode::change(), idNode::change(), gotoNode::change(), funcNode::change(), forNode::change(), exprstmtNode::change(), enumNode::change(), doNode::change(), declNode::change(), continueNode::change(), constNode::change(), conditiongotoNode::change(), commaNode::change(), castNode::change(), caseNode::change(), callNode::change(), breakNode::change(), blockNode::change(), binaryNode::change(), basicblockNode::change(), attribNode::change(), and arrayNode::change().


Constructor & Destructor Documentation

function_inline::function_inline (  set< threeAddrNode * > &    m,
map< declNode *, procNode * > &    m2,
set< procNode * > &    s1,
set< procNode * > &    s2
)  [inline]
 

Definition at line 78 of file inliner.h.

References _callinline, _inlined, _procmap, _procs, Changer::Both, and Changer::Subtree.


Member Function Documentation

bool function_inline::already_inlined_calls (  callGraphNode *    )  [private]
 

Definition at line 304 of file inliner.cc.

References _inlined, callgraph_edge_list, callgraph_edge_list_cp, callGraphNode::calls(), procNode::decl(), declNode::name(), and callGraphNode::proc().

Referenced by process().

virtual Node* Changer::at_array (  arrayNode *    the_array,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 253 of file changer.h.

References Changer::at_type().

Referenced by arrayNode::change().

virtual Node* Changer::at_attrib (  attribNode *    the_attrib,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 364 of file changer.h.

References Changer::at_stmt().

Referenced by attribNode::change().

virtual Node* Changer::at_basicblock (  basicblockNode *    the_basicblock,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in constantFoldingChanger.

Definition at line 313 of file changer.h.

References Changer::at_block().

Referenced by basicblockNode::change().

virtual Node* Changer::at_binary (  binaryNode *    the_binary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in SelectionDismantle, ArrowDismantle, and ExpressionDismantle.

Definition at line 286 of file changer.h.

References Changer::at_expr().

Referenced by binaryNode::change().

virtual Node* Changer::at_block (  blockNode *    the_block,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in StaticToGlobalDismantle, and InitializerDismantle.

Definition at line 310 of file changer.h.

References Changer::at_stmt().

Referenced by Changer::at_basicblock(), and blockNode::change().

virtual Node* Changer::at_break (  breakNode *    the_break,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in BreakContinueChanger.

Definition at line 358 of file changer.h.

References Changer::at_jump().

Referenced by breakNode::change().

virtual Node* Changer::at_call (  callNode *    the_call,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in ExpressionDismantle.

Definition at line 301 of file changer.h.

References Changer::at_expr().

Referenced by callNode::change().

virtual Node* Changer::at_case (  caseNode *    the_case,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 325 of file changer.h.

References Changer::at_target().

Referenced by caseNode::change().

virtual Node* Changer::at_cast (  castNode *    the_cast,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in ExpressionDismantle, and CastRemover.

Definition at line 292 of file changer.h.

References Changer::at_expr().

Referenced by castNode::change().

virtual Node* Changer::at_comma (  commaNode *    the_comma,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in ExpressionDismantle.

Definition at line 295 of file changer.h.

References Changer::at_expr().

Referenced by commaNode::change().

virtual Node* Changer::at_conditiongoto (  conditiongotoNode *    the_condgoto,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in constantPropChanger, constantFoldingChanger, and constantsChanger.

Definition at line 370 of file changer.h.

References Changer::at_goto().

Referenced by conditiongotoNode::change().

virtual Node* Changer::at_const (  constNode *    the_const,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 280 of file changer.h.

References Changer::at_index().

Referenced by constNode::change().

virtual Node* Changer::at_continue (  continueNode *    the_continue,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in BreakContinueChanger.

Definition at line 355 of file changer.h.

References Changer::at_jump().

Referenced by continueNode::change().

virtual Node* Changer::at_decl (  declNode *    the_decl,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger, StaticToGlobalDismantle, InitializerDismantle, FlattenDismantle, ref_clone_changer, and TreeFixer.

Definition at line 232 of file changer.h.

References Changer::at_def().

Referenced by Changer::at_subdecl(), and declNode::change().

virtual Node* Changer::at_def (  defNode *    the_def,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 229 of file changer.h.

References Changer::at_node().

Referenced by Changer::at_decl(), and Changer::at_proc().

virtual Node* Changer::at_do (  doNode *    the_do,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in LoopDismantle.

Definition at line 343 of file changer.h.

References Changer::at_loop().

Referenced by doNode::change().

virtual Node* Changer::at_enum (  enumNode *    the_enum,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 268 of file changer.h.

References Changer::at_sue().

Referenced by enumNode::change().

virtual Node* Changer::at_expr (  exprNode *    the_expr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in ipConstantsChanger.

Definition at line 274 of file changer.h.

References Changer::at_node().

Referenced by Changer::at_binary(), Changer::at_call(), Changer::at_cast(), Changer::at_comma(), Changer::at_index(), Changer::at_initializer(), Changer::at_operand(), Changer::at_ternary(), Changer::at_unary(), and metaexprNode::change().

virtual Node* Changer::at_exprstmt (  exprstmtNode *    the_exprstmt,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in SelectionDismantle, ExpressionDismantle, and FlattenDismantle.

Definition at line 316 of file changer.h.

References Changer::at_stmt().

Referenced by exprstmtNode::change().

virtual Node* Changer::at_for (  forNode *    the_for,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in LoopDismantle.

Definition at line 346 of file changer.h.

References Changer::at_loop().

Referenced by forNode::change().

virtual Node* Changer::at_func (  funcNode *    the_func,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 256 of file changer.h.

References Changer::at_type().

Referenced by funcNode::change().

virtual Node* Changer::at_goto (  gotoNode *    the_goto,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in FlattenDismantle.

Definition at line 352 of file changer.h.

References Changer::at_jump().

Referenced by Changer::at_conditiongoto(), and gotoNode::change().

virtual Node* Changer::at_id (  idNode *    the_id,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in UnusedDeclarationCleanupChanger, and constantsChanger.

Definition at line 283 of file changer.h.

References Changer::at_index().

Referenced by idNode::change().

virtual Node* Changer::at_if (  ifNode *    the_if,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in SelectionDismantle, and CFS_Changer.

Definition at line 331 of file changer.h.

References Changer::at_selection().

Referenced by ifNode::change().

virtual Node* Changer::at_index (  indexNode *    the_index,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 277 of file changer.h.

References Changer::at_expr().

Referenced by Changer::at_const(), and Changer::at_id().

virtual Node* Changer::at_initializer (  initializerNode *    the_initializer,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 304 of file changer.h.

References Changer::at_expr().

Referenced by initializerNode::change().

virtual Node* Changer::at_jump (  jumpNode *    the_jump,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 349 of file changer.h.

References Changer::at_stmt().

Referenced by Changer::at_break(), Changer::at_continue(), Changer::at_goto(), and Changer::at_return().

virtual Node* Changer::at_label (  labelNode *    the_label,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in LabelDismantle, FlattenDismantle, and ref_clone_changer.

Definition at line 322 of file changer.h.

References Changer::at_target().

Referenced by labelNode::change().

virtual Node* Changer::at_loop (  loopNode *    the_loop,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 337 of file changer.h.

References Changer::at_stmt().

Referenced by Changer::at_do(), Changer::at_for(), and Changer::at_while().

virtual Node* Changer::at_node (  Node *    the_node,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in ref_clone_changer.

Definition at line 223 of file changer.h.

Referenced by Changer::at_def(), Changer::at_expr(), Changer::at_stmt(), Changer::at_text(), Changer::at_type(), and Changer::at_unit().

virtual Node* Changer::at_operand (  operandNode *    the_oper,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 367 of file changer.h.

References Changer::at_expr().

Referenced by operandNode::change().

virtual Node* Changer::at_prim (  primNode *    the_prim,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 244 of file changer.h.

References Changer::at_type().

Referenced by primNode::change().

Node * function_inline::at_proc (  procNode *    p,
Order    ord
)  [virtual]
 

This function maintains the global call stack to handle recursion and mutual recursion

Reimplemented from Changer.

Definition at line 350 of file inliner.cc.

References _callstack, and Changer::Preorder.

virtual Node* Changer::at_ptr (  ptrNode *    the_ptr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 250 of file changer.h.

References Changer::at_type().

Referenced by ptrNode::change().

virtual Node* Changer::at_return (  returnNode *    the_return,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in SelectionDismantle, ReturnDismantle, FlattenDismantle, and constantPropChanger.

Definition at line 361 of file changer.h.

References Changer::at_jump().

Referenced by returnNode::change().

virtual Node* Changer::at_selection (  selectionNode *    the_selection,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 328 of file changer.h.

References Changer::at_stmt().

Referenced by Changer::at_if(), and Changer::at_switch().

virtual Node* Changer::at_stmt (  stmtNode *    the_stmt,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in TernaryDismantle, and SelectionDismantle.

Definition at line 307 of file changer.h.

References Changer::at_node().

Referenced by Changer::at_attrib(), Changer::at_block(), Changer::at_exprstmt(), Changer::at_jump(), Changer::at_loop(), Changer::at_selection(), Changer::at_target(), Changer::at_threeAddr(), and metastmtNode::change().

virtual Node* Changer::at_struct (  structNode *    the_struct,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 262 of file changer.h.

References Changer::at_sue().

Referenced by structNode::change().

virtual Node* Changer::at_subdecl (  subdeclNode *    the_subdecl,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 235 of file changer.h.

References Changer::at_decl().

Referenced by subdeclNode::change().

virtual Node* Changer::at_sue (  sueNode *    the_sue,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 259 of file changer.h.

References Changer::at_type().

Referenced by Changer::at_enum(), Changer::at_struct(), and Changer::at_union().

virtual Node* Changer::at_suespec (  suespecNode *    the_suespec,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 271 of file changer.h.

References Changer::at_type().

Referenced by suespecNode::change().

virtual Node* Changer::at_switch (  switchNode *    the_switch,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in SelectionDismantle, and ref_clone_changer.

Definition at line 334 of file changer.h.

References Changer::at_selection().

Referenced by switchNode::change().

virtual Node* Changer::at_target (  targetNode *    the_target,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 319 of file changer.h.

References Changer::at_stmt().

Referenced by Changer::at_case(), and Changer::at_label().

virtual Node* Changer::at_tdef (  tdefNode *    the_tdef,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger, and UpdateTdefChanger.

Definition at line 247 of file changer.h.

References Changer::at_type().

Referenced by tdefNode::change().

virtual Node* Changer::at_ternary (  ternaryNode *    the_ternary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in TernaryDismantle.

Definition at line 298 of file changer.h.

References Changer::at_expr().

Referenced by ternaryNode::change().

virtual Node* Changer::at_text (  textNode *    the_text,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 376 of file changer.h.

References Changer::at_node().

Referenced by textNode::change().

Node * function_inline::at_threeAddr (  threeAddrNode *    ta,
Order    ord
)  [virtual]
 

This function identifies callsites and calls the inliner

Reimplemented from Changer.

Definition at line 374 of file inliner.cc.

References _callinline, _callstack, _localcallstack, _procmap, idNode::decl(), Operator::FUNC_CALL, Id, inliner(), inlocalstack(), threeAddrNode::op(), Changer::Postorder, threeAddrNode::rhs1(), Node::typ(), and operandNode::var().

virtual Node* Changer::at_type (  typeNode *    the_type,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in TernaryDismantle, and ExpressionDismantle.

Definition at line 241 of file changer.h.

References Changer::at_node().

Referenced by Changer::at_array(), Changer::at_func(), Changer::at_prim(), Changer::at_ptr(), Changer::at_sue(), Changer::at_suespec(), and Changer::at_tdef().

virtual Node* Changer::at_unary (  unaryNode *    the_unary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger, and ExpressionDismantle.

Definition at line 289 of file changer.h.

References Changer::at_expr().

Referenced by unaryNode::change().

virtual Node* Changer::at_union (  unionNode *    the_union,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocSizeChanger.

Definition at line 265 of file changer.h.

References Changer::at_sue().

Referenced by unionNode::change().

virtual Node* Changer::at_unit (  unitNode *    the_unit,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in Dismantle, StaticToGlobalDismantle, and Optimizer.

Definition at line 226 of file changer.h.

References Changer::at_node().

Referenced by unitNode::change().

virtual Node* Changer::at_while (  whileNode *    the_while,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in LoopDismantle.

Definition at line 340 of file changer.h.

References Changer::at_loop().

Referenced by whileNode::change().

bool Changer::delete_old (    )  const [inline, inherited]
 

Return whether this Changer deletes Nodes which are removed from the AST by "at_" methods.

Definition at line 209 of file changer.h.

Referenced by subdeclNode::change(), change_list(), and Changer::Changer().

Depth Changer::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 204 of file changer.h.

void function_inline::inline_functions (  procNode *    root )  [static]
 

Use this for non-command line inlining. Root is the top of the call graph. If null, main will be used. The code is expected to be in cfg form.

Definition at line 134 of file inliner.cc.

References identify_inlinees::callinline(), Dismantle::dismantle(), findmain(), identify_inlinees::inlined(), insert_proc(), Linker::link(), Linker::procedure_declarations(), process(), identify_inlinees::procs(), CBZ::Program, and unit_list_p.

stmtNode * function_inline::inliner (  idNode *    call,
procNode *    proc,
threeAddrNode *    callsite
)  [private]
 

Formal arguments...

Local declarations...

Clone the call so we can cannibalize the actual arguments...

-- Use the initialize to pass the actual value

-- Important: set the decl location to BLOCK

-- Get the returned value

-- Copy the left-hand side of the binary node

-- Clone the procedure. Here we use the ref_clone because it preserves the internal references (that is, the local variable declaration pointers). That way we can use the name mangler to fix any conflicting variable names.

-- Remove the body...this is the return object. BUT, get the exit basic block first.

-- Fix the parameter passing: remove each formal parameter from the funcNode, use the actual argument from the callNode as the initializer, and add it to the block declarations of the body.

-- Assumption: last statement of the exit basic block is the return statement. This is true after the regular dismantle/CFG phase. Remove it.

-- If there is a returned value and a left-hand side at the callsite, then set up the appropriate assignment.

-- Create a new assignment statement and place it at the end of the basic block.

Definition at line 468 of file inliner.cc.

References threeAddrNode::arg_list(), funcNode::args(), ref_clone_changer::clone(), Node::coord(), procNode::decl(), decl_list, declNode::decl_location(), blockNode::decls(), procNode::exit(), procNode::get_body(), declNode::init(), funcNode::is_void_args(), threeAddrNode::lhs(), declNode::name(), operand_list, Return, procNode::return_decl(), blockNode::stmts(), Node::typ(), and declNode::type().

Referenced by at_threeAddr().

bool function_inline::inlocalstack (  procNode *    p )  [private]
 

Definition at line 453 of file inliner.cc.

References _localcallstack, procNode::decl(), and declNode::name().

Referenced by at_threeAddr().

void function_inline::insert_proc (  procNode *    m ) 
 

Definition at line 201 of file inliner.cc.

References _procs.

Referenced by inline_functions(), and fi::run().

Order Changer::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 196 of file changer.h.

Referenced by whileNode::change(), unitNode::change(), unionNode::change(), unaryNode::change(), threeAddrNode::change(), textNode::change(), ternaryNode::change(), tdefNode::change(), switchNode::change(), suespecNode::change(), subdeclNode::change(), structNode::change(), returnNode::change(), ptrNode::change(), procNode::change(), primNode::change(), operandNode::change(), metastmtNode::change(), metaexprNode::change(), labelNode::change(), initializerNode::change(), ifNode::change(), idNode::change(), gotoNode::change(), funcNode::change(), forNode::change(), exprstmtNode::change(), enumNode::change(), doNode::change(), declNode::change(), continueNode::change(), constNode::change(), conditiongotoNode::change(), commaNode::change(), castNode::change(), caseNode::change(), callNode::change(), breakNode::change(), blockNode::change(), binaryNode::change(), basicblockNode::change(), attribNode::change(), and arrayNode::change().

void function_inline::process (  callGraph &    cg ) 
 

Definition at line 210 of file inliner.cc.

References _inlined, _procs, already_inlined_calls(), callGraphNode::calls(), callGraph::lookup(), and proc_set_p.

Referenced by inline_functions(), and fi::run().


Member Data Documentation

set<threeAddrNode *>& function_inline::_callinline [private]
 

Definition at line 106 of file inliner.h.

Referenced by at_threeAddr(), and function_inline().

deque<procNode*> function_inline::_callstack [private]
 

Definition at line 111 of file inliner.h.

Referenced by at_proc(), and at_threeAddr().

set<procNode*>& function_inline::_inlined [private]
 

Definition at line 109 of file inliner.h.

Referenced by already_inlined_calls(), function_inline(), and process().

deque<procNode*> function_inline::_localcallstack [private]
 

Definition at line 112 of file inliner.h.

Referenced by at_threeAddr(), and inlocalstack().

map<declNode *, procNode *>& function_inline::_procmap [private]
 

Definition at line 107 of file inliner.h.

Referenced by at_threeAddr(), and function_inline().

set<procNode*>& function_inline::_procs [private]
 

Definition at line 108 of file inliner.h.

Referenced by function_inline(), insert_proc(), and process().


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

Generated on August 27, 2003
Back to the C-Breeze home page