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

Data Fields

struct cgraph_nodeclone
struct tm_regionall_tm_regions
bitmap irrevocable_blocks_normal
bitmap irrevocable_blocks_clone
bitmap transaction_blocks_normal
unsigned tm_callers_normal
unsigned tm_callers_clone
bool is_irrevocable
bool in_callee_queue
bool in_worklist
bool want_irr_scan_normal

Detailed Description

Interprocedual analysis for the creation of transactional clones.
   The aim of this pass is to find which functions are referenced in
   a non-irrevocable transaction context, and for those over which
   we have control (or user directive), create a version of the
   function which uses only the transactional interface to reference
   protected memories.  This analysis proceeds in several steps:

     (1) Collect the set of all possible transactional clones:

        (a) For all local public functions marked tm_callable, push
            it onto the tm_callee queue.

        (b) For all local functions, scan for calls in transaction blocks.
            Push the caller and callee onto the tm_caller and tm_callee
            queues.  Count the number of callers for each callee.

        (c) For each local function on the callee list, assume we will
            create a transactional clone.  Push *all* calls onto the
            callee queues; count the number of clone callers separately
            to the number of original callers.

     (2) Propagate irrevocable status up the dominator tree:

        (a) Any external function on the callee list that is not marked
            tm_callable is irrevocable.  Push all callers of such onto
            a worklist.

        (b) For each function on the worklist, mark each block that
            contains an irrevocable call.  Use the AND operator to
            propagate that mark up the dominator tree.

        (c) If we reach the entry block for a possible transactional
            clone, then the transactional clone is irrevocable, and
            we should not create the clone after all.  Push all
            callers onto the worklist.

        (d) Place tm_irrevocable calls at the beginning of the relevant
            blocks.  Special case here is the entry block for the entire
            transaction region; there we mark it GTMA_DOES_GO_IRREVOCABLE for
            the library to begin the region in serial mode.  Decrement
            the call count for all callees in the irrevocable region.

     (3) Create the transactional clones:

        Any tm_callee that still has a non-zero call count is cloned.
This structure is stored in the AUX field of each cgraph_node.   

Field Documentation

bool tm_ipa_cg_data::in_callee_queue
bool tm_ipa_cg_data::in_worklist
bitmap tm_ipa_cg_data::irrevocable_blocks_clone
bitmap tm_ipa_cg_data::irrevocable_blocks_normal
bool tm_ipa_cg_data::is_irrevocable
unsigned tm_ipa_cg_data::tm_callers_clone
unsigned tm_ipa_cg_data::tm_callers_normal
bitmap tm_ipa_cg_data::transaction_blocks_normal
bool tm_ipa_cg_data::want_irr_scan_normal

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