Go to the documentation of this file.
65 originalStartAddress_(originalStartAddress),
66 originalEndAddress_(originalEndAddress),
67 hasOriginalAddress_(true),
68 basicBlock_(new
TTAProgram::BasicBlock(originalStartAddress)),
70 entry_(entry), exit_(exit),
72 isHardwareLoop_(
false),
73 successor_(NULL), predecessor_(NULL), maximumSize_(INT_MAX) {
81 "Basic block start address is higher then it's end address");
94 int originalStartAddress,
bool loopScheduled) :
95 originalStartAddress_(originalStartAddress), originalEndAddress_(0),
96 hasOriginalAddress_(
false), basicBlock_(&bb), bbOwned_(
false),
98 scheduled_(scheduled), refsUpdated_(refsUpdated),
99 loopScheduled_(loopScheduled),
100 isHardwareLoop_(
false),
101 successor_(NULL), predecessor_(NULL), maximumSize_(INT_MAX) {
190 if (iCount >
basicBlock().skippedFirstInstructions()) {
208 for (
int i = 3; i >= 0; --i) {
209 int loc = iCount - i - 1;
210 if (loc <=
basicBlock().skippedFirstInstructions())
215 content <<
"\\n...\\n";
217 content << loc <<
": ";
282 std::pair<TTAProgram::Move*,TTAProgram::Move*>
284 std::pair<TTAProgram::Move*, TTAProgram::Move*> moves(NULL,NULL);
287 for (
int j = 0; j < ins.
moveCount(); j++) {
290 if (moves.second == NULL) {
291 moves.second = &move;
311 for (
int j = 0; j < ins.
moveCount(); j++) {
313 if (move.
toString().find(
"hwloop") != std::string::npos &&
317 assert(s.isImmediate() &&
"hwloop instruction should be imm");
345 refManager.
replace(oldIns, newIns);
const BasicBlockStatistics & statistics()
bool isTriggering() const
UInt32 InstructionAddress
virtual Instruction & firstInstruction() const
BasicBlockNode * predecessor_
bool hasOriginalAddress_
not all basic blocks have original addresses (completely new basic blocks, etc.), this flag is true i...
std::pair< TTAProgram::Move *, TTAProgram::Move * > findJumps()
InstructionAddress originalEndAddress() const
BasicBlockNode * successor_
int sourceLineNumber() const
void link(BasicBlockNode *succ)
std::string toString() const
std::string toString() const
InstructionAddress originalEndAddress_
end address of the original basic block, used for reconstructing the original program after modifying...
InstructionAddress originalStartAddress_
start address of the original basic block, used for reconstructing the original program after modifyi...
const TTAProgram::BasicBlockStatistics & statistics()
TTAProgram::BasicBlock & basicBlock()
#define assert(condition)
Instruction & instructionAt(InstructionAddress address) const
void updateHWloopLength(unsigned len)
int skippedFirstInstructions() const
virtual int instructionCount() const
const BasicBlockNode * successor() const
bool hasReference(Instruction &ins) const
void replace(Instruction &insA, Instruction &insB)
void updateReferencesFromProcToCfg(TTAProgram::Program &prog)
virtual ~BasicBlockNode()
virtual Instruction & lastInstruction() const
BasicBlockNode(InstructionAddress originalStartAddress, InstructionAddress originalEndAddress, bool entry=false, bool exit=false)
bool bbOwned_
true if the BasicBlock is owned by the BasicBlockNode
TTAProgram::BasicBlock * basicBlock_
the actual payload data of the graph node (the basic block)
bool exit_
true if this is an exit basic block (not real one)
bool hasSourceLineNumber() const
InstructionReferenceManager & instructionReferenceManager() const
find Finds info of the inner loops in the false
bool hasOriginalAddress() const
virtual Instruction & instructionAtIndex(int index) const
Terminal & source() const
int maximumSize_
Maximum number of instructions this can consume when scheduled.
bool entry_
true if this is an entry basic block (not real one)
InstructionAddress originalStartAddress() const
std::string toString() const
void setSource(Terminal *src)