xxTpips: command line interpreter

Tpips: command line interpreter

Corinne Ancourt Fabien Coelho Guillaume Oget

January 7, 2010 (revision 15925)

You can get a printable version of this document on

http://www.cri.ensmp.fr/pips/tpips-user-manual.htdoc/tpips-user-manual.pdf
and a HTML version on http://www.cri.ensmp.fr/pips/tpips-user-manual.htdoc.

Contents

1 Introduction 2 Syntax x2.1 Workspace x2.2 Requests x2.3 PIPS properties and options x2.4 Environment x2.5 Parameters 3 Simple session 4 Examples x4.1 Call Graph x4.2 Dependences x4.3 Transformations x4.4 Analyses x4.5 Graphical Graph View x4.6 Parallelization 5 Rules — Pips options 6 Resources 7 Printable resources 8 Options 9 Environment 10 Small tools

x10.1 pipsxc2openmp
x10.2 pipsxf2openmp

1 Introduction tpips is the line interface and scripting language of the PIPS project. All PIPS functionalities are available, with on-line help and automatic completion. tpips is more efficient than the pips based scripts (Init, Display,...) because the database is not open, read, written and closed for each command. tpips is less user-friendly than wpips

and epips1 1Note that wpips and epips don’t work anymore right now because a deprecated GUI library, so tpips is definitively the way to go... , although it provides the unique opportunity to apply a transformation or display some information on several modules with one command, using pipsmake metavariables, %CALLERS and %CALLEES, or environment user defined variables such as $MODULES (see Examplex4.2). The jpips future user interface will provide these pips/tpips functionalities too. tpips is recommended for large benchmarks and experiments, when analysis and optimization results do not require interactive working. tpips is used for the validation of each new PIPS version. tpips can be used to automatically replay a manual wpips or tpips

session by using logfile_to_tpips. The logfile_to_tpips command

derives a tpips script from a logfile in a workspace (see Examplex4.2). A PIPS beginner should start with a window interface, wpips or

epips2 ^{2If they work...} , and not with tpips. But the simple tools of sectionx10 can be useful for simple tasks. Access to Unix Shell and to PIPS properties is provided by tpips. PIPS properties can be modified from tpips , and only from tpips during a PIPS session (see Examplex4.3). On the other hand, wpips reads at the beginning of the session the default properties and the new ones (re)defined in the properties.rc file, but no change can be done afterwards. Resetting properties during a session can be used to rebuild an application when some modules have been updated by PIPS, e.g. after partial evaluation. The tpips commands are listed on-line by the help command. Possible arguments are completed or suggested by automatic completion (TAB and TAB/TAB). A command may be spread on several lines by guarding the line feed characters by backslashes.

2 Syntax Different functions can be activated with the tpips commands. We decompose these functions in those related to the workspace, the analysis and transformation requests, the PIPS properties and options and the the environment. Functions and their arguments are presented in the next subsections.

2.1 Workspace The commands for workspaces are: create a new workspace (see pips command Init), open an existing workspace, close the current workspace, and delete the current workspace or a specific one (see pips command Delete). These commands can be used several times during a session or within a tpips script file.

create <workspace-name> <file-name> creates and opens a new workspace from a source file — or set of source files

open <workspace-name> opens an existing workspace

close <workspace-name> closes an opened workspace

delete <workspace-name> deletes a closed workspace

quit quits tpips

2.2 Requests To apply a transformation or request a particular resource, use the following tpips commands. For a list of the available resources and their descriptions, have a

look to http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc or
http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc/pipsmake-rc.pdf.

apply <rule-descriptor> applies a specified rule and produces the associated resources.

capply <rule-descriptor> applies concurrently a specified rule on the different OWNERs of the <rule-descriptor> and produces the associated resources (see Examplex4.4).

display <resource-descriptor> makes a printable resource (if it does not exist) and prints it out. A printed resource is a ACSII file with the _FILE extension. make <resource-descriptor> makes a resource according to default rules

Generic example: A resource, i.e. any piece of information computed by PIPS, can be required by command:

make␣<resource>

or

make␣<resource[owner]>

which use interproceduraly and recursively default rules (see pips command Build). Or it is produced by a specific rule:

applyx<rule>

which will require all its resource arguments by recursively calling make (see pips command Perform). The owner of a resource is the module it is attached to. By default, the owner is assumed to be the current module. File resources can be displayed on screen:

displayx<printable_resource>

as with the pips Display script.

2.3 PIPS properties and options For a list of the available properties and their descriptions, have a

look to http://www.cri.ensmp.fr/pips/properties-rc.htdoc or
http://www.cri.ensmp.fr/pips/properties-rc.htdoc/properties-rc.pdf.

activate <rule-name> activates a rule. Several rules can be used to produce a resource. At any time one of these rules is the default rule.

module <module-name> specifies the current module to work on.

getproperty <property-name> prints the value of a PIPS property.

setproperty <property-name> <value> sets the value of a property — after type check. Possible types are: boolean, int and string.

checkpoint <number> checkpoints the current workspace every <number> pipsmake operations.

Generic example: A specific current module is selected as current module with:

modulexMODULE_NAME

When several rules, i.e. functions, can be used to compute the same resource, for instance a parallel version of a module, the rule selection command is:

activatex<rule>

It is equivalent to the pips Select command.

2.4 Environment The tpips Unix-related commands are: cd, setenv, getenv, echo, and shell.

shell <sh-command> <parameters> Executes the line as a shell

command. With no arguments, run an inferior shell; source <filenames...> reads tpips commands from files; cd <directory-name> changes the default directory; echo <string> prints <string>; getenv <variable-name> prints the value of <variable-name> (equivalent

     to echox${<variable-name>});

setenv <variable-name> = <value> sets <value> to <variable-name>; help <command> prints out general help or detailed help about an item; info <name> print information about <name>. Here <name> can be the

     module, modules, workspace or directory words.

2.5 Parameters The parameters of the different commands are : <file-name> Unix path and file name.

Shell syntax, such as *.f, can be used when s option is specified or

     TPIPS_IS_A_SHELL variable is set;

<workspace-name> Unix file name — no path;

<module-name> Fortran function name in capital letters or a C function name;

<rule-name> rule name (see Section 5);

<resource-descriptor> It is a resource[OWNER] expression: a pipsmake resource name to be computed for each module associated to OWNER (see Sections 6 and 7);

<rule-descriptor> It is a rulename[OWNER] expression: a pipsmake instantiated rule to be applied on each module associated to OWNER (see Section 5);

the OWNER — used in the previous <rule-descriptor> and <resource-descriptor> — can take these formats:

module-name the target module name;

%PROGRAM the whole program (for global resource);

%MAIN the main module of the program;

%MODULE the current module;

${MODULES} the modules associated to the Shell variable MODULES.

The different names are SPACE or/and TAB separated;

%ALL All workspace modules, including C compilation units3 3A PIPS compilation unit is associated to each C user source file. it contains all the initial declarations, but the function definitions.;

%ALLFUNC All workspace functions, excluding C compilation units;

%CALLEES All the callees of the current selected module;

%CALLERS All the callers of the current selected module.

If no OWNER is specified, then the current module is assumed. For generic owners, a sign (%) has been added to differentiate them from existing module names and environment variables.

3 Simple session A simple tpips session is made of a few steps. First, a workspace must be created:

createxworkxsource1.fxsource2.f

and a subdirectory of the current directory, here work.database, is created to store and retrieve code and information computed by PIPS about subroutines and functions found in source1.f or source2.f. Then, you have to select a module, let say FOO, by typing:

xmodulexFOO

unless there is only one function or subroutine in the Fortran file(s) which were passed to the create command, in which case it is automatically selected. To keep it simple the first time, you should then try to display the sequential code of routine FOO by typing:

displayxPRINTED_FILE

Other resource names let you visualize the parallelized code (PARALLELPRINTEDxFILE), or the call graph (CALLGRAPHxFILE)... Names for printable resources usually contain the string FILE. The standard command to leave tpips is quit but a control-D or end-of-file condition are valid too. Interactive analysis of module MATMUL from source code pgmsrc.f, in workspace

pgm:

$xtpips
xtpipsx>xcreatexpgmxpgm-src.f
x
xtpipsx>xmodulexMATMUL
x
xtpipsx>xdisplayxPARALLELPRINTED_FILE
x
xtpipsx>xquit
x

4 Examples

4.1 Call Graph To visualize the call graph of the application, the following tpips session can be executed. The call graph of each application routine is displayed. This example presents a use of:

     environment variable: setenvxPIPS_SRCPATHxSRC

shell path file name expression that will be expanded: *.f,

a <resource-descriptor> : CALLGRAPH_FILE[%ALL]

This tpips example is useful to test PIPS parsing on each new benchmark.

setenvxPIPS_SRCPATHxSRCxxxxxx#xinitiatesxthexsourcexfilexdirectoryxtoxSRC
x
xcreatexwcx*.fxxxxxxxxxxxxxxxxx#xcreatesxthexwcxworkspacexforxthe
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#xFortranxfilesxofxthexxPIPS_SRCPATH
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#xdirectory
x
xdisplayxCALLGRAPH_FILE[%ALL]xx#xCONTROLxGRAPHxCOMPUTATIONxforxeachxroutine
x
xclose
xquit
x

4.2 Dependences A programmer that would like to see the routines dependence graph to parallelize interprocedurally the application can executed the following tpips commands. This example presents some PIPS analyses and use of

module selection: modulexTEST

     <rule-name>: MUST_REGIONS, REGION_CHAINS

     logfile_to_tpips command

xsh>tpipsxxxxxxxxxxxxxxxxxxxxxxxxxxxx#xrunxtpips
xtpips>xcreatexwfooxessai.fxxxxxxxxxx#xcreatexaxworkspacexforxthexprogramxessai.f
xtpips>xmodulexTESTxxxxxxxxxxxxxxxxxx#xselectxthexdefaultxmodulexTEST
xtpips>xdisplayxCALLGRAPH_FILExxxxxxx#xdisplayxthexsub-callgraphxforxthe
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmodulexTEST
xtpips>xmakexPROPER_EFFECTS[%ALL]xxxx#xcomputexproperxeffectsxforxevery
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmodules
xtpips>xactivatexMUST_REGIONSxxxxxxxx#xselectxthexrulexmust_regionsxinstead
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxofxthexdefaultxrulexmay_regions
xtpips>xactivatexREGION_CHAINSxxxxxxx#xselectxthexrulexregions_chainsxfor
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcomputingxUse-Defxchainsxinxessai.f
xtpips>xdisplayxDG_FILE[%ALL]xxxxxxxx#xdisplayxallxthexdependancexgraphs
xtpips>xclosexwfooxxxxxxxxxxxxxxxxxxx#xclosexthexworkspace
xtpips>xquitxxxxxxxxxxxxxxxxxxxxxxxxx#xquitxtpips

To store this simple session in a tpips file, use the command:

logfile_to_tpipsxwfoox>xfoo.tpips

that generates the following tpips commands in the file foo.tpips.

#
x#xfilexgeneratedxbyxlogfile_to_tpipsxforxworkspacexwfoo
x#
xcreatexwfooxessai.f
xmodulexTEST
xdisplayxCALLGRAPH_FILE[TEST]
xdisplayxPROPER_EFFECTS[TEST]
xactivatexMUST_REGIONS
xactivatexREGION_CHAINS
xdisplayxDG_FILE[TEST]
xclose
xquit
x#xEOF

ote that expression %ALL has been expanded by all program routines, in that example there is only one TEST routine in essai.f.

4.3 Transformations The following transformations are designed for application optimization. Specialization and code reduction eliminating useless instructions and declarations are performed. This example presents some PIPS transformations and use of

program restructuration, cloning, dead code elimination, useless declaration elimination, and code regeneration;

     pips property: PREPROCESSOR_MISSING_FILE_HANDLINGx"generate";

     transformation application : applyxCLONE_ON_ARGUMENT[FUNCT].

<rule-name> : PRINT_CODE...

     <rule-descriptor>:  SUPPRESS_DEAD_CODE[${modules}],
     UNSPLIT[%PROGRAM]...

<resource-descriptor>  :  PRINTED_FILE[FUNCT],

     CALLGRAPH_FILE[%ALL]...

#xDeletexWorkspacexclonexinxcasexxitxalreadyxexists
x
xdeletexclone
x
xsetenvxPIPS_SRCPATHxSRC
x
x#xStopxasxsoonxasxthexfirstxuserxerrorxoccurs
x
xsetpropertyxABORT_ON_USER_ERRORxTRUE
x
x#xGeneratesxmissingxfilesxxandxroutines
x
xsetpropertyxPREPROCESSOR_MISSING_FILE_HANDLINGx"generate"
x
x#xSubstitutexFortranxstatementxfunctions
x
xsetpropertyxPARSER_EXPAND_STATEMENT_FUNCTIONSxTRUE
x
x#xRestructuresxthexprogramxtoxeliminatexasxmanyxGOTOxasxpossible
x
xsetpropertyxUNSPAGHETTIFY_TEST_RESTRUCTURING=TRUE
xsetpropertyxUNSPAGHETTIFY_RECURSIVE_DECOMPOSITION=TRUE
x
x#
x#xprettyprinterxsettings
x
xsetpropertyxPRETTYPRINT_ALL_DECLARATIONSxTRUE
x
x#xcreatesxthexworkspace
x
xcreatexclonex*.f
x
x
xechox#xinitialxversionxofxFUNCT
x
xdisplayxPRINTED_FILE[FUNCT]
x
x#
x#xjustxtoxinsurexthatxallxroutinesxarexgenerated.
x
xmakexCALLGRAPH_FILE[%ALL]
x
x#
x#xletxusxclonexFUNCTxonxthexsecondxargument.
x#xnoxinterproceduralxanalysisxisxneeded.

xsetpropertyxTRANSFORMATION_CLONE_ON_ARGUMENTx2
xcapplyxCLONE_ON_ARGUMENT[FUNCT]
x
x#xThexclonextransformationxgeneratesx4xclones
x#xbecausextherexarex4xdifferentxvaluesxforxthexsecond
x#xargumentxofxFUNCT
x
xsetenvxmodulesx"FUNCT_0xFUNCT_1xFUNCT_2xFUNCT_3"
x
x#
x#xsuppressxdeadxcodexmustxbexappliedxtwice...
x#xeliminatexdeadxcodexafterxcloning
x
xapplyxSUPPRESS_DEAD_CODE[${modules}]
xapplyxSUPPRESS_DEAD_CODE[${modules}]
x
x#xEliminatesxuselessxdeclarationxafterxcloningxandxdeadxcode
x#xsuppression
x
xapplyxCLEAN_DECLARATIONS[FUNCTx${modules}]
x
xechox#xafterxcloning,xdeadxcodexeliminationxandxdeclarationsxcleaning
x
xmakexxPRINTED_FILE[${modules}]
x
x#
x#xregeneratesxthexsourcexfilesxwithxcallsxtoxclonedxfunctionsxonly
x#
x
xactivatexPRINT_CODE
xapplyxUNSPLIT[%PROGRAM]
x
xclose

4.4 Analyses This example presents some classical PIPS analyzes:

computation of preconditions;

transformers;

effects;

regions

and a concurrent transformation application. capplyxPARTIAL_EVAL[%ALL] applies a partial evaluation on all routines concurrently without any verification process between two transformations. The partial evaluation of a routine does not modify other routine predicates, even if the code (one routine) has been modified by the transformation. It is not necessary to ask for a sequential application that will impose the analysis and re-computation of all routine predicates between two partial evaluations.

createxfoox*.f
x
xecho
xechoxCALL_GRAPH[%ALL]xComputation
xecho
x
xdisplayxCALLGRAPH_FILE[%ALL]
x
x#xaskxinterproceduralxinformation
x
xactivatexPRECONDITIONS_INTER_FULL
xactivatexTRANSFORMERS_INTER_FULL
x
xmodulexFUNCT
x
xcapplyxPARTIAL_EVAL[%ALL]
x
x#echo
x#echoxPRINT_CODE_PROPER_EFFECTSxActivation
x#echo
x#
x#activatexPRINT_CODE_PROPER_EFFECTS
x#displayxPRINTED_FILE[%ALL]
x#
x#echo
x#echoxPRINT_CODE_CUMULATED_EFFECTSxActivation
x#echo
x#
x#activatexPRINT_CODE_CUMULATED_EFFECTS
x#displayxPRINTED_FILE[%ALL]
x
xecho
xechoxPRINT_CODE_TRANSFORMERSxActivation
xecho
x
x
xactivatexPRINT_CODE_TRANSFORMERS
xdisplayxPRINTED_FILE[%ALL]
x
xecho
xechoxPRINT_CODE_PRECONDITIONSxActivation
xecho
x
xactivatexPRINT_CODE_PRECONDITIONS
xdisplayxPRINTED_FILE[%ALL]

xecho
xechoxICFG_WITH_LOOPS_REGIONS
xecho
x
xactivatexPRINT_ICFG_WITH_LOOPS_REGIONS
xdisplayxICFG_FILE[%ALL]
x
xecho
xechoxREGIONSxComputation
xecho
x
xactivatexMUST_REGIONS
xactivatexPRINT_CODE_REGIONS
xdisplayxPRINTED_FILE[%ALL]
x
x
xclose
xquit

4.5 Graphical Graph View This example presents a call to a graphical call graph view.

#xresizexthexentitiesxtable.xUsefulxforxxlargexbenchmarks.
x
xsetenvxNEWGEN_MAX_TABULATED_ELEMENTSx150000
xsetenvxMAINROUTINExxTOTO
x
xdeletexDVCG
xcreatexDVCGx*.f
x
x
xecho
xechoxCALLGRAPH_FILE[${MAINROUTINE}]xComputation
xecho
x
x
xmakexCALLGRAPH_FILE[${MAINROUTINE}]
x
x
xecho
xechoxDVCG_FILE[${MAINROUTINE}]xComputation
xecho
x
xmakexDVCG_FILE[${MAINROUTINE}]
x
x#xtypexDaVincixDVCG.database/${MAINROUTINE}/${MAINROUTINE}.daVinci
x#xtoxxvisualize
x
xclose
xquit

4.6 Parallelization This example presents some classical analyses and transformations designed to parallelize benchmarks, for instance the adm program of the Perfect club.

#
x#xPerfectxclubxADMxbenchmark.
x
xechoxPerfect/adm.f
x#
xdeletexadm
xcreatexadmxadm.fxxcputim.fxelapse.f
x
xsetpropertyxUNSPAGHETTIFY_TEST_RESTRUCTURING=TRUE
xsetpropertyxUNSPAGHETTIFY_RECURSIVE_DECOMPOSITION=TRUE
xsetpropertyxPARALLELIZATION_STATISTICS=TRUE
x
xechoxADMxscalarxprivatization...
x
xcapplyxPRIVATIZE_MODULE[%ALL]
x
x
xactivatexPRECONDITIONS_INTER_FULL
xactivatexTRANSFORMERS_INTER_FULL
x
xactivatexRICE_SEMANTICS_DEPENDENCE_GRAPH
x
xapplyxPARTIAL_EVAL[%ALL]
x
xechoxADMxparallelization...
xmakexPARALLELPRINTED_FILE[%ALL]
x
xclose
xquit

5 Rules — Pips options Rules are used to compute resources. Several rules can be activated to compute a single resource. For instance a parallel version of a module may be computed from the interprocedural precondition (PRECONDITIONS_INTER_FULL), interprocedural transformer (TRANSFORMERS_INTER_FULL) and accurate dependencies (RICE_SEMANTICS_DEPENDENCE_GRAPH). Rules are selected by activate or selected and applied by apply and capply. More rules and more information on each particular rule are presented in the pipsmake

documentation, http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc or
http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc/pipsmake-rc.pdf.

####␣ANALYSES␣####
x
xATOMIC_CHAINS
xCONTINUATION_CONDITIONS
xFLINTER
xPROPER_REFERENCES
x
x###␣COMPLEXITITY
x
xANY_COMPLEXITIES
xFP_COMPLEXITIES
xUNIFORM_COMPLEXITIES
xSUMMARY_COMPLEXITY
x
x###␣PRIVATIZATION
x
xARRAY_PRIVATIZER
xARRAY_SECTION_PRIVATIZER
xDECLARATIONS_PRIVATIZER
xPRIVATIZE_MODULE
x
x###␣EFFECTS
x
xCUMULATED_EFFECTS
xCUMULATED_REDUCTIONS
xCUMULATED_REFERENCES
xIN_EFFECTS
xIN_SUMMARY_EFFECTS
xOUT_EFFECTS
xOUT_SUMMARY_EFFECTS
xPROPER_EFFECTS
xSUMMARY_EFFECTS
x
x
x###␣PRECONDITIONS
x
xPRECONDITIONS_INTER_FAST
xPRECONDITIONS_INTER_FULL
xPRECONDITIONS_INTRA
xSUMMARY_PRECONDITION
x
x
x###␣TRANSFORMERS
x
xSUMMARY_TRANSFORMER
xTRANSFORMERS_INTER_FAST

xTRANSFORMERS_INTER_FULL
xTRANSFORMERS_INTRA_FAST
xTRANSFORMERS_INTRA_FULL
x
x
x###␣REGIONS
x
xIN_OUT_REGIONS_CHAINS
xIN_REGIONS
xIN_SUMMARY_REGIONS
xMAY_REGIONS
xMUST_REGIONS
xOUT_REGIONS
xOUT_SUMMARY_REGIONS
xREGION_CHAINS
xSUMMARY_REGIONS
x
x###␣CALLGRAPH
x
xFULL_GRAPH_OF_CALLS
xCALLGRAPH
xGRAPH_OF_CALLS
x
x###␣DEPENDENCES
x
xRICE_ALL_DEPENDENCE
xRICE_CRAY
xRICE_DATA_DEPENDENCE
xRICE_FAST_DEPENDENCE_GRAPH
xRICE_FULL_DEPENDENCE_GRAPH
xRICE_REGIONS_DEPENDENCE_GRAPH
xRICE_SEMANTICS_DEPENDENCE_GRAPH
x
x###␣REDUCTIONS
x
xPROPER_REDUCTIONS
xSUMMARY_REDUCTIONS
x
x
x####␣TRANSFORMATIONS␣####
x
xFORWARD_SUBSTITUTE
xPARTIAL_EVAL
x
x###␣RESTRUCTURATION
x
xATOMIZER
xCLEAN_DECLARATIONS
xCLONE
xCLONE_ON_ARGUMENT

xCLONE_SUBSTITUTE
xRESTRUCTURE_CONTROL
xSUPPRESS_DEAD_CODE
xUNSPAGHETTIFY
xUNSPLIT
xUSE_DEF_ELIMINATION
x
x###␣LOOP␣TRANSFORMATION
x
xDISTRIBUTER
xFULL_UNROLL
xLOOP_INTERCHANGE
xLOOP_NORMALIZE
xLOOP_REDUCTIONS
xSTRIP_MINE
xUNROLL
x
x###␣PARALLELIZATION
x
xCOARSE_GRAIN_PARALLELIZATION
xNEST_PARALLELIZATION

####␣PRETTYPRINT␣####
x
x###␣PRINT_CALL_GRAPH
x
xPRINT_CALL_GRAPH
xPRINT_CALL_GRAPH_WITH_COMPLEXITIES
xPRINT_CALL_GRAPH_WITH_CUMULATED_EFFECTS
xPRINT_CALL_GRAPH_WITH_IN_REGIONS
xPRINT_CALL_GRAPH_WITH_OUT_REGIONS
xPRINT_CALL_GRAPH_WITH_PRECONDITIONS
xPRINT_CALL_GRAPH_WITH_PROPER_EFFECTS
xPRINT_CALL_GRAPH_WITH_REGIONS
xPRINT_CALL_GRAPH_WITH_TRANSFORMERS
x
x###␣PRINT_CHAINS_GRAPH
x
xPRINT_CHAINS_GRAPH
x
x###␣PRINT_CODE␣␣WITH␣...
x
xPRINT_CODE
xPRINT_CODE_AS_A_GRAPH
xPRINT_CODE_AS_A_GRAPH_COMPLEXITIES
xPRINT_CODE_AS_A_GRAPH_CUMULATED_EFFECTS
xPRINT_CODE_AS_A_GRAPH_IN_REGIONS
xPRINT_CODE_AS_A_GRAPH_OUT_REGIONS
xPRINT_CODE_AS_A_GRAPH_PRECONDITIONS
xPRINT_CODE_AS_A_GRAPH_PROPER_EFFECTS
xPRINT_CODE_AS_A_GRAPH_REGIONS
xPRINT_CODE_AS_A_GRAPH_TRANSFORMERS
xPRINT_CODE_COMPLEMENTARY_SECTIONS
xPRINT_CODE_COMPLEXITIES
xPRINT_CODE_CONTINUATION_CONDITIONS
xPRINT_CODE_CUMULATED_EFFECTS
xPRINT_CODE_CUMULATED_REDUCTIONS
xPRINT_CODE_CUMULATED_REFERENCES
xPRINT_CODE_IN_EFFECTS
xPRINT_CODE_IN_REGIONS
xPRINT_CODE_OUT_EFFECTS
xPRINT_CODE_OUT_REGIONS
xPRINT_CODE_PRECONDITIONS
xPRINT_CODE_PRIVATIZED_REGIONS
xPRINT_CODE_PROPER_EFFECTS
xPRINT_CODE_PROPER_REDUCTIONS
xPRINT_CODE_PROPER_REFERENCES
xPRINT_CODE_PROPER_REGIONS

xPRINT_CODE_REGIONS
xPRINT_CODE_STATIC_CONTROL
xPRINT_CODE_TRANSFORMERS
x
x###␣PRINT_DEPENDENCE_GRAPH
x
xPRINT_EFFECTIVE_DEPENDENCE_GRAPH
xPRINT_LOOP_CARRIED_DEPENDENCE_GRAPH
xPRINT_WHOLE_DEPENDENCE_GRAPH
x
x###␣PRINT_ICFG
x
xPRINT_ICFG
xPRINT_ICFG_WITH_COMPLEXITIES
xPRINT_ICFG_WITH_CONTROL
xPRINT_ICFG_WITH_CONTROL_COMPLEXITIES
xPRINT_ICFG_WITH_CONTROL_CUMULATED_EFFECTS
xPRINT_ICFG_WITH_CONTROL_IN_REGIONS
xPRINT_ICFG_WITH_CONTROL_OUT_REGIONS
xPRINT_ICFG_WITH_CONTROL_PRECONDITIONS
xPRINT_ICFG_WITH_CONTROL_PROPER_EFFECTS
xPRINT_ICFG_WITH_CONTROL_REGIONS
xPRINT_ICFG_WITH_CONTROL_TRANSFORMERS
xPRINT_ICFG_WITH_CUMULATED_EFFECTS
xPRINT_ICFG_WITH_IN_REGIONS
xPRINT_ICFG_WITH_LOOPS
xPRINT_ICFG_WITH_LOOPS_COMPLEXITIES
xPRINT_ICFG_WITH_LOOPS_CUMULATED_EFFECTS
xPRINT_ICFG_WITH_LOOPS_IN_REGIONS
xPRINT_ICFG_WITH_LOOPS_OUT_REGIONS
xPRINT_ICFG_WITH_LOOPS_PRECONDITIONS
xPRINT_ICFG_WITH_LOOPS_PROPER_EFFECTS
xPRINT_ICFG_WITH_LOOPS_REGIONS
xPRINT_ICFG_WITH_LOOPS_TRANSFORMERS
xPRINT_ICFG_WITH_OUT_REGIONS
xPRINT_ICFG_WITH_PRECONDITIONS
xPRINT_ICFG_WITH_PROPER_EFFECTS
xPRINT_ICFG_WITH_REGIONS
xPRINT_ICFG_WITH_TRANSFORMERS
x
xPRINT_INITIAL_PRECONDITION
x
x###␣PRINT_PARALLELIZED_CODE
x
xPRINT_PARALLELIZED77_CODE
xPRINT_PARALLELIZED90_CODE
xPRINT_PARALLELIZEDCMF_CODE
xPRINT_PARALLELIZEDCRAFT_CODE
xPRINT_PARALLELIZEDCRAY_CODE
xPRINT_PARALLELIZEDHPF_CODE

xPRINT_PARALLELIZEDOMP_CODE
x
x###␣PRINT_SOURCE
x
xPRINT_SOURCE
xPRINT_SOURCE_COMPLEXITIES
xPRINT_SOURCE_CONTINUATION_CONDITIONS
xPRINT_SOURCE_CUMULATED_EFFECTS
xPRINT_SOURCE_IN_EFFECTS
xPRINT_SOURCE_IN_REGIONS
xPRINT_SOURCE_OUT_EFFECTS
xPRINT_SOURCE_OUT_REGIONS
xPRINT_SOURCE_PRECONDITIONS
xPRINT_SOURCE_PROPER_EFFECTS
xPRINT_SOURCE_REGIONS
xPRINT_SOURCE_TRANSFORMERS

6 Resources The names of the current useful resources are given. These resources are computed by the make and display commands. These non-printable resources are encoded in internal data structures. The corresponding printable resources are listed in the following section. These resources and others are detailed the pipsmake

documentation, http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc or
http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc/pipsmake-rc.pdf.

CALLEES
xCALLERS
xCHAINS
xCOMPLEXITIES
xDG
xENTITIES
xSUMMARY_COMPLEXITY
x
x##xCODE
x
xCODE
xPARALLELIZED_CODE
xPARSED_CODE
x
x
x##xEFFECTS
x
xCUMULATED_EFFECTS
xCUMULATED_IN_EFFECTS
xIN_EFFECTS
xIN_SUMMARY_EFFECTS
xOUT_EFFECTS
xOUT_SUMMARY_EFFECTS
xPROPER_EFFECTS
xSUMMARY_EFFECTS

##xREGIONS
x
xCOPY_OUT_REGIONS
xCUMULATED_IN_REGIONS
xINV_IN_REGIONS
xINV_REGIONS
xIN_REGIONS
xIN_SUMMARY_REGIONS
xOUT_REGIONS
xOUT_SUMMARY_REGIONS
xPRIVATIZED_REGIONS
xPROPER_REGIONS
xREGIONS
xSUMMARY_REGIONS
x
x##xREDUCTIONS
x
xCUMULATED_REDUCTIONS
xPROPER_REDUCTIONS
xSUMMARY_REDUCTIONS
x
x##xREFERENCES
x
xCUMULATED_REFERENCES
xPROPER_REFERENCES

##xPRECONDITION
x
xINITIAL_PRECONDITION
xPRECONDITIONS
xPROGRAM_PRECONDITION
xSUMMARY_PRECONDITION
x
x##xTRANSFORMERS
x
xSUMMARY_TRANSFORMER
xTRANSFORMERS
x
x##xCONTINUATION
x
xMAY_CONTINUATION
xMAY_SUMMARY_CONTINUATION
xMUST_CONTINUATION
xMUST_SUMMARY_CONTINUATION

7 Printable resources The printable resources usually contain the string FILE. They can be computed by invoking the display tpips command. They are stored as human readable ASCII file in the workspace. The current resources which are printable follow, for more information see

the pipsmake documentation, http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc
or http://www.cri.ensmp.fr/pips/pipsmake-rc.htdoc/pipsmake-rc.pdf.

.

CALLGRAPH_FILExxxxxxxxxxxxxxxxxxx#xcallxgraphxfile
xDG_FILExxxxxxxxxxxxxxxxxxxxxxxxxx#xDependencexgraphxfile
xDVCG_FILExxxxxxxxxxxxxxxxxxxxxxxx#xDavincixDependencexgraphxfile
xFLINTED_FILExxxxxxxxxxxxxxxxxxxxx#xsourcexfilexwithxerrors
xGRAPH_PRINTED_FILExxxxxxxxxxxxxxx#xcontrolxgraph
xICFG_FILExxxxxxxxxxxxxxxxxxxxxxxx#xinterproceduralxcontrolxflowxgraph
xINITIAL_FILExxxxxxxxxxxxxxxxxxxxx#xafterxsplitting
xPARALLELPRINTED_FILExxxxxxxxxxxxx#xparallelxversion
xPRINTED_FILExxxxxxxxxxxxxxxxxxxxx#xannotedxsequentialxversion
xSOURCE_FILExxxxxxxxxxxxxxxxxxxxxx#xafterxthexpreprocessingxphase
xUSER_FILExxxxxxxxxxxxxxxxxxxxxxxx#xafterxregenerationxofxuserxfiles

8 Options Usage:

tpips [-nscvh?jw] [-l logfile ] [-r rcfile ] [-e tpips-cmds ] tpips-scripts

-n no execution mode. Just check the script syntax;

-s behaves like a shell. tpips commands simply extend a shell;

-c behaves like a command, not a shell (it is the default option);

-v displays version and architecture information;

-h or -? provides some help;

-j jpips special mode;

-w starts with a wrapper (jpips special again)...

-l <logfile>: log to <logfile>;

-r <rcfile>: source the <rcfile> file (default $HOME/.tpipsrc);

-e tpips-cmds: executes the <tpips-cmds> commands.

9 Environment Before using tpips, you need to add a PIPS root directory to your path and to set some PIPS environment variables. In order to do that, you can source from the PIPS distribution the shell script pipsrc.sh for any sh compatible shell, e.g. ksh or bash, or pipsrc.csh for any csh compatible shell, e.g. tcsh.

10 Small tools tpips is the way to go with PIPS but it may be too complex to do some simple tasks used for some demonstrations or some well defined tasks.

10.1 pipsxc2openmp

This tools parallelizes the C source files given in parameters and leaves the OpenMP generated files in the locally created database. It is close to an automation of the example at sectionx4.6, but for C.

10.2 pipsxf2openmp

This tools parallelizes the Fortran source files given in parameters and leaves the OpenMP generated files in the locally created database. It is close to an automation of the example at sectionx4.6.