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  

fi Class Reference

#include <inliner.h>

Inheritance diagram for fi:

Phase List of all members.

Public Member Functions

void run ()
virtual void get_flags (str_list_p &arg)
virtual void usage ()

Member Function Documentation

virtual void Phase::get_flags str_list_p   arg [inline, virtual, inherited]
 

Reimplemented in vcgASTPhase, vcgCCGPhase, TreeCheckerPhase, and pointers_phase.

Definition at line 53 of file phase.h.

void fi::run void    [virtual]
 

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.

function_inline needs the map generated by identify_inlinees. By identifying call sites to be inlined in a separate pass, we avoid problems with recursion

Implements Phase.

Definition at line 77 of file inliner.cc.

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

virtual void Phase::usage   [inline, virtual, inherited]
 

Reimplemented in TreeCheckerPhase.

Definition at line 55 of file phase.h.

Referenced by Phase_entry::print().


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

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