scale.backend.trips2
Class TripsPGenerator

java.lang.Object
  extended by scale.backend.Generator
      extended by scale.backend.trips2.Trips2Generator
          extended by scale.backend.trips2.TripsPGenerator
All Implemented Interfaces:
Predicate

public class TripsPGenerator
extends Trips2Generator

This class converts PTIL into TRIPS instructions.

$Id: TripsPGenerator.java,v 1.15 2006-11-16 17:49:42 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
 
Fields inherited from class scale.backend.trips2.Trips2Generator
areaNames, ARG_SAVE_OFFSET, BSS, DATA, display, doBBID, doBranchIds, doCutAnalysis, enableStabs, hbStart, LIT4, LIT8, LITA, MAX_ARG_REGS, RCONST, RDATA, SAVED_REG_SIZE, SBSS, SDATA, srcLinePerBlock, TEXT
 
Fields inherited from class scale.backend.Generator
ADD, addrDisp, AND, annotateCode, ansic, ANSIC, branchPrediction, callsRoutine, cg, classTrace, codeMap, commutative, currentBeginMarker, currentRoutine, dataAreas, DEBUG, DIV, fieldAlignment, genDebugInfo, lastInstruction, lastLabel, LINENUM, lineNumbers, little, machine, MOD, MUL, naln, NALN, nextArea, nis, NIS, nph, NPH, operation, OR, predicatedOnTrue, predicateReg, readOnlyDataArea, registers, resultReg, resultRegAddressAlignment, resultRegAddressOffset, resultRegMode, resultRegSize, returnInst, scribble, SLL, SRA, SRL, stkPtrReg, SUB, successorCFGNode, trace, un, useMemory, usesAlloca, usesVaStart, XOR
 
Constructor Summary
TripsPGenerator(CallGraph cg, Machine machine, int features)
           
 
Method Summary
protected  void addPassThroughItem(java.lang.String item)
          Add a string which should be passed through to the TIL unchanged.
 void generate()
          Generate the machine instructions for each routine in the call graph.
 void generateScribble()
          Generate the machine instructions for a CFG.
protected  Vector<java.lang.String> getPassThroughItems()
          Return the list of strings which should be passed through to the TIL.
 
Methods inherited from class scale.backend.trips2.Trips2Generator
__builtin_abs, addRegs, allocStackAddress, analyzeHyperblocks, appendInstruction, assemble, assignBranchIds, assignDeclToMemory, assignDeclToRegister, assignDeclToStack, assignLoadStoreIds, basicBlockEnd, calcArrayElementAddress, callArgs, convertIntRegValue, createAddressTable, createNewLabel, dataType, defineDeclInCommon, defineDeclInMemory, defineDeclInRegister, defineDeclOnStack, defineRoutineInfo, defStringValue, displayGraph, doBinaryOp, doCompareOp, dumpAssembly, endModule, endRoutineCode, enterSSA, genAcosFtn, genAlloca, genAsinFtn, genAtan2Ftn, genAtanFtn, genConjgFtn, genCosFtn, genCoshFtn, genDimFtn, genDoubleUse, generateConditionalBranch, generateProlog, generateUnconditionalBranch, genExpFtn, genFloorOfReal, genFrameAddressFtn, genFtnCall, genIfRegister, genIfRelational, genIntToReal, genLoadDblImmediate, genLoadHighImmediate, genLoadImmediate, genLoadImmediate, genLog10Ftn, genLogFtn, genRealPart, genRealToInt, genRealToIntRound, genRealToReal, genRegToReg, genReturnAddressFtn, genRoundReal, genSignFtn, genSinFtn, genSingleUse, genSinhFtn, genSqrtFtn, genSwitchUsingIfs, genSwitchUsingTransferVector, genTanFtn, genTanhFtn, genTransformReal, genTrueFalseBranch, genUnsignedIntToReal, getFirstArgRegister, getMaxAreaIndex, getReturnBlock, getSpillLocation, getVariables, hyperblockFormation, insertSpillLoad, insertSpillLoad, insertSpillStore, insertSpillStore, layoutParameters, leaveSSA, loadArrayElement, loadFieldValue, loadFromMemoryDoubleIndexing, loadFromMemoryWithOffset, loadFromMemoryWithOffset, loadMemoryAddress, loadRegFromSymbolicLocation, loadStackAddress, mergeInstructions, minimizePredicates, moveWords, moveWords, optimizeHyperblocks, peepholeAfterRegisterAllocation, processRoutineDecl, processSourceLine, processType, processTypeDecl, processTypeName, removeDeadCode, removeRedundantLoads, renameRegisters, renameRegisters, returnRegister, setBeginMarker, setLastInstruction, setLoopSizes, setReturnBlock, splitAndAllocate, splitHyperblocks, startModule, startRoutineCode, storeBitsIntoMemory, storeIntoMemory, storeIntoMemoryWithOffset, storeIntoMemoryWithOffset, storeLfae, storeRegToSymbolicLocation, tagBasicBlocks, unconditionalBranchNeeded, visitAbsoluteValueExpr, visitBitComplementExpr, visitCallFunctionExpr, visitCompareExpr, visitConditionalExpr, visitDivisionExpr, visitExponentiationExpr, visitExprChord, visitMultiplicationExpr, visitNegativeExpr, visitNotExpr, visitRemainderExpr, visitReturnChord, visitVaArgExpr, visitVaStartExpr, zeroFloatRegister
 
Methods inherited from class scale.backend.Generator
adjustImmediates, allocateData, allocateRegisters, allocateTextArea, allocateWithData, appendCallInstruction, appendLabel, associateDispWithArea, avoidedAddressCalcs, avoidedLoads, calcAddressAndOffset, calcFieldAddress, calcFieldOffsets, convertCFG, copyPropagate, createLabel, doBinaryOp, doNext, doStore, doVaCopy, findAreaDisp, findAreaDisp, findAreaDisp, findLastInstruction, generateConditionalBranch, genIfRegister, genIfRegister, getBranchLabel, getBranchTarget, getCallGraph, getCurrentRoutine, getDisp, getLabel, getMachine, getName, getRegisterSet, getSAType, getSourceLanguage, getSpaceAllocation, getStackPtr, insertInstruction, insertLabel, isAssignedRegister, isFortran, isSimple, labelCfgForBackend, loadDeclValue, loadVariable, loadVariableFromCommon, loadVariableFromMemory, loadVariableFromStack, moveInstructionSequence, needValue, needValue, newLabel, peepholeAfterRegisterAllocation, peepholeBeforeRegisterAllocation, processDecls, processType, processType, processType, processVariableDecl, propagate, putAddressInRegister, putAddressInRegister, putAddressInRegisterNO, regeneratedAddresses, regeneratedLiterals, regeneratedValues, regenerateRegister, removeUnneededInstructions, resetForBasicBlock, saveGeneratedCode, shouldBeRegenerated, specifyInReg, storeLdae, storeLdve, storeLiteral, storeLvie, updateLabelIndex, valueOf, visitAdditionExpr, visitAllocateExpr, visitAndExpr, visitArrayIndexExpr, visitBeginChord, visitBinaryExpr, visitBitAndExpr, visitBitOrExpr, visitBitShiftExpr, visitBitXorExpr, visitBranchChord, visitCallExpr, visitCallMethodExpr, visitChord, visitComplexValueExpr, visitConversionExpr, visitDecisionChord, visitDualExpr, visitEndChord, visitEqualityExpr, visitExitChord, visitExpr, visitExprPhiExpr, visitGotoChord, visitGreaterEqualExpr, visitGreaterExpr, visitIfThenElseChord, visitLeaveChord, visitLessEqualExpr, visitLessExpr, visitLiteralExpr, visitLoadDeclAddressExpr, visitLoadDeclValueExpr, visitLoadExpr, visitLoadFieldAddressExpr, visitLoadFieldValueExpr, visitLoadValueIndirectExpr, visitLoopExitChord, visitLoopHeaderChord, visitLoopInitChord, visitLoopPreHeaderChord, visitLoopTailChord, visitMarkerChord, visitMaxExpr, visitMinExpr, visitNaryExpr, visitNilExpr, visitNote, visitNotEqualExpr, visitNullChord, visitOrExpr, visitPhiExpr, visitPhiExprChord, visitSequentialChord, visitSubscriptExpr, visitSubtractionExpr, visitSwitchChord, visitTernaryExpr, visitTranscendental2Expr, visitTranscendentalExpr, visitUnaryExpr, visitVaEndExpr, visitValueExpr, visitVarArgExpr, visitVectorExpr, whatIsThis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TripsPGenerator

public TripsPGenerator(CallGraph cg,
                       Machine machine,
                       int features)
Parameters:
cg - is the call graph to be transformed
machine - specifies machine details
features - controls the instructions generated
Method Detail

generate

public void generate()
Generate the machine instructions for each routine in the call graph.

Overrides:
generate in class Generator

generateScribble

public void generateScribble()
Generate the machine instructions for a CFG.

Overrides:
generateScribble in class Trips2Generator

addPassThroughItem

protected void addPassThroughItem(java.lang.String item)
Add a string which should be passed through to the TIL unchanged.


getPassThroughItems

protected Vector<java.lang.String> getPassThroughItems()
Return the list of strings which should be passed through to the TIL. Each string will be terminated by an end-of-line.