GCC Middle and Back End API Reference
ref_to_bb Struct Reference
Collaboration diagram for ref_to_bb:

Data Fields

tree exp
 
HOST_WIDE_INT size
 
unsigned int phase
 
basic_block bb
 

Detailed Description

Auxiliary functions to determine the set of memory accesses which
can't trap because they are preceded by accesses to the same memory
portion.  We do that for MEM_REFs, so we only need to track
the SSA_NAME of the pointer indirectly referenced.  The algorithm
simply is a walk over all instructions in dominator order.  When
we see an MEM_REF we determine if we've already seen a same
ref anywhere up to the root of the dominator tree.  If we do the
current access can't trap.  If we don't see any dominating access
the current access might trap, but might also make later accesses
non-trapping, so we remember it.  We need to be careful with loads
or stores, for instance a load might not trap, while a store would,
so if we see a dominating read access this doesn't mean that a later
write access would not trap.  Hence we also need to differentiate the
type of access(es) seen.

??? We currently are very conservative and assume that a load might
trap even if a store doesn't (write-only memory).  This probably is
overly conservative.

We currently support a special case that for !TREE_ADDRESSABLE automatic
variables, it could ignore whether something is a load or store because the
local stack should be always writable.   
A hash-table of references (MEM_REF/ARRAY_REF/COMPONENT_REF), and in which
basic block an *_REF through it was seen, which would constitute a
no-trap region for same accesses.

Size is needed to support 2 MEM_REFs of different types, like
MEM<double>(s_1) and MEM<long>(s_1), which would compare equal with
OEP_ADDRESS_OF.   

Field Documentation

◆ bb

◆ exp

◆ phase

unsigned int ref_to_bb::phase

◆ size

HOST_WIDE_INT ref_to_bb::size

The documentation for this struct was generated from the following file: