Classes | Defines | Enumerations | Functions | Variables

prompf.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PROMPF_LINES
class  PROMPF_TRANS
class  PROMPF_ID
class  PROMPF_INFO

Defines

#define prompf_INCLUDED   "prompf.h"

Enumerations

enum  PROMPF_TRANS_TYPE {
  MPF_UNKNOWN, MPF_MARK_F90_LOWER, MPF_MARK_OMP, MPF_MARK_PREOPT,
  MPF_MARK_PRELNO, MPF_MARK_POSTLNO, MPF_ELIMINATION, MPF_FUSION,
  MPF_FISSION, MPF_DISTRIBUTION, MPF_INTERCHANGE, MPF_PRE_PEEL,
  MPF_POST_PEEL, MPF_MP_TILE, MPF_DSM_TILE, MPF_DONEST_OUTER_TILE,
  MPF_DONEST_MIDDLE_TILE, MPF_DSM_LOCAL, MPF_DSM_IO, MPF_SINGLE_PROCESS,
  MPF_MP_VERSION, MPF_PARALLEL_REGION, MPF_HOIST_MESSY_BOUNDS, MPF_DOACROSS_SYNC,
  MPF_DOACROSS_OUTER_TILE, MPF_DOACROSS_INNER_TILE, MPF_REMOVE_UNITY_TRIP, MPF_CACHE_WINDDOWN,
  MPF_INTERLEAVED_WINDDOWN, MPF_GENERAL_VERSION, MPF_CACHE_TILE, MPF_REGISTER_WINDDOWN,
  MPF_REGISTER_SSTRIP, MPF_REGISTER_TILE, MPF_REGISTER_STARTUP, MPF_REGISTER_SHUTDOWN,
  MPF_SE_TILE, MPF_SE_CACHE_TILE, MPF_INNER_FISSION, MPF_GATHER_SCATTER,
  MPF_VINTR_FISSION, MPF_PREFETCH_VERSION, MPF_OMPL_SECTIONS_LOOP, MPF_OMPL_ELIM_SECTION,
  MPF_OMPL_ATOMIC_CSECTION, MPF_OMPL_ATOMIC_SWAP, MPF_OMPL_ATOMIC_FETCHOP, MPF_OMPL_MASTER_IF,
  MPF_OMPL_FETCHOP_ATOMIC, MPF_F90_ARRAY_STMT, MPF_OUTER_SHACKLE, MPF_INNER_SHACKLE,
  MPF_PREOPT_CREATE
}
enum  PROMPF_CHAIN_TYPE { MPF_CHAIN_INVALID, MPF_CHAIN_TRANSFORM, MPF_CHAIN_TRANSMIT }
enum  PROMPF_ID_TYPE {
  MPID_UNKNOWN, MPID_FUNC_ENTRY, MPID_DO_LOOP, MPID_PAR_REGION,
  MPID_PAR_SECTION, MPID_SECTION, MPID_BARRIER, MPID_SINGLE_PROCESS,
  MPID_CRITICAL_SECTION, MPID_MASTER, MPID_ORDERED, MPID_PAR_SECTIONS,
  MPID_ATOMIC
}
enum  PROMPF_TRANS_LOG {
  PTL_F90_LOWER, PTL_OMP, PTL_PREOPT, PTL_PRELNO,
  PTL_POSTLNO
}

Functions

PROMPF_ID_TYPE Prompf_Id_Type (WN *wn_ref, WN *wn_region, BOOL *is_first=NULL)
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)

Variables

PROMPF_CHAIN_TYPE prompf_chain []
WN_MAP Prompf_Id_Map
PROMPF_INFOPrompf_Info
MEM_POOL PROMPF_pool

Define Documentation

#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.

Definition at line 221 of file prompf.h.


Enumeration Type Documentation

Enumerator:
MPF_CHAIN_INVALID 
MPF_CHAIN_TRANSFORM 
MPF_CHAIN_TRANSMIT 

Definition at line 279 of file prompf.h.

Enumerator:
MPID_UNKNOWN 
MPID_FUNC_ENTRY 
MPID_DO_LOOP 
MPID_PAR_REGION 
MPID_PAR_SECTION 
MPID_SECTION 
MPID_BARRIER 
MPID_SINGLE_PROCESS 
MPID_CRITICAL_SECTION 
MPID_MASTER 
MPID_ORDERED 
MPID_PAR_SECTIONS 
MPID_ATOMIC 

Definition at line 339 of file prompf.h.

Enumerator:
PTL_F90_LOWER 
PTL_OMP 
PTL_PREOPT 
PTL_PRELNO 
PTL_POSTLNO 

Definition at line 372 of file prompf.h.

Enumerator:
MPF_UNKNOWN 
MPF_MARK_F90_LOWER 
MPF_MARK_OMP 
MPF_MARK_PREOPT 
MPF_MARK_PRELNO 
MPF_MARK_POSTLNO 
MPF_ELIMINATION 
MPF_FUSION 
MPF_FISSION 
MPF_DISTRIBUTION 
MPF_INTERCHANGE 
MPF_PRE_PEEL 
MPF_POST_PEEL 
MPF_MP_TILE 
MPF_DSM_TILE 
MPF_DONEST_OUTER_TILE 
MPF_DONEST_MIDDLE_TILE 
MPF_DSM_LOCAL 
MPF_DSM_IO 
MPF_SINGLE_PROCESS 
MPF_MP_VERSION 
MPF_PARALLEL_REGION 
MPF_HOIST_MESSY_BOUNDS 
MPF_DOACROSS_SYNC 
MPF_DOACROSS_OUTER_TILE 
MPF_DOACROSS_INNER_TILE 
MPF_REMOVE_UNITY_TRIP 
MPF_CACHE_WINDDOWN 
MPF_INTERLEAVED_WINDDOWN 
MPF_GENERAL_VERSION 
MPF_CACHE_TILE 
MPF_REGISTER_WINDDOWN 
MPF_REGISTER_SSTRIP 
MPF_REGISTER_TILE 
MPF_REGISTER_STARTUP 
MPF_REGISTER_SHUTDOWN 
MPF_SE_TILE 
MPF_SE_CACHE_TILE 
MPF_INNER_FISSION 
MPF_GATHER_SCATTER 
MPF_VINTR_FISSION 
MPF_PREFETCH_VERSION 
MPF_OMPL_SECTIONS_LOOP 
MPF_OMPL_ELIM_SECTION 
MPF_OMPL_ATOMIC_CSECTION 
MPF_OMPL_ATOMIC_SWAP 
MPF_OMPL_ATOMIC_FETCHOP 
MPF_OMPL_MASTER_IF 
MPF_OMPL_FETCHOP_ATOMIC 
MPF_F90_ARRAY_STMT 
MPF_OUTER_SHACKLE 
MPF_INNER_SHACKLE 
MPF_PREOPT_CREATE 

Definition at line 223 of file prompf.h.


Function Documentation

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().

Here is the call graph for this function:

PROMPF_ID_TYPE Prompf_Id_Type ( WN wn_ref,
WN wn_region,
BOOL is_first = NULL 
)

Variable Documentation

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().