scale.test
Class CC

java.lang.Object
  extended by scale.test.Scale
      extended by scale.test.CC

public class CC
extends Scale

This class provides a "C compiler" using the common switches.

$Id: CC.java,v 1.39 2007-10-04 20:03:09 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Field Summary
 CmdParam cpAf
           
 CmdParam cpCcf
           
 CmdParam cpCO
           
 CmdParam cpCofile
           
 CmdParam cpVerbose
           
protected  java.lang.String dirPath
           
protected  CmdParam[] paramsCC
           
 
Fields inherited from class scale.test.Scale
aaLevel, aliases, all, architecture, backendFeatures, categories, classTrace, cpAA, cpAnnot, cpAnsi, cpArch, cpAsm, cpBi, cpC89, cpC99, cpCat, cpCc, cpCca, cpCcb, cpCdd, cpCga, cpCgb, cpCkr, cpCmi, cpD, cpDaVinci, cpDcg, cpDd, cpDebug, cpDir, cpDm, cpFcl, cpFf, cpFiles, cpFpr, cpG, cpGcc, cpGphType, cpHb, cpHda, cpIcf, cpIh, cpIncl, cpIncls, cpInl, cpInls, cpIs, cpMulti, cpNaln, cpNoWarn, cpNp, cpNW, cpO, cpOa, cpOc, cpOfile, cpOs, cpPg, cpPh, cpPi, cpPp, cpPrePro, cpQuiet, cpR, cpSan, cpSc, cpSca, cpScb, cpSf, cpSga, cpSgb, cpSla, cpSnap, cpStat, cpSuspend, cpTcl, cpU, cpUc, cpUnsafe, cpVcg, cpVers, cpWhich, cpWrap, crossCompile, debugging, doA, doC, doLines, doOfile, doSingle, hostArch, hostOS, inlfos, inllev, inlStatusStream, inputFiles, int0, int1, int2, int4, off, on, opts, params, profGuidedOps, profilePaths, profInstOps, readClassFiles, targetArch, version, warnings
 
Constructor Summary
protected CC()
           
 
Method Summary
 void compile(java.lang.String[] args)
          Compile a C or Fortran program.
protected  void genAssemblyfromCallGraph(CallGraph cg)
          Generate an assembly file from a CallGraph using each RoutineDecl's Scribble graph.
protected  void genCfromCallGraph(CallGraph cg)
          Generate a .c file from a CallGraph using each RoutineDecl's Scribble graph.
protected  java.lang.String genFileName(java.lang.String name, java.lang.String extension)
          Return a path name for the new file including the directory specified by the "dir" switch.
static void main(java.lang.String[] args)
          Compile a C or Fortran program.
protected  void parseCmdLine(java.lang.String[] args, CmdParam[] params)
          Process the command line parameters.
 
Methods inherited from class scale.test.Scale
addWarning, addWarning, addWarning, convertToScribble, dd, displayClef, displayScribble, executeCommand, executeCommand, executeCommand, genCfromClef, genCfromScribble, globalVariables, isCrossCompile, multiCompilation, optimizeClef, optimizeScribble, opts, parseAA, parseArchParams, parseCmdLine, parseFlagFile, parseFlags, parseHyperblockParams, parseMiscellaneousParams, parseOptHeuristics, parseOpts, parseReportParams, parseTraces, parseWhichParam, processFile, processSuite, removeFile, separateCompilation, splitString, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cpVerbose

public CmdParam cpVerbose

cpCcf

public CmdParam cpCcf

cpAf

public CmdParam cpAf

cpCofile

public CmdParam cpCofile

cpCO

public CmdParam cpCO

paramsCC

protected CmdParam[] paramsCC

dirPath

protected java.lang.String dirPath
Constructor Detail

CC

protected CC()
Method Detail

main

public static void main(java.lang.String[] args)
Compile a C or Fortran program.

Parameters:
args - the command line arguments

compile

public void compile(java.lang.String[] args)
Compile a C or Fortran program.

Overrides:
compile in class Scale
Parameters:
args - the command line arguments

parseCmdLine

protected void parseCmdLine(java.lang.String[] args,
                            CmdParam[] params)
Process the command line parameters.

Overrides:
parseCmdLine in class Scale
Parameters:
args - the array of command line parameters
params - an array of allowed command line parameters

genCfromCallGraph

protected void genCfromCallGraph(CallGraph cg)
                          throws java.lang.Exception
Generate a .c file from a CallGraph using each RoutineDecl's Scribble graph.

Overrides:
genCfromCallGraph in class Scale
Parameters:
cg - is the CallGraph
Throws:
java.lang.Exception

genFileName

protected java.lang.String genFileName(java.lang.String name,
                                       java.lang.String extension)
Return a path name for the new file including the directory specified by the "dir" switch.

Overrides:
genFileName in class Scale
Parameters:
name - a file path from which to extract the file name
extension - the extension to use for the new file

genAssemblyfromCallGraph

protected void genAssemblyfromCallGraph(CallGraph cg)
                                 throws java.lang.Exception
Generate an assembly file from a CallGraph using each RoutineDecl's Scribble graph.

Overrides:
genAssemblyfromCallGraph in class Scale
Parameters:
cg - is the CallGraph
Throws:
java.lang.Exception