OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TTAProgram::Procedure Class Reference

#include <Procedure.hh>

Inheritance diagram for TTAProgram::Procedure:
Inheritance graph
Collaboration diagram for TTAProgram::Procedure:
Collaboration graph

Public Member Functions

 Procedure (const TCEString &name, const TTAMachine::AddressSpace &space)
 
 Procedure (const TCEString &name, const TTAMachine::AddressSpace &space, UIntWord startLocation)
 
virtual ~Procedure ()
 
TCEString name () const
 
int alignment () const
 
Address address (const Instruction &ins) const
 
void addFront (Instruction *)
 
void add (Instruction *ins)
 
void insertAfter (const Instruction &pos, Instruction *ins)
 
void insertBefore (const Instruction &pos, Instruction *ins)
 
void clear ()
 
void remove (Instruction &ins)
 
CodeSnippetcopy () const
 
virtual void insertAfter (const Instruction &pos, Instruction *ins)
 
virtual void insertAfter (const Instruction &pos, const CodeSnippet &cs)
 
virtual void insertAfter (const Instruction &pos, CodeSnippet *cs)
 
virtual void insertBefore (const Instruction &pos, Instruction *ins)
 
virtual void insertBefore (const Instruction &pos, const CodeSnippet &cs)
 
virtual void insertBefore (const Instruction &pos, CodeSnippet *cs)
 
- Public Member Functions inherited from TTAProgram::CodeSnippet
 CodeSnippet ()
 
 CodeSnippet (const TTAProgram::Address &start)
 
virtual ~CodeSnippet ()
 
virtual void removeLastInstruction ()
 
virtual int instructionCount () const
 
virtual Programparent () const
 
virtual void setParent (Program &prog)
 
virtual bool isInProgram () const
 
virtual Address startAddress () const
 
virtual void setStartAddress (Address start)
 
virtual Address endAddress () const
 
virtual void setEndAddress (Address end)
 
virtual InstructionfirstInstruction () const
 
virtual InstructioninstructionAt (UIntWord address) const
 
virtual InstructioninstructionAtIndex (int index) const
 
virtual Instructionoperator[] (size_t index) const
 
virtual bool hasNextInstruction (const Instruction &ins) const
 
virtual InstructionnextInstruction (const Instruction &ins) const
 
virtual InstructionpreviousInstruction (const Instruction &ins) const
 
virtual InstructionlastInstruction () const
 
virtual void deleteInstructionAt (InstructionAddress address)
 
virtual void prepend (const CodeSnippet &cs)
 
virtual void prepend (CodeSnippet *cs)
 
virtual void append (const CodeSnippet &cs)
 
virtual void append (CodeSnippet *cs)
 
virtual void insertBefore (const Instruction &pos, const CodeSnippet &cs)
 
virtual void insertBefore (const Instruction &pos, CodeSnippet *cs)
 
virtual void insertAfter (const Instruction &pos, const CodeSnippet &cs)
 
virtual void insertAfter (const Instruction &pos, CodeSnippet *cs)
 
bool hasReturn () const
 
virtual std::string disassembly () const
 
virtual std::string toString () const
 

Private Member Functions

 Procedure (const Procedure &)
 Copying not allowed. More...
 
Procedureoperator= (const Procedure &)
 Assignment not allowed. More...
 

Private Attributes

const TCEString name_
 The name of the procedure. More...
 
int alignment_
 The alignment of instructions. More...
 

Static Private Attributes

static const int INSTRUCTION_INDEX_ALIGNMENT = 1
 The default alignment of instructions. More...
 

Additional Inherited Members

- Protected Types inherited from TTAProgram::CodeSnippet
typedef std::vector< Instruction * > InsList
 List of instructions. More...
 
typedef InsList::iterator InsIter
 Iterator for the instruction list. More...
 
- Protected Attributes inherited from TTAProgram::CodeSnippet
InsList instructions_
 The instructions in this procedure. More...
 
Programparent_
 The parent program of the procedure. More...
 
Address startAddr_
 The start (lowest) address of the procedure. More...
 
Address endAddr_
 The highest address of the procedure. More...
 

Detailed Description

Represents a TTA procedure.

Definition at line 55 of file Procedure.hh.

Constructor & Destructor Documentation

◆ Procedure() [1/3]

TTAProgram::Procedure::Procedure ( const TCEString name,
const TTAMachine::AddressSpace space 
)

Constructor.

Create an empty procedure in given address space. Automatically create an empty procedure scope to store all program symbols that are local to this procedure. The default value zero will be used for the start location. Alignment is 1 MAU.

Parameters
nameName of the procedure.
spaceThe address space of the procedure.

Definition at line 59 of file Procedure.cc.

60  :
61  CodeSnippet(Address(0, space)), name_(name) {
62 }

Referenced by copy().

◆ Procedure() [2/3]

TTAProgram::Procedure::Procedure ( const TCEString name,
const TTAMachine::AddressSpace space,
UIntWord  startLocation 
)

Alternative constructor that takes the start location of the procedure.

Parameters
nameName of the procedure.
spaceThe address space of the procedure.
startLocationThe start location of the procedure.

Definition at line 71 of file Procedure.cc.

73  :
74  CodeSnippet(Address(startLocation, space)), name_(name) {
75 }

◆ ~Procedure()

TTAProgram::Procedure::~Procedure ( )
virtual

Destructor

Definition at line 80 of file Procedure.cc.

80  {
81 }

◆ Procedure() [3/3]

TTAProgram::Procedure::Procedure ( const Procedure )
private

Copying not allowed.

Member Function Documentation

◆ add()

void TTAProgram::Procedure::add ( Instruction ins)
virtual

Adds an instruction as the last instruction in the procedure.

Remaining procedures in the parent program will be relocated as needed. The ownership of the instruction will be passed to the procedure.

Parameters
insThe instruction to add.
Exceptions
IllegalRegistrationif the instruction is already registered in another procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 160 of file Procedure.cc.

160  {
161  if (!ins->isInProcedure() || &ins->parent() == this) {
162 
163  if (instructions_.size() == instructions_.capacity()) {
164  instructions_.reserve(instructions_.size() * 2);
165  }
166 
167  ins->setParent(*this);
168  instructions_.push_back(ins);
169 
170  // if registered to a program, tell to move the procedures
171  // after the added instruction
172  if (parent_ != NULL && this != &parent_->lastProcedure()) {
174  parent_->nextProcedure(*this), 1);
175  }
176 
177  } else {
178  throw IllegalRegistration(__FILE__, __LINE__);
179  }
180 }

References TTAProgram::CodeSnippet::instructions_, TTAProgram::Instruction::isInProcedure(), TTAProgram::Program::lastProcedure(), TTAProgram::Program::moveProcedure(), TTAProgram::Program::nextProcedure(), TTAProgram::Instruction::parent(), TTAProgram::CodeSnippet::parent_, and TTAProgram::Instruction::setParent().

Referenced by ProgrammabilityValidator::addConnectionToProgram(), copy(), TTAProgram::Program::copyFrom(), TTAProgram::CodeGenerator::createSchedYieldProcedure(), insertAfter(), and llvm::LLVMTCEBuilder::writeMachineFunction().

Here is the call graph for this function:

◆ addFront()

void TTAProgram::Procedure::addFront ( Instruction ins)
inlinevirtual

Adds an instruction as the first instruction in the code snippet.

The ownership of the instruction will be passed to the code snippet.

Parameters
insThe instruction to add.
Exceptions
IllegalRegistrationif the instruction is already registered in another code snippet.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 73 of file Procedure.hh.

73  {
74  abortWithError("Not Implemented yet.");
75  }

References abortWithError.

◆ address()

Address TTAProgram::Procedure::address ( const Instruction ins) const
virtual

Returns the address of the given instruction.

Returns
The address of the given instruction.
Exceptions
IllegalRegistrationif the instruction does not belong to this procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 101 of file Procedure.cc.

101  {
102  if (isInProgram() && ins.hasFinalAddress())
103  return ins.address();
104 
105  assert (!isInProgram() || parent().isInstructionPerAddress());
106 
107  // In case the instruction does not have a fixed final address,
108  // compute it according to its current position in the instruction.
109  unsigned int i = 0;
110 
111  /* This loop is executed very often so
112  uses pre-computed size and [] for performance reasons.
113  TO CLEANUP: std::find() ? */
114  const unsigned int size = instructions_.size();
115  while (i < size && instructions_[i] != &ins) {
116  i++;
117  }
118 
119  if (i < instructions_.size()) {
120  Address insAddress(
122  return insAddress;
123  } else {
124  throw IllegalRegistration(__FILE__, __LINE__);
125  }
126 }

References TTAProgram::Instruction::address(), assert, TTAProgram::Instruction::hasFinalAddress(), TTAProgram::CodeSnippet::instructions_, TTAProgram::CodeSnippet::isInProgram(), TTAProgram::Address::location(), TTAProgram::CodeSnippet::parent(), TTAProgram::Address::space(), and TTAProgram::CodeSnippet::startAddr_.

Referenced by AbsoluteToRelativeJumps::handleProcedure().

Here is the call graph for this function:

◆ alignment()

int TTAProgram::Procedure::alignment ( ) const

Returns the alignment.

Returns
The alignment.

Definition at line 89 of file Procedure.cc.

89  {
90  return alignment_;
91 }

References alignment_.

Referenced by ControlFlowGraph::buildFrom().

◆ clear()

void TTAProgram::Procedure::clear ( )
virtual

Clears a procedure, updates addresses of following addresses.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 345 of file Procedure.cc.

345  {
346  int insCount = instructionCount();
348 
349  if (parent_ != NULL && this != &parent_->lastProcedure()) {
351  parent_->nextProcedure(*this), -insCount);
352  }
353 }

References TTAProgram::CodeSnippet::clear(), TTAProgram::CodeSnippet::instructionCount(), TTAProgram::Program::lastProcedure(), TTAProgram::Program::moveProcedure(), TTAProgram::Program::nextProcedure(), and TTAProgram::CodeSnippet::parent_.

Referenced by SequentialScheduler::copyBasicBlocksToProcedure(), ControlFlowGraph::copyToProcedure(), and BBSchedulerController::handleProcedure().

Here is the call graph for this function:

◆ copy()

CodeSnippet * TTAProgram::Procedure::copy ( ) const
virtual

Make a complete copy of the procedure.

The copy is identical, except that it is not registered to the program of the original procedure.

Returns
A complete copy of the procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 137 of file Procedure.cc.

137  {
138 
139  Procedure* newProc = new Procedure(
141  for (int i = 0; i < instructionCount(); i++) {
142  Instruction* insCopy = instructionAtIndex(i).copy();
143  newProc->add(insCopy);
144  }
145  return newProc;
146 }

References add(), TTAProgram::Instruction::copy(), TTAProgram::CodeSnippet::instructionAtIndex(), TTAProgram::CodeSnippet::instructionCount(), TTAProgram::Address::location(), name_, Procedure(), TTAProgram::Address::space(), and TTAProgram::CodeSnippet::startAddr_.

Referenced by TTAProgram::Program::link().

Here is the call graph for this function:

◆ insertAfter() [1/4]

void TTAProgram::CodeSnippet::insertAfter

Inserts a whole code snippet into this code snippet just after specified instruction.

This function moves the ownership of the moves and deletes the another code snippet.

Parameters
insThe succeeding the place where to insert he instructions.
csCodeSnippet containing the instructions being inserted.

Definition at line 690 of file CodeSnippet.cc.

691  {
692 
693  for (int i = cs->instructionCount()-1; i >= 0 ; i-- ) {
694  Instruction& ins = cs->instructionAtIndex(i);
695  cs->remove(ins);
696  insertAfter(pos, &ins);
697  }
698  delete cs;
699 }

◆ insertAfter() [2/4]

void TTAProgram::CodeSnippet::insertAfter

Inserts a whole code snippet into this code snippet just after specified instruction.

This function does not remove the instruction references from the code snippet.

Parameters
insThe succeeding the place where to insert he instructions.
csCodeSnippet containing the instructions being inserted.

Definition at line 671 of file CodeSnippet.cc.

672  {
673 
674  for (int i = cs.instructionCount()-1; i >= 0 ; i-- ) {
675  insertAfter(pos, cs.instructionAtIndex(i).copy());
676  }
677 }

◆ insertAfter() [3/4]

void TTAProgram::Procedure::insertAfter ( const Instruction pos,
Instruction ins 
)
virtual

Insert the given instruction after the given position.

Instructions from pos are relocated to make room for the new instruction.

Parameters
posThe position.
insThe instruction to insert.
Exceptions
IllegalRegistrationif pos does not belong to the procedure or ins already belongs to a procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 193 of file Procedure.cc.

193  {
194  if (!ins->isInProcedure()) {
195  for (InsList::iterator iter = instructions_.begin();
196  iter != instructions_.end(); iter++) {
197 
198  if ((*iter) == &pos) {
199  iter++;
200  if (iter != instructions_.end()) {
201  ins->setParent(*this);
202  instructions_.insert(iter, ins);
203 
204  // if registered to a program, tell to move the procedures
205  // after this procedure
206  if (parent_ != NULL && this != &parent_->lastProcedure()) {
208  parent_->nextProcedure(*this), 1);
209  }
210  return;
211  } else { // end of procedure
212  add(ins);
213  return;
214  }
215  }
216  }
217  // should not go here in any case
218  throw IllegalRegistration(
219  __FILE__,__LINE__,__func__,"pos not in this procedure");
220 
221  } else {
222  throw IllegalRegistration(
223  __FILE__, __LINE__, "CodeSnippet::insertInstructionBefore",
224  "Instruction already belongs to a procedure.");
225  }
226 }

References __func__, add(), TTAProgram::CodeSnippet::instructions_, TTAProgram::Instruction::isInProcedure(), TTAProgram::Program::lastProcedure(), TTAProgram::Program::moveProcedure(), TTAProgram::Program::nextProcedure(), TTAProgram::CodeSnippet::parent_, and TTAProgram::Instruction::setParent().

Referenced by ProcedurePass::copyCfgToProcedure().

Here is the call graph for this function:

◆ insertAfter() [4/4]

void TTAProgram::CodeSnippet::insertAfter

Insert the given instruction after the given position.

Instructions from pos are relocated to make room for the new instruction.

Parameters
posThe position.
insThe instruction to insert.
Exceptions
IllegalRegistrationif pos does not belong to the code snippet or ins already belongs to a code snippet.

Definition at line 462 of file CodeSnippet.cc.

462  {
463  if (!ins->isInProcedure()) {
464 
465  if (hasNextInstruction(pos)) {
466 
467  InsList::iterator iter = instructions_.begin();
468  Instruction& next = nextInstruction(pos);
469 
470  while (iter != instructions_.end()) {
471 
472  if ((*iter) == &next) {
473 
474  ins->setParent(*this);
475 
476  iter = instructions_.insert(iter, ins);
477 
478  iter++;
479 
480  return;
481  }
482 
483  iter++;
484  }
485 
486  // should not go here in any case
487  assert(false);
488 
489  } else {
490  add(ins);
491  }
492 
493  } else {
494  throw IllegalRegistration(
495  __FILE__, __LINE__, "CodeSnippet::insertInstructionBefore",
496  "Instruction already belongs to a procedure.");
497  }
498 }

◆ insertBefore() [1/4]

void TTAProgram::CodeSnippet::insertBefore

Inserts a whole code snippet into this code snippet just before specified instruction. This function moves the ownership of the moves and deletes the another code snippet.

Parameters
insThe succeeding the place where to insert he instructions.
csCodeSnippet containing the instructions being inserted.

Definition at line 650 of file CodeSnippet.cc.

651  {
652  for( int i = 0, count = cs->instructionCount(); i < count; i++ ) {
653  Instruction& ins = cs->instructionAtIndex(0);
654  cs->remove(ins);
655  insertBefore(pos, &ins);
656  }
657  delete cs;
658  }

◆ insertBefore() [2/4]

void TTAProgram::CodeSnippet::insertBefore

Inserts a whole code snippet into this code snippet just before specified instruction.

This function does not remove the instruction references from the code snippet.

Parameters
insThe succeeding the place where to insert he instructions.
csCodeSnippet containing the instructions being inserted.

Definition at line 632 of file CodeSnippet.cc.

633  {
634  for( int i = 0; i < cs.instructionCount(); i++ ) {
635  insertBefore(pos, cs.instructionAtIndex(i).copy());
636  }
637  }

◆ insertBefore() [3/4]

void TTAProgram::Procedure::insertBefore ( const Instruction pos,
Instruction ins 
)
virtual

Insert the given instruction before the given position.

Instructions from and including pos are relocated to make room for the new instruction.

Todo:
Refactor and share implementation with insertInstructionAfter()
Parameters
posThe position.
insThe instruction to insert.
Exceptions
IllegalRegistrationif pos does not belong to the procedure or ins already belongs to a procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 242 of file Procedure.cc.

242  {
243  if (!ins->isInProcedure()) {
244 
245  InsList::iterator iter = instructions_.begin();
246  const Instruction& next = pos;
247 
248  while (iter != instructions_.end()) {
249 
250  if ((*iter) == &next) {
251 
252  ins->setParent(*this);
253 
254  iter = instructions_.insert(iter, ins);
255 
256  iter++;
257 
258  // if registered to a program, tell to move the procedures
259  // after this procedure
260  if (parent_ != NULL && this != &parent_->lastProcedure()) {
262  parent_->nextProcedure(*this), 1);
263  }
264  return;
265  }
266 
267  iter++;
268  }
269 
270  // should not go here in any case
271  assert(false);
272 
273  } else {
274  throw IllegalRegistration(
275  __FILE__, __LINE__, "CodeSnippet::insertInstructionBefore",
276  "Instruction already belongs to a procedure.");
277  }
278 }

References assert, TTAProgram::CodeSnippet::instructions_, TTAProgram::Instruction::isInProcedure(), TTAProgram::Program::lastProcedure(), TTAProgram::Program::moveProcedure(), TTAProgram::Program::nextProcedure(), TTAProgram::CodeSnippet::parent_, and TTAProgram::Instruction::setParent().

Here is the call graph for this function:

◆ insertBefore() [4/4]

void TTAProgram::CodeSnippet::insertBefore

Insert the given instruction before the given position.

Instructions from and including pos are relocated to make room for the new instruction.

Todo:
Refactor and share implementation with insertInstructionAfter()
Parameters
posThe position.
insThe instruction to insert.
Exceptions
IllegalRegistrationif pos does not belong to the code snippet or ins already belongs to a code snippet.

Definition at line 514 of file CodeSnippet.cc.

514  {
515  if (!ins->isInProcedure()) {
516 
517  InsList::iterator iter = instructions_.begin();
518  const Instruction& next = pos;
519 
520  while (iter != instructions_.end()) {
521 
522  if ((*iter) == &next) {
523 
524  ins->setParent(*this);
525  iter = instructions_.insert(iter, ins);
526  iter++;
527  return;
528  }
529  iter++;
530  }
531  // should not go here in any case
532  assert(false);
533  } else {
534  throw IllegalRegistration(
535  __FILE__, __LINE__, "CodeSnippet::insertInstructionBefore",
536  "Instruction already belongs to a procedure.");
537  }
538 }

◆ name()

TCEString TTAProgram::Procedure::name ( ) const
inline

◆ operator=()

Procedure& TTAProgram::Procedure::operator= ( const Procedure )
private

Assignment not allowed.

◆ remove()

void TTAProgram::Procedure::remove ( Instruction ins)
virtual

Remove instruction from the procedure.

The instruction becomes independent (it is not deleted). All instructions following the removed procedure are relocated appropriately. All code labels attached to the removed instruction are deleted from the Program.

Note
Possible references to the instruction elsewhere in the program are not automatically fixed! It's a responsibility of the caller to fix the Program back to a consistent state.
Parameters
insInstruction to remove.
Exceptions
IllegalRegistrationIf instruction does not belong to the procedure.

Reimplemented from TTAProgram::CodeSnippet.

Definition at line 297 of file Procedure.cc.

297  {
298  bool first = false;
299  bool refs = false;
300 
301  if( parent_ != NULL ) {
302  InstructionReferenceManager& irm =
304  refs = irm.hasReference(ins);
305  }
306 
307  if (!ins.isInProcedure() || !(&ins.parent() == this)) {
308  string msg = "Instruction doesn't belong to the procedure.";
309  throw IllegalRegistration(__FILE__, __LINE__, __func__, msg);
310  }
311 
312  if (&ins == &firstInstruction()) {
313  first = true;
314  }
315 
316  int insIndex = 0;
317  for (InsList::iterator iter = instructions_.begin();
318  iter != instructions_.end(); iter++, insIndex++) {
319  if ((*iter) == &ins) {
320 
321  iter = instructions_.erase(iter);
322  const InstructionAddress addr = startAddr_.location() + insIndex;
323 
324  // remove code label of first instruction only if empty
325  if ((!first && refs) || instructions_.empty()) {
327  }
328 
329  ins.setParent(NullProcedure::instance());
330 
331  if (parent_ != NULL && this != &parent_->lastProcedure()) {
333  parent_->nextProcedure(*this), -1);
334  }
335 
336  return;
337  }
338  }
339 }

References __func__, TTAProgram::CodeSnippet::firstInstruction(), TTAProgram::Program::globalScope(), TTAProgram::InstructionReferenceManager::hasReference(), TTAProgram::NullProcedure::instance(), TTAProgram::Program::instructionReferenceManager(), TTAProgram::CodeSnippet::instructions_, TTAProgram::Instruction::isInProcedure(), TTAProgram::Program::lastProcedure(), TTAProgram::Address::location(), TTAProgram::Program::moveProcedure(), TTAProgram::Program::nextProcedure(), TTAProgram::CodeSnippet::parent(), TTAProgram::Instruction::parent(), TTAProgram::CodeSnippet::parent_, TTAProgram::GlobalScope::removeCodeLabels(), TTAProgram::Instruction::setParent(), and TTAProgram::CodeSnippet::startAddr_.

Referenced by ProcedurePass::copyCfgToProcedure(), and TTAProgram::CodeGenerator::createSchedYieldProcedure().

Here is the call graph for this function:

Member Data Documentation

◆ alignment_

int TTAProgram::Procedure::alignment_
private

The alignment of instructions.

Definition at line 99 of file Procedure.hh.

Referenced by alignment().

◆ INSTRUCTION_INDEX_ALIGNMENT

const int TTAProgram::Procedure::INSTRUCTION_INDEX_ALIGNMENT = 1
staticprivate

The default alignment of instructions.

Definition at line 101 of file Procedure.hh.

◆ name_

const TCEString TTAProgram::Procedure::name_
private

The name of the procedure.

Definition at line 97 of file Procedure.hh.

Referenced by copy(), and name().


The documentation for this class was generated from the following files:
InstructionAddress
UInt32 InstructionAddress
Definition: BaseType.hh:175
TTAProgram::CodeSnippet::firstInstruction
virtual Instruction & firstInstruction() const
Definition: CodeSnippet.cc:216
TTAProgram::CodeSnippet::clear
virtual void clear()
Definition: CodeSnippet.cc:89
TTAProgram::NullProcedure::instance
static NullProcedure & instance()
Definition: NullProcedure.cc:68
TTAProgram::Address::space
const TTAMachine::AddressSpace & space() const
TTAProgram::Procedure::insertAfter
void insertAfter(const Instruction &pos, Instruction *ins)
Definition: Procedure.cc:193
TTAProgram::CodeSnippet::nextInstruction
virtual Instruction & nextInstruction(const Instruction &ins) const
Definition: CodeSnippet.cc:318
TTAProgram::Procedure::name_
const TCEString name_
The name of the procedure.
Definition: Procedure.hh:97
TTAProgram::Procedure::alignment_
int alignment_
The alignment of instructions.
Definition: Procedure.hh:99
assert
#define assert(condition)
Definition: Application.hh:86
TTAProgram::Program::nextProcedure
Procedure & nextProcedure(const Procedure &proc) const
Definition: Program.cc:250
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
TTAProgram::Program::moveProcedure
void moveProcedure(Procedure &proc, int howMuch)
Definition: Program.cc:588
TTAProgram::CodeSnippet::instructionCount
virtual int instructionCount() const
Definition: CodeSnippet.cc:205
TTAProgram::Instruction::copy
Instruction * copy() const
Definition: Instruction.cc:379
TTAProgram::InstructionReferenceManager::hasReference
bool hasReference(Instruction &ins) const
Definition: InstructionReferenceManager.cc:143
__func__
#define __func__
Definition: Application.hh:67
TTAProgram::CodeSnippet::hasNextInstruction
virtual bool hasNextInstruction(const Instruction &ins) const
Definition: CodeSnippet.cc:303
TTAProgram::Address::location
InstructionAddress location() const
TTAProgram::Procedure::insertBefore
void insertBefore(const Instruction &pos, Instruction *ins)
Definition: Procedure.cc:242
TTAProgram::GlobalScope::removeCodeLabels
virtual void removeCodeLabels(InstructionAddress address)
Definition: GlobalScope.cc:363
IllegalRegistration
Definition: Exception.hh:532
TTAProgram::Procedure::add
void add(Instruction *ins)
Definition: Procedure.cc:160
TTAProgram::Program::instructionReferenceManager
InstructionReferenceManager & instructionReferenceManager() const
Definition: Program.cc:688
TTAProgram::CodeSnippet::parent
virtual Program & parent() const
Definition: CodeSnippet.cc:118
TTAProgram::Procedure::Procedure
Procedure(const TCEString &name, const TTAMachine::AddressSpace &space)
Definition: Procedure.cc:59
TTAProgram::CodeSnippet::parent_
Program * parent_
The parent program of the procedure.
Definition: CodeSnippet.hh:128
TTAProgram::Procedure::name
TCEString name() const
Definition: Procedure.hh:66
TTAProgram::CodeSnippet::instructionAtIndex
virtual Instruction & instructionAtIndex(int index) const
Definition: CodeSnippet.cc:285
TTAProgram::Program::lastProcedure
Procedure & lastProcedure() const
Definition: Program.cc:230
TTAProgram::Program::globalScope
GlobalScope & globalScope()
Definition: Program.cc:180
TTAProgram::CodeSnippet::instructions_
InsList instructions_
The instructions in this procedure.
Definition: CodeSnippet.hh:126
TTAProgram::CodeSnippet::startAddr_
Address startAddr_
The start (lowest) address of the procedure.
Definition: CodeSnippet.hh:130
TTAProgram::CodeSnippet::CodeSnippet
CodeSnippet()
Definition: CodeSnippet.cc:55
TTAProgram::CodeSnippet::isInProgram
virtual bool isInProgram() const
Definition: CodeSnippet.cc:151