coins.lparallel
Class F77LoopPara

java.lang.Object
  extended bycoins.driver.Driver
      extended bycoins.lparallel.LoopPara
          extended bycoins.lparallel.F77LoopPara
All Implemented Interfaces:
CompilerImplementation

public class F77LoopPara
extends LoopPara

A driver implementation using COINS Compiler Driver API.


Field Summary
protected static java.lang.String DEFAULT_OPENMP_NAME
           
protected static java.lang.String LIBF2C_LOCATION
           
 
Fields inherited from class coins.lparallel.LoopPara
fHir2CFile, fOpenMPTmpFileName, fstophir2c, fSubprogramsToBeParallelized, fTemporaryFileManager
 
Fields inherited from class coins.driver.Driver
ASSEMBLER_NAME_OPTION, CG_PARALLEL, CHECK_HIR_OPTION, CHECK_SYMBOL_TABLE_OPTION, COARSE_GRAIN_PARALLEL, COINS_OPTION_DELIMITER, DEBUG_OPTION, DEFAULT_ASSEMBLER_NAME, DEFAULT_LINKER_NAME, DEFAULT_LINKER_OPTIONS_PROPERTY, DEFAULT_LIR_OPTION, DEFAULT_OPTIMIZATION_LEVEL, DEFAULT_PREPROCESSOR_NAME, DEFAULT_SETTING, defaultSettings, DUMP_HIR_OPTION, DUMP_HIR_OPTION_DELIMITER, FLOW_ANAL_OPTION_DELIMITER, HIR_FLOW_ANAL_OPTION, HIR_OPT_ARG_FROMC, HIR_OPTIMIZATION_ARGS, HIR_TO_C_OPTION, HIR_TO_C_OPTION_DELIMITER, hirFlowRoot, LINKER_NAME_OPTION, LIR_OPTIMIZATION_ARGS, LIR_TO_C_OPTION, LIR_TO_C_OPTION_DELIMITER, MACRO_DATA_FLOW_OPTION, MAX_OPTIMIZATION_LEVEL, myName, NEW_LIR_OPTION, OLD_LIR_OPTION, OPENMP_OPTION, OUT_NEW_LIR_OPTION, PARALLEL_DO_ALL, PREPROCESSOR_NAME_OPTION, SIMULATE_OPTION, SSA_OPTIMIZATION_ARGS, SSA_OPTION, STOP_AFTER_HIR_TO_C_OPTION, STOP_AFTER_LIR_TO_C_OPTION, SYSTEM_INCLUDE_PATH_PROPERTY, TARGET_ARCH_OPTION, TARGET_CONVENTION_OPTION, VERBOSE_FLAG
 
Constructor Summary
F77LoopPara()
           
 
Method Summary
 void compile(java.io.File sourceFile, Suffix suffix, java.io.InputStream in, java.io.OutputStream out, IoRoot io)
          Compiler.
This sample compiler has eight passes: C source to HIR-C(*), HIR-C to HIR-Base(*), Flow analysis on HIR(*), Optimization and Parallelization on HIR, HIR to LIR(*), Assembly code generation(*).
static void main(java.lang.String[] args)
          A main function.
protected  HIR makeHirFromFortranSource(java.io.File sourceFile, HirRoot hirRoot, java.io.InputStream in, IoRoot io)
          HIR tree creation from source code.
protected  void makeHirFromSource(java.io.File sourceFile, HirRoot hirRoot, Suffix suffix, java.io.InputStream in, IoRoot io)
          HIR tree creation from source code.
protected  void setDefaultLinkerOptions(CompileSpecification spec, java.util.List options)
          Sets default linker options.
 
Methods inherited from class coins.lparallel.LoopPara
assemble, cleanup, getSubprogramsToBeParallelized, go, hir2OpenMP, link, LoopParallel, makeCSourceFromHirBase, OpenMPCompile, optimizeHir, testHir, testSym
 
Methods inherited from class coins.driver.Driver
basicHIROptimizations, callHirBaseToC, callLirToC, checkHirToCStopCondition, checkLIROptionsIntegrity, checkLirToCStopCondition, dumpHirBase, dumpHirBase, dumpHirBase, includedInDelimitedList, makeCommandLine, makeCSourceFromHirBase, makeCSourceFromHirBase, makeCSourceFromLir, makeCSourceFromLir, makeHIRFlowAnalysis, makeLIRFromLIRSource, makeNewLirFromHir, matchDumpHirTiming, matchHirToCTiming, matchLirToCTiming, optimizeHirAfterFlowAnalysis, optimizeHirBeforeFlowAnalysis, preprocess, runProgram, runProgram, runProgram, separateDelimitedList, setOptimizationOptions, setSystemIncludePathOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIBF2C_LOCATION

protected static final java.lang.String LIBF2C_LOCATION
See Also:
Constant Field Values

DEFAULT_OPENMP_NAME

protected static final java.lang.String DEFAULT_OPENMP_NAME
See Also:
Constant Field Values
Constructor Detail

F77LoopPara

public F77LoopPara()
Method Detail

compile

public void compile(java.io.File sourceFile,
                    Suffix suffix,
                    java.io.InputStream in,
                    java.io.OutputStream out,
                    IoRoot io)
             throws java.io.IOException,
                    PassException
Compiler.
This sample compiler has eight passes:
  1. C source to HIR-C(*),
  2. HIR-C to HIR-Base(*),
  3. Flow analysis on HIR(*),
  4. Optimization and Parallelization on HIR,
  5. HIR to LIR(*),
  6. Assembly code generation(*).
Five of the above (*) are already implemented.

Specified by:
compile in interface CompilerImplementation
Overrides:
compile in class LoopPara
Parameters:
sourceFile - the source file name.
in - input.
out - output.
Throws:
java.io.IOException
PassException

setDefaultLinkerOptions

protected void setDefaultLinkerOptions(CompileSpecification spec,
                                       java.util.List options)
Sets default linker options.
  1. Sets default linker options specified in the default settings.
  2. Sets a -L option if the location of libf2c is specified in the default settings.
  3. Sets a -lf2c option.

Overrides:
setDefaultLinkerOptions in class Driver
Parameters:
spec - a CompileSpecification object.
options - a list of linker options where the options to be set.

makeHirFromFortranSource

protected HIR makeHirFromFortranSource(java.io.File sourceFile,
                                       HirRoot hirRoot,
                                       java.io.InputStream in,
                                       IoRoot io)
                                throws java.io.IOException,
                                       PassException
HIR tree creation from source code.

Parameters:
sourceFile - the source file.
hirRoot - an HirRoot object.
in - an input stream from which the C source program can be read.
io - an IoRoot object.
Throws:
java.io.IOException - any IO error.
PassException - unrecoverable error(s) found in processing.

makeHirFromSource

protected void makeHirFromSource(java.io.File sourceFile,
                                 HirRoot hirRoot,
                                 Suffix suffix,
                                 java.io.InputStream in,
                                 IoRoot io)
                          throws java.io.IOException,
                                 PassException
Description copied from class: Driver
HIR tree creation from source code.

Overrides:
makeHirFromSource in class Driver
Parameters:
sourceFile - the source file.
hirRoot - an HirRoot object.
suffix - suffix rule of the source file.
in - an input stream from which the C source program can be read.
io - an IoRoot object.
Throws:
PassException - unrecoverable error(s) found in processing.
java.io.IOException - any IO error.

main

public static void main(java.lang.String[] args)
A main function.