
Go to the source code of this file.
| #define prompf_INCLUDED "prompf.h" |
Description:
This file contains classes which implement a transaction log for PROMPF. The transaction log is used to map original construct ids to transformed construct ids. Currently the transaction log is only implemented for preopt and LNO up through automatic parallel- ization, but excluding tiling.
Exported types and functions:
class PROMPF_LINES
Implements a collection of line number ranges. Each range is stored in Low(i)..High(i). Line numbers must be non-negative integers. In every case, Low(i) <= High(i) and High(i) < Low(i+1). There are a total of Sections() collections of ranges.
class PROMPF_TRANS_TYPE
Implements transaction types for the transaction log. The following transactions are supported:
MPF_UNKNOWN: Unknown transaction type. MPF_MARK_F90_LOWER: Statrt recording trans for F90 lowering MPF_MARK_OMP: Start recording trans for OMP prelowering MPF_MARK_PREOPT: Start recording trans for preopt MPF_MARK_PRELNO: Start recording trans for LNO before and including parallelization MPF_MARK_POSTLNO: Start recording trans for LNO after parallelization MPF_ELIMINATION: Eliminate a loop during LNO MPF_FUSION: Fuse together two loops MPF_FISSION: Perform fission on a loop nest MPF_DISTRIBUTION: Apply distribution to an SNL MPF_INTERCHANGE: Permute perfectly nested set of loops MPF_PRE_PEEL: Peel a loop nest and place peeled portion before the loop nest MPF_POST_PEEL: Peel a loop nest and place peeled portion after the loop nest. MPF_MP_TILE: Processor tile a loop for parallelization MPF_DSM_TILE: Processor tile a loop with affinity for some lego reshaped array MPF_DONEST_OUTER_TILE: Create a processor tile while converting a doacross nest to a doacross MPF_DONEST_MIDDLE_TILE: Create a middle tile loop while converting a doacross nest to a doacross MPF_DSM_LOCAL: Create a loop to copy out an array which is a lego reshaped array appearing in a LASTLOCAL clause on an MP loop MPF_DSM_IO: Create a loop to copy a lego reshaped array into a temp array or vice versa. MPF_SINGLE_PROCESS: Create a single process. MPF_MP_VERSION: Make serial and parallel versions of an doacross loop or parallel region. MPF_PARALLEL_REGION: Create a parallel region. MPF_HOIST_MESSY_BOUNDS: Create clones while hoisting messy bounds MPF_DOACROSS_SYNC: Create a synchronization loop for a doacross with automatically generated synchronization MPF_DOACROSS_OUTER_TILE: Create a parallel outer tile loop for doacross with synchronization MPF_DOACROSS_INNER_TILE: Create a serial inner tile loop for doacross with synchronization MPF_REMOVE_UNITY_TRIP: Remove a unity trip loop. MPF_CACHE_WINDDOWN: Create a windown version of the cache tiled loops. MPF_INTERLEAVED_WINDDOWN: Create a windown version of the middle loop of an MP tiled loop with interleaved schedule MPF_GENERAL_VERSION: Version a loop nest so that we can apply a general SNL transformation. MPF_CACHE_TILE: Tile a loop for the cache. MPF_REGISTER_WINDDOWN: Create a winddown version of register tiled loop. MPF_REGISTER_SSTRIP: Indicate that a small strip version of a nest of register tiled loops had been created. MPF_REGISTER_TILE: Indicate that a loop has been register tiled. MPF_REGISTER_STARTUP: Create a startup loop nest for general register tiling. MPF_REGISTER_SHUTDOWN: Create a shutdown loop nest for general register tiling. MPF_SE_TILE: Indicate that a loop has been scalar expansion tiled. MPF_SE_CACHE_TILE: Indicate that a loop has been tiled for scalar expansion and cache. MPF_INNER_FISSION: Indicate that an inner loop has been fissioned into a set of inner loops MPF_GATHER_SCATTER: Indicate that an inner loop has been fissioned into a set of inner loops during gather-scatter MPF_VINTR_FISSION: Indicate that an inner loop has been fissioned into a set of inner loops during vector intrinsic fission MPF_PREFETCH_VERSION: Version a loop nest for prefetching MPF_OMPL_SECTIONS_LOOP: Lower an OMP SECTIONS construct to a loop MPF_OMPL_ELIM_SECTION: Eliminate a SECTION because the corresponding SECTIONS clause was converted into a loop MPF_OMPL_ATOMIC_CSECTION: Lower an OMP ATOMIC directive to a CRITICAL SECTION MPF_OMPL_ATOMIC_SWAP: Lower an OMP ATOMIC directive to a compare and swap operation MPF_OMPL_ATOMIC_FETCHOP: Lower an OMP ATOMIC directive to a fetch and op intrinsic. MPF_OMPL_MASTER_IF: Lower an OMP MASTER directive to an if. MPF_OMPL_FETCHOP_ATOMIC: Create an atomic directive for an unsupported fetch and op intrinsic. MPF_F90_ARRAY_STMT: Create a loop from an F90 array statement MPF_OUTER_SHACKLE: Create an outer shackle loop MPF_INNER_SHACKLE: Create an inner shackle loop from an original loop MPF_PREOPT_CREATE: Create a DO_LOOP by raising a WHILE loop or unstructured control flow loop.
class PROMPF_CHAIN_TYPE
For each enumeration value of PROMPF_TRANS_TYPE, assigns a value: MPF_CHAIN_INVALID: For MPF_UNKNOWN. MPF_CHAIN_TRANSFORM: Indicates that loops are created or destroyed during the transformation MPF_CHAIN_TRANSMIT: Indicates that loops are moved around during the transformation.
PROMPF_CHAIN_TYPE prompf_chain[]
Maintains the mapping from PROMPF_TRANS_TYPE to PROMPF_CHAIN_ TYPE.
class PROMPF_TRANS
Represents a transaction in the transformation log.
class PROMPF_ID_TYPE
Represents an original or transformed id in the transaction log.
enum PROMPF_TRANS_LOG
One value for each of five transaction logs we currently generate in PROMPF: PTL_F90_LOWER: Transformations done during F90 lowering PTL_OMP: Transformations done during OMP prelowering PTL_PREOPT: Transformations done duting Pre-optimizer PTL_PRELNO: Transformations done in LNO before parallelization PTL_POSTLNO: Transformations done in LNO after parallelization
class PROMPF_INFO
Represents a transformation transaction log.
WN_MAP Prompf_Id_Map;
The Id Map which folds the current valid of the id for each of the PROMPF constructs.
PROMPF_INFO* Prompf_Info;
Pointer to the global PROMPF_INFO used to store LNO's transfor- mation transaction log.
PROMPF_ID_TYPE Prompf_Id_Type(WN* wn_ref, WN* wn_region, BOOL* is_first)
Returns the PROMPF_ID_TYPE corresponding to the node 'wn_ref'. Returns MPID_UNKNOWN if this node is not one for which we should construct a PROMPF_ID. Returns TRUE in 'is_first' if 'wn' should be the first node with its PROMP map id, FALSE otherwise. The 'wn_region' is the closest enclosing OPC_REGION node, if there is one.
void Prompf_Assign_Ids(WN* wn_old, WN* wn_new, STACK<INT>* old_stack, STACK<INT>* new_stack, BOOL copy_ids, INT max_ids=INT32_MAX);
Traverse the old code 'wn_old' and the new code 'wn_new' simulanteously, and assign new PROMPF ids to nodes in the new code which don't have them, but which correspond to nodes in the old code. When a new id is assigned in the new code, push the old WN* on the 'old_stack' and the new WN* on the 'new_stack'. Assign a maximum of 'max_ids' new ids in the new code. If 'copy_ids', then duplicate the ids in the new code rather than assigning new ids.
| enum PROMPF_CHAIN_TYPE |
| enum PROMPF_ID_TYPE |
| enum PROMPF_TRANS_LOG |
| enum PROMPF_TRANS_TYPE |
| void Prompf_Assign_Ids | ( | WN * | wn_old, | |
| WN * | wn_new, | |||
| STACK< WN * > * | old_stack, | |||
| STACK< WN * > * | new_stack, | |||
| BOOL | copy_ids, | |||
| INT | max_ids = INT32_MAX | |||
| ) |
Definition at line 2787 of file prompf.cxx.
References Prompf_Assign_Ids_Traverse().

| PROMPF_ID_TYPE Prompf_Id_Type | ( | WN * | wn_ref, | |
| WN * | wn_region, | |||
| BOOL * | is_first = NULL | |||
| ) |
Definition at line 908 of file prompf.cxx.
References Is_Grandparent_Region(), NULL, OPC_DO_LOOP, OPC_FUNC_ENTRY, OPC_PRAGMA, OPC_REGION, OPC_XPRAGMA, WN_first(), WN_opcode(), WN_pragma(), WN_pragma_arg1(), WN_PRAGMA_ATOMIC, WN_PRAGMA_BARRIER, WN_PRAGMA_CRITICAL_SECTION_BEGIN, WN_PRAGMA_CRITICAL_SECTION_END, WN_PRAGMA_DOACROSS, WN_PRAGMA_MASTER_BEGIN, WN_PRAGMA_ORDERED_BEGIN, WN_PRAGMA_ORDERED_END, WN_PRAGMA_PARALLEL_BEGIN, WN_PRAGMA_PARALLEL_DO, WN_PRAGMA_PARALLEL_SECTIONS, WN_PRAGMA_PDO_BEGIN, WN_PRAGMA_PSECTION_BEGIN, WN_PRAGMA_SECTION, WN_PRAGMA_SINGLE_PROCESS_BEGIN, and WN_region_pragmas.
Referenced by PROMPF_INFO::Check_Traverse(), and PROMPF_INFO::Prompf_Info_Traverse().

Definition at line 81 of file prompf.cxx.
Definition at line 769 of file config.cxx.
Definition at line 71 of file prompf.cxx.
Referenced by Anl_Fini(), and Anl_Static_Analysis().
Definition at line 72 of file prompf.cxx.
Referenced by Anl_Fini(), and Anl_Static_Analysis().
1.7.1