40#include <llvm/CodeGen/MachineInstr.h>
41#include <llvm/CodeGen/MachineMemOperand.h>
119 interPassData_(NULL), cfg_(NULL), rvIsParamReg_(
false) {
134 if (llvmOptions != NULL && llvmOptions->
disableLLVMAA() ==
false) {
147 interPassData_(&ipd), cfg_(NULL), rvIsParamReg_(true) {
154 static const TCEString SP_DATUM =
"STACK_POINTER";
155 static const TCEString FP_DATUM =
"FRAME_POINTER";
156 static const TCEString RV_DATUM =
"RV_REGISTER";
158 static const TCEString RV_HIGH_DATUM =
"RV_HIGH_REGISTER";
160 static const TCEString IPARAM_DATUM_PREFIX =
"IPARAM";
161 static const TCEString VECTOR_RV_PREFIX=
"VRV_REGISTER";
187 <<
"Warning: Stack pointer datum not found "
188 <<
"in interpassdata given to ddg builder. "
189 <<
"May generate invalid code if stack used."
206 <<
"Warning: Return value register datum not found "
207 <<
"in interpassdata given to ddg builder. "
208 <<
"May generate invalid code if return values used."
213 for(
int i = 2;;i++) {
214 TCEString datum = IPARAM_DATUM_PREFIX; datum << i;
224 for (
int i = 0;;i++) {
225 TCEString datum = VECTOR_RV_PREFIX; datum << i;
244 <<
"Warning: Frame Pointer Register datum not found "
245 <<
"in interpassdata given to ddg builder. "
246 <<
"May generate invalid code."
263 if (llvmOptions != NULL && llvmOptions->
disableLLVMAA() ==
false) {
274 !
options->noaliasFunctions()->empty())) {
308 std::map<int,TCEString>& registers) {
326 std::map<int,TCEString>& registers) {
327 for (
int i = 0; i < cfg.
nodeCount(); i++) {
346 std::map<int,TCEString>& registers) {
349 for (
int i = 0; i < ins.
moveCount(); i++) {
405 }
catch (std::bad_cast& e) {
425 for (
int i = 0; i < 6; i++) {
462 bool createMemAndFUDeps,
470 if (llvmaa != NULL) {
496 if (createMemAndFUDeps) {
566 for (
int i = 0; i < ins.
moveCount(); i++) {
568 Move& move = *movePtr;
581 hasProgramOperation()) {
585 if (po->hasMoveNodeForMove(move)) {
586 moveNode = &po->moveNode(move);
593 hasProgramOperation()) {
597 if (po->hasMoveNodeForMove(move)) {
598 moveNode = &po->moveNode(move);
639 +
TCEString(
" handled but we have unready PO at: ")
641 +
TCEString(
", probably an operation without result move?");
644 msg +=
"\n\tmissing read: " +
649 msg +=
"\n\tmissing dest: " +
677 for (
int ia = 0; ia < bb.instructionCount(); ia++) {
679 for (
int i = 0; i < ins.
moveCount(); i++) {
686 assert(bb.liveRangeData_);
688 std::set<TCEString> actualRegUses;
689 std::set<TCEString> actualRegDefs;
690 for (
int i = 0; i < bb.instructionCount(); i++) {
691 auto& ins = bb.instructionAtIndex(i);
692 for (
int m = 0; m < ins.moveCount(); m++) {
693 auto& move = ins.move(m);
695 auto rdReg = move.source().isGPR() ? move.source().toString()
697 if (!rdReg.empty()) actualRegUses.insert(rdReg);
699 if (move.isConditional()) {
700 const Guard& grd = move.guard().guard();
706 actualRegUses.insert(regName);
710 auto wrReg = move.destination().isGPR()
711 ? move.destination().toString()
713 if (!wrReg.empty()) actualRegDefs.insert(wrReg);
719 for (
auto reg : effectiveRegUses) {
728 for (
auto reg : effectiveRegDefs) {
733 liveRangeData.
regKills_[reg] = std::make_pair(mnd, mnd);
741 liveRangeData.
regKills_[reg] = std::make_pair(mnd, mnd);
772 "Analysis for port guards not supported! used in: "
801 if (source.
isGPR()) {
814 switch (triggerIndex) {
816 TCEString msg =
"Trigger index ambiguous for operation: ";
817 msg << op.
name() <<
" in the machine.";
823 msg << op.
name() <<
" Not found from the machine";
828 return triggerIndex == destIndex;
885 "Move has illegal destination" +
900 BasicBlock& bb,
bool interBBInformationNeeded) {
902 if (!interBBInformationNeeded) {
953 if (&dop != &po->operation()) {
954 std::cerr <<
"pending po: " << po->toString() << std::endl;
955 std::cerr <<
"current dop: " << dop.
name() << std::endl;
958 assert(&dop == &po->operation());
959 if (!po->isComplete()) {
960 po->addInputNode(moveNode);
975 "Trigger before all operands.");
989 po->addInputNode(moveNode);
1002 TCEString(
"Trigger without operand in ") + moveDisasm);
1070 assert(&dop == &po->operation());
1072 if (!po->isComplete()) {
1073 po->addInputNode(moveNode);
1091 po->addInputNode(moveNode);
1113 if (!po->isComplete()) {
1114 po->addOutputNode(moveNode);
1120 po->operation().numberOfOutputs()) {
1130 (boost::format(
"Result move '%s' without operands") %
1147 for (
int i = 0; i < po->inputMoveCount(); i++) {
1148 MoveNode& inputNode = po->inputMove(i);
1150 for (
int j = 0; j < po->outputMoveCount(); j++) {
1151 MoveNode& outputNode = po->outputMove(j);
1163 inputNode, outputNode, dde);
1184 MoveNodeUse& mnd, std::set<MoveNodeUse>& defines) {
1187 for (std::set<MoveNodeUse>::iterator i = defines.begin();
1188 i != defines.end(); i++) {
1191 !i->mn()->move().isUnconditional() &&
1199std::set<MoveNodeUse>
1201 MoveNodeUse& mnd, std::set<MoveNodeUse>& defines) {
1203 std::set<MoveNodeUse> results;
1205 for (std::set<MoveNodeUse>::iterator i = defines.begin();
1206 i != defines.end(); i++) {
1209 !i->mn()->move().isUnconditional() &&
1236 std::set<MoveNodeUse>& defines =
1242 bool guardedKillFound = !sameGuardDefines.empty();
1246 for (std::set<MoveNodeUse>::iterator i = defines.begin();
1247 i != defines.end(); i++) {
1252 if (!guardedKillFound || (!i->mn()->move().isUnconditional() &&
1260 i->pseudo(), mnd.
pseudo(), i->loop());
1272 if (!guardedKillFound) {
1287 std::map<TCEString, std::pair<MoveNodeUse, bool> >::iterator iter =
1290 iter->second.second =
true;
1307 bool guardedKillFound) {
1310 for (std::set<MoveNodeUse>::iterator i = predecessorNodes.begin();
1311 i != predecessorNodes.end();) {
1318 if (guardedKillFound && i->mn()->move().isUnconditional()) {
1325 if (i->mn() == mnd.
mn()) {
1342 depType, reg, i->guard(),
false,
1343 i->pseudo(), mnd.
pseudo(), i->loop());
1351 predecessorNodes.erase(i++);
1376 std::set<MoveNodeUse>& defines =
1380 std::set<MoveNodeUse>& lastUses =
1399 std::map<TCEString, std::pair<MoveNodeUse, bool> >::iterator
1404 *(iter->second.first.mn()), *(mnd.
mn()))) {
1410 if (!guardedKillFound) {
1448 std::map<TCEString, std::pair<MoveNodeUse, bool> >::iterator iter =
1452 *(iter->second.first.mn()), *(mnd.
mn()))) {
1465 defines.insert(iter->second.first);
1467 if (!iter->second.second) {
1473 std::pair<MoveNodeUse, bool>(mnd,
false);
1475 defines.insert(mnd);
1506 MoveNodeUse(moveNode,
false,
false,
true),vrvIt->second);
1573 for (
int i = 0; i < 4;i++) {
1575 if (paramReg !=
"") {
1617 for (MoveNodeUseSet::iterator iter =
1622 iter->mn()->destinationOperation().operation();
1651 for (MoveNodeUseSet::iterator i = prevMoves.begin();
1652 i != prevMoves.end(); i++) {
1653 const Operation& o = i->mn()->destinationOperation().operation();
1667 false,
static_cast<int>(i->loop()));
1669 *(i->mn()), mn, dde);
1689 MoveNodeUse& mnd, std::set<MoveNodeUse>& defines) {
1692 for (std::set<MoveNodeUse>::iterator i = defines.begin();
1693 i != defines.end(); i++) {
1719 MoveNodeUse& mnd, std::set<MoveNodeUse>& prevNodes,
1723 for (MoveNodeUseSet::iterator iter =
1724 prevNodes.begin(); iter != prevNodes.end();) {
1729 prevNodes.erase(iter++);
1748 std::set<MoveNodeUse>& defines =
1751 std::set<MoveNodeUse>& lastUses =
1764 bool guardedKillFound =
1767 if (!guardedKillFound) {
1789 defines.insert(mnd);
1805 std::set<MoveNodeUse>& defines =
1812 bool guardedKillFound =
1815 if (!guardedKillFound) {
1823 for (MoveNodeUseSet::iterator iter =
1824 defines.begin(); iter != defines.end(); iter++) {
1859 const llvm::MachineInstr* instr1 = currPop.
machineInstr();
1860 const llvm::MachineInstr* instr2 = prevPop.
machineInstr();
1865 if (instr1 != NULL && instr2 != NULL) {
1866 llvm::MachineInstr::mmo_iterator begin1 =
1867 instr1->memoperands_begin();
1870 while (begin1 != instr1->memoperands_end()) {
1871 llvm::MachineInstr::mmo_iterator begin2 =
1872 instr2->memoperands_begin();
1874 while (begin2 != instr2->memoperands_end()) {
1876 if ((*begin1)->isVolatile() && (*begin2)->isVolatile()) {
1881 (*begin1)->getValue()->dump();
1882 (*begin2)->getValue()->dump();
1910 static_cast<int>(prev.
loop()));
2068 category +=
"_RESTRICT:" + pointerName;
2125 bool createMemAndFUDeps,
bool createDeathInformation,
2133 if (llvmaa != NULL) {
2159 if (createMemAndFUDeps) {
2166 if (createDeathInformation) {
2221 if (newState != oldState) {
2241 assert(firstBBs.size() == 1);
2349 std::list<BBData*>::iterator bbIter =
2391 BBData& bbd,
bool firstTime) {
2395 for (BasicBlockNodeSet::iterator predIter = predecessors.begin();
2396 predIter != predecessors.end(); predIter++) {
2425 BBData& bbd,
bool queueAll,
2431 for (BasicBlockNodeSet::iterator succIter = forwardSuccessors.begin();
2432 succIter != forwardSuccessors.end(); succIter++) {
2434 bb, **succIter, queueAll,
false, phase);
2439 for (BasicBlockNodeSet::iterator succIter = backwardSuccessors.begin();
2440 succIter != backwardSuccessors.end(); succIter++) {
2442 bb, **succIter, queueAll,
true, phase);
2466 bool changed =
false;
2501 if (changed || queueAll) {
2522 bool changed =
false;
2525 for (MoveNodeUseMapSet::iterator iter =
2530 std::set<MoveNodeUse>& preDefs = iter->second;
2533 size_t size = defAfter.size();
2537 for (std::set<MoveNodeUse>::iterator i = preDefs.begin();
2538 i != preDefs.end(); i++ ) {
2539 defAfter.insert(*i);
2543 if (size < defAfter.size()) {
2554 for (MoveNodeUseMapSet::iterator iter =
2558 std::set<MoveNodeUse>& preUses = iter->second;
2560 size_t size = useAfter.size();
2562 for (std::set<MoveNodeUse>::iterator i = preUses.begin();
2563 i != preUses.end(); i++ ) {
2564 useAfter.insert(*i);
2568 if (size < useAfter.size()) {
2594 bool changed =
false;
2601 std::set<MoveNodeUse>& preDefs = iter->second;
2604 size_t size = defAfter.size();
2608 for (std::set<MoveNodeUse>::iterator i = preDefs.begin();
2609 i != preDefs.end(); i++ ) {
2613 bool overWritten =
false;
2614 for (std::set<MoveNodeUse>::iterator j = ownDefines.begin();
2615 j != ownDefines.end(); j++) {
2616 if (j->mn()->move().isUnconditional()) {
2627 defAfter.insert(*i);
2632 if (size < defAfter.size()) {
2646 std::set<MoveNodeUse>& preUses = iter->second;
2650 size_t size = useAfter.size();
2652 for (std::set<MoveNodeUse>::iterator i = preUses.begin();
2653 i != preUses.end(); i++ ) {
2656 bool overWritten =
false;
2657 for (std::set<MoveNodeUse>::iterator j =
2658 ownDefines.begin(); j != ownDefines.end(); j++) {
2659 if (j->mn()->move().isUnconditional()) {
2669 useAfter.insert(*i);
2674 if (size < useAfter.size()) {
2716 for (
int i = 0;;i++) {
2718 if(paramReg !=
"") {
2752 for (MoveNodeUseMapSet::iterator firstUseIter =
2757 std::set<MoveNodeUse>& firstUseSet = firstUseIter->second;
2758 for (std::set<MoveNodeUse>::iterator iter2 = firstUseSet.begin();
2759 iter2 != firstUseSet.end(); iter2++) {
2767 for (MoveNodeUseMapSet::iterator firstDefineIter =
2770 firstDefineIter++) {
2772 std::set<MoveNodeUse>& firstDefineSet =
2773 firstDefineIter->second;
2774 for (std::set<MoveNodeUse>::iterator iter2=
2775 firstDefineSet.begin();
2776 iter2 != firstDefineSet.end(); iter2++) {
2786 for (MoveNodeUseMapSet::iterator firstUseIter =
2790 TCEString category = firstUseIter->first;
2791 std::set<MoveNodeUse>& firstUseSet = firstUseIter->second;
2792 for (std::set<MoveNodeUse>::iterator iter2 = firstUseSet.begin();
2793 iter2 != firstUseSet.end(); iter2++) {
2799 for (MoveNodeUseMapSet::iterator firstDefineIter =
2802 firstDefineIter++) {
2803 TCEString category = firstDefineIter->first;
2804 std::set<MoveNodeUse>& firstDefineSet = firstDefineIter->second;
2805 for (std::set<MoveNodeUse>::iterator iter2=firstDefineSet.begin();
2806 iter2 != firstDefineSet.end(); iter2++) {
2812 for (MoveNodeUseSet::iterator iter =
2815 Terminal& dest = iter->mn()->move().destination();
2837 for (MoveNodeUseSet::iterator iter =
2845 memUseReaches_[category].begin();
2862 for (MoveNodeUseSet::iterator iter =
2889 for (ControlFlowGraph::NodeSet::iterator iter =
2890 lastBBs.begin(); iter != lastBBs.end(); iter++) {
2928 std::list<BBData*>::iterator bbIter =
3000 bool alwaysDifferentFUs =
true;
3002 idx < srcMN->
move().annotationCount(
3010 ANN_ALLOWED_UNIT_DST)
3012 alwaysDifferentFUs =
false;
3016 return alwaysDifferentFUs;
3036 state_(BB_UNREACHED), constructed_(
false), bblock_(&bb) {
#define abortWithError(message)
#define PRINT_VAR(VARIABLE__)
#define assert(condition)
#define IGNORE_COMPILER_WARNING(X)
#define POP_COMPILER_DIAGS
static const int REG_RV_HIGH
static const int REG_IPARAM
find Finds info of the inner loops in the false
static MachInfoCmdLineOptions options
std::shared_ptr< ProgramOperation > ProgramOperationPtr
static CmdLineOptions * cmdLineOptions()
static const int VERBOSE_LEVEL_DEFAULT
Default verbose level - do not print anything unnecessary.
static int verboseLevel()
static std::ostream & logStream()
TTAProgram::BasicBlock & basicBlock()
InstructionAddress originalEndAddress() const
InstructionAddress originalStartAddress() const
virtual NodeSet successors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
Node & node(const int index) const
virtual const TCEString & name() const
virtual NodeSet predecessors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
virtual NodeSet sinkNodes() const
BasicBlockNode & entryNode() const
static std::string toHexString(T source, std::size_t digits=0, bool include0x=true)
static std::string toString(const T &source)
static int toInt(const T &source)
LiveRangeData::MoveNodeUseSet MoveNodeUseSet
void processMemWrite(MoveNodeUse mnd)
void checkAndCreateMemAntideps(MoveNodeUse &mnd, std::set< MoveNodeUse > &prevNodes, DataDependenceEdge::DependenceType depType, bool traceable)
void constructIndividualBB(ConstructionPhase phase)
DataDependenceGraph * currentDDG_
void findStaticRegisters(TTAProgram::CodeSnippet &cs, std::map< int, TCEString > ®isters)
find special register data from old frontend code
virtual ~DataDependenceGraphBuilder()
void createRegisterAntideps(const TCEString ®, MoveNodeUse &mnd, MoveNodeUseSet &predecessorNodes, DataDependenceEdge::DependenceType depType, bool guardedKillFound)
void processCall(MoveNode &mn)
bool updateRegistersAliveAfter(BBData &bbd)
static const TCEString RA_NAME
void updateBB(BBData &bbd, ConstructionPhase phase)
std::set< TCEString > allParamRegs_
void processSource(MoveNode &moveNode)
bool hasEarlierWriteWithSameGuard(MoveNodeUse &mnd, std::set< MoveNodeUse > &defines)
void processOperand(class MoveNode &moveNode, Operation &dop)
void processTriggerMemoryAndFUStates(MoveNode &moveNode, Operation &dop)
void clearUnneededBookkeeping()
void constructIndividualFromInlineAsmBB(ConstructionPhase phase)
void searchRegisterDeaths()
void processEntryNode(MoveNode &mn)
void createRegisterDeps()
void createSideEffectEdges(MoveNodeUseSet &prevMoves, const MoveNode &mn, Operation &dop)
std::set< MoveNodeUse > earlierWritesWithSameGuard(MoveNodeUse &mnd, std::set< MoveNodeUse > &defines)
void updatePreceedingRegistersUsedAfter(BBData &bbd, bool firstTime)
@ MEMORY_AND_SIDE_EFFECTS
@ REGISTERS_AND_PROGRAM_OPERATIONS
void createMemAndFUstateDeps()
bool isAddressTraceable(const ProgramOperation &pop)
void setSucceedingPredeps(BBData &bbd, bool queueAll, ConstructionPhase phase)
ControlFlowGraph::NodeSet BasicBlockNodeSet
@ BB_QUEUED
Basic block we have not yet encountered.
@ BB_READY
BB which is queued to be processed.
void iterateBBs(ConstructionPhase phase)
bool hasEarlierMemWriteToSameAddressWithSameGuard(MoveNodeUse &mnd, std::set< MoveNodeUse > &defines)
DataDependenceGraphBuilder()
void processTriggerRegistersAndOperations(MoveNode &moveNode, Operation &dop)
void processReturn(MoveNode &moveNode)
BasicBlockNode * currentBB_
SpecialRegisters specialRegisters_
contains stack pointer, RV and parameter registers.
void processRegUse(MoveNodeUse mn, const TCEString ®)
void processGuard(MoveNode &moveNode)
const TTAMachine::Machine * mach_
BasicBlockNode * queueFirstBB()
void initializeBBStates()
bool isTriggering(const MoveNode &mn)
void processResultRead(MoveNode &moveNode)
void updateMemUse(MoveNodeUse mnd, const TCEString &category)
void setSucceedingPredepsForBB(TTAProgram::BasicBlock &processedBB, BasicBlockNode &successor, bool queueAll, bool loop, ConstructionPhase phase)
bool checkAndCreateMemDep(MoveNodeUse prev, MoveNodeUse mnd, DataDependenceEdge::DependenceType depType)
void createTriggerDependencies(class MoveNode &moveNode, class Operation &dop)
void processTriggerPO(class MoveNode &moveNode, Operation &dop)
BBDataList blocksByState_[BB_STATES]
MemoryAliasAnalyzer::AliasingResult analyzeMemoryAlias(const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo)
void processDestination(class MoveNode &moveNode, ConstructionPhase phase)
bool updateRegistersUsedInOrAfter(BBData &bbd)
void changeState(BBData &bbd, BBState newState, bool priorize=false)
void addAliasAnalyzer(MemoryAliasAnalyzer *analyzer)
void processRegWrite(MoveNodeUse mn, const TCEString ®)
void updateMemWrite(MoveNodeUse mnd, const TCEString &category)
AliasAnalyzerVector aliasAnalyzers_
void createOperationEdges(ProgramOperationPtr po)
virtual DataDependenceGraph * build(ControlFlowGraph &cGraph, DataDependenceGraph::AntidependenceLevel antidependenceLevel, const TTAMachine::Machine &mach, const UniversalMachine *um=NULL, bool createMemAndFUDeps=true, bool createDeathInformation=true, llvm::AliasAnalysis *AA=NULL)
bool isAlwaysDifferentFU(const MoveNode *srcMN, const MoveNode *dstMN)
void processMemUse(MoveNodeUse mnd)
TCEString memoryCategory(const MoveNodeUse &mnd)
bool updateMemAndFuAliveAfter(BBData &bbd)
void iterateRegisterDeaths()
bool hasRegWaw(const MoveNodeUse &mnu, std::set< MoveNodeUse > targets) const
bool hasAllRegisterAntidependencies()
void addNode(MoveNode &moveNode)
void addProgramOperation(ProgramOperationPtr po)
bool exclusingGuards(const MoveNode &mn1, const MoveNode &mn2) const
MoveNode & nodeOfMove(const TTAProgram::Move &move)
bool sameGuards(const MoveNode &mn1, const MoveNode &mn2) const
bool hasIntraBBRegisterAntidependencies()
void updateRegUse(const MoveNodeUse &mnd, const TCEString ®, TTAProgram::BasicBlock &bb)
bool hasSingleBBLoopRegisterAntidependencies()
void setMachine(const TTAMachine::Machine &machine)
bool connectOrDeleteEdge(const MoveNode &tailNode, const MoveNode &headNode, DataDependenceEdge *edge)
DataDependenceGraph::EdgeSet updateRegWrite(const MoveNodeUse &mnd, const TCEString ®, TTAProgram::BasicBlock &bb)
static TCEString registerName(const TTAMachine::RegisterFile &rf, int index, char delim='.')
std::string errorMessageStack(bool messagesOnly=false) const
std::string fileName() const
virtual void writeToDotFile(const TCEString &fileName) const
std::set< GraphNode *, typename GraphNode::Comparator > NodeSet
bool hasDatum(const std::string &key) const
InterPassDatum & datum(const std::string &key)
virtual void setLLVMAA(llvm::AliasAnalysis *AA)
virtual bool disableLLVMAA() const
bool disableAddressSpaceAA() const
static int triggerIndex(const TTAMachine::Machine &machine, const Operation &op)
virtual AliasingResult analyze(DataDependenceGraph &ddg, const ProgramOperation &pop1, const ProgramOperation &pop2, MoveNodeUse::BBRelation bbInfo)=0
const MoveNode * mn() const
BBRelation bbRelation() const
void setSourceOperationPtr(ProgramOperationPtr po)
bool isDestinationOperation() const
std::string toString() const
TTAProgram::Move & move()
void addDestinationOperationPtr(ProgramOperationPtr po)
ProgramOperation & destinationOperation(unsigned int index=0) const
virtual bool readsMemory() const
virtual TCEString name() const
virtual int affectedByCount() const
virtual bool dependsOn(const Operation &op) const
virtual bool usesMemory() const
virtual bool hasSideEffects() const
virtual int affectsCount() const
virtual bool writesMemory() const
virtual int numberOfInputs() const
virtual int numberOfOutputs() const
static std::string disassemble(const TTAProgram::Move &move)
const Operation & operation() const
const llvm::MachineInstr * machineInstr() const
int inputMoveCount() const
std::string toString() const
MoveNode & inputMove(int index) const
virtual RFPort * port(const std::string &name) const
virtual TCEString name() const
int registerIndex() const
const RegisterFile * registerFile() const
int annotationCount(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
bool hasAnnotation(ProgramAnnotation::Id id, const TCEString &data) const
ProgramAnnotation annotation(int index, ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
bool hasAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
LiveRangeData * liveRangeData_
virtual int instructionCount() const
virtual Instruction & instructionAtIndex(int index) const
std::shared_ptr< Move > movePtr(int i) const
const TTAMachine::Guard & guard() const
bool isFunctionCall() const
MoveGuard & guard() const
bool isControlFlowMove() const
bool isUnconditional() const
std::string toString() const
Terminal & source() const
Terminal & destination() const
ProgramAnnotation::Id id() const
@ ANN_REGISTER_SP_READ
Stack Pointer read.
@ ANN_REGISTER_IPARAM_READ
Read from int param.
@ ANN_OPENCL_WORK_ITEM_ID
@ ANN_REGISTER_IPARAM_SAVE
Save to int param reg.
@ ANN_REGISTER_SP_SAVE
save to Stack pointer
@ ANN_POINTER_NAME
information retrieved (from LLVM) about a pointer access
@ ANN_ALLOWED_UNIT_DST
Dst. unit candidate.
@ ANN_REGISTER_RV_SAVE
Save to RV register.
@ ANN_STACKUSE_SPILL
spilled variable
@ ANN_STACKUSE_FP_SAVE
frame ptr save/load
@ ANN_STACKUSE_RA_SAVE
ra, new frontend
@ ANN_CONSTANT_MEM
Constant memory access.
@ ANN_REGISTER_RV_READ
Read from RV reg.
std::string stringValue() const
bool hasProgramOperation() const
these methods are used to group terminals belonging to a single program operation invocation
virtual Operation & hintOperation() const
ProgramOperationPtr programOperation() const
virtual bool isOpcodeSetting() const
virtual bool isGPR() const
virtual int operationIndex() const
virtual const TTAMachine::Port & port() const
virtual bool isFUPort() const
UnboundedRegisterFile & integerRegisterFile() const
BBState state_
State of the BB.
BBData(BasicBlockNode &bb)
ProgramOperationPtr readPending_
ProgramOperations lacking result read.
bool constructed_
Whether the BB has been constructed or not.
ProgramOperationPtr destPending_
ProgramOperations lacking operands.
MoveNodeUseMapSet memFirstDefines_
static bool appendUseMapSets(const MoveNodeUseMapSet &srcMap, MoveNodeUseMapSet &dstMap, bool addLoopProperty)
MoveNodeUseMapSet memUseReaches_
MoveNodeUseMapSet regFirstUses_
MoveNodeUseMapSet regLastUses_
MoveNodeUseSet fuDepAfter_
MoveNodeUseMapSet memLastUses_
MoveNodeUseSet fuDepReaches_
MoveNodeUseMapSet regUseAfter_
MoveNodeUseMapSet regUseReaches_
std::set< TCEString > registersUsedAfter_
MoveNodeUseMapSet regFirstDefines_
std::set< TCEString > inlineAsmClobbers_
MoveNodeUseMapSet memDefines_
MoveNodeUseMapSet regDefAfter_
std::set< TCEString > registersUsedInOrAfter_
MoveNodeUseMapPair regKills_
static void appendMoveNodeUse(const MoveNodeUseSet &src, MoveNodeUseSet &dst, bool setLoopProperty)
MoveNodeUseMapSet memDefAfter_
std::set< TCEString > inlineAsmRegDefs_
std::map< TCEString, std::pair< MoveNodeUse, bool > > potentialRegKills_
std::set< TCEString > inlineAsmRegUses_
MoveNodeUseMapPair regLastKills_
MoveNodeUseMapSet regDefines_
MoveNodeUseMapSet memUseAfter_
MoveNodeUseMapSet memDefReaches_
MoveNodeUseMapSet memFirstUses_
MoveNodeUseMap memLastKill_
MoveNodeUseMapSet regDefReaches_