GCC Middle and Back End API Reference
gori_map Class Reference

#include <gimple-range-gori.h>

Inheritance diagram for gori_map:
Collaboration diagram for gori_map:

Public Member Functions

 gori_map ()
 
 ~gori_map ()
 
bool is_export_p (tree name, basic_block bb=NULL)
 
bool is_import_p (tree name, basic_block bb)
 
bitmap exports (basic_block bb)
 
bitmap imports (basic_block bb)
 
void set_range_invariant (tree name, bool invariant=true)
 
void dump (FILE *f)
 
void dump (FILE *f, basic_block bb, bool verbose=true)
 
tree depend1 (tree name) const
 
tree depend2 (tree name) const
 
bool in_chain_p (tree name, tree def)
 
bool chain_import_p (tree name, tree import)
 
void register_dependency (tree name, tree ssa1, basic_block bb=NULL)
 
void dump (FILE *f, basic_block bb, const char *prefix=NULL)
 

Protected Member Functions

bool has_def_chain (tree name)
 
bool def_chain_in_bitmap_p (tree name, bitmap b)
 
void add_def_chain_to_bitmap (bitmap b, tree name)
 
bitmap get_def_chain (tree name)
 
bitmap get_imports (tree name)
 

Protected Attributes

bitmap_obstack m_bitmaps
 

Private Member Functions

void maybe_add_gori (tree name, basic_block bb)
 
void calculate_gori (basic_block bb)
 
void set_import (struct rdc &data, tree imp, bitmap b)
 

Private Attributes

vec< bitmapm_outgoing
 
vec< bitmapm_incoming
 
bitmap m_maybe_variant
 
vec< rdcm_def_chain
 
int m_logical_depth
 

Constructor & Destructor Documentation

◆ gori_map()

gori_map::gori_map ( )
GORI_MAP is used to accumulate what SSA names in a block can
generate range information, and provides tools for the block ranger
to enable it to efficiently calculate these ranges.

GORI stands for "Generates Outgoing Range Information."

It utilizes the range_def_chain class to construct def_chains.
Information for a basic block is calculated once and stored.  It is
only calculated the first time a query is made.  If no queries are
made, there is little overhead.

one bitmap is maintained for each basic block:
m_outgoing  : a set bit indicates a range can be generated for a name.

Generally speaking, the m_outgoing vector is the union of the
entire def_chain of all SSA names used in the last statement of the
block which generate ranges.   

References BITMAP_ALLOC, cfun, last_basic_block_for_fn, range_def_chain::m_bitmaps, m_incoming, m_maybe_variant, and m_outgoing.

◆ ~gori_map()

gori_map::~gori_map ( )

References m_incoming, and m_outgoing.

Member Function Documentation

◆ add_def_chain_to_bitmap()

void range_def_chain::add_def_chain_to_bitmap ( bitmap b,
tree name )
protectedinherited

◆ calculate_gori()

◆ chain_import_p()

bool range_def_chain::chain_import_p ( tree name,
tree import )
inherited

◆ def_chain_in_bitmap_p()

bool range_def_chain::def_chain_in_bitmap_p ( tree name,
bitmap b )
protectedinherited

◆ depend1()

tree range_def_chain::depend1 ( tree name) const
inlineinherited

◆ depend2()

tree range_def_chain::depend2 ( tree name) const
inlineinherited

◆ dump() [1/3]

void gori_map::dump ( FILE * f)

References cfun, dump(), and FOR_EACH_BB_FN.

Referenced by dump(), and ranger_cache::dump_bb().

◆ dump() [2/3]

◆ dump() [3/3]

◆ exports()

◆ get_def_chain()

◆ get_imports()

◆ has_def_chain()

bool range_def_chain::has_def_chain ( tree name)
inlineprotectedinherited

◆ imports()

◆ in_chain_p()

◆ is_export_p()

◆ is_import_p()

bool gori_map::is_import_p ( tree name,
basic_block bb )

◆ maybe_add_gori()

◆ register_dependency()

◆ set_import()

void range_def_chain::set_import ( struct rdc & data,
tree imp,
bitmap b )
privateinherited

◆ set_range_invariant()

void gori_map::set_range_invariant ( tree name,
bool invariant = true )

Field Documentation

◆ m_bitmaps

◆ m_def_chain

◆ m_incoming

vec<bitmap> gori_map::m_incoming
private

◆ m_logical_depth

int range_def_chain::m_logical_depth
privateinherited

◆ m_maybe_variant

bitmap gori_map::m_maybe_variant
private

◆ m_outgoing

vec<bitmap> gori_map::m_outgoing
private

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