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

Data Fields

unsigned int ssa_name_ver
unsigned int phase
bool store
HOST_WIDE_INT offset
HOST_WIDE_INT size
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. A hash-table of SSA_NAMEs, and in which basic block an MEM_REF through it was seen, which would constitute a no-trap region for same accesses.


Field Documentation

basic_block name_to_bb::bb
HOST_WIDE_INT name_to_bb::offset
unsigned int name_to_bb::phase
HOST_WIDE_INT name_to_bb::size
unsigned int name_to_bb::ssa_name_ver
bool name_to_bb::store

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