#include <CFGIRInterface.hpp>


The CFGIRInterface abstract base class gives a set of methods for manipulating a program. This is the primary interface to the underlying intermediate representation.
Definition at line 77 of file CFGIRInterface.hpp.
| OA::CFG::CFGIRInterface::CFGIRInterface | ( | ) | [inline] |
Definition at line 79 of file CFGIRInterface.hpp.
| virtual OA::CFG::CFGIRInterface::~CFGIRInterface | ( | ) | [inline, virtual] |
Definition at line 81 of file CFGIRInterface.hpp.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::elseBody | ( | StmtHandle | h | ) | [pure virtual] |
Given a structured two-way conditional statement, return an IRRegionStmtIterator for the "else" part (i.e., the statements under the "else" clause).
| virtual IRStmtType OA::CFG::CFGIRInterface::getCFGStmtType | ( | StmtHandle | h | ) | [pure virtual] |
Given a statement, return its CFG::IRStmtType.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::getFirstInCompound | ( | StmtHandle | h | ) | [pure virtual] |
Given a compound statement, return an IRRegionStmtIterator for the statements. A compound is a list of statements.
| virtual StmtLabel OA::CFG::CFGIRInterface::getLabel | ( | StmtHandle | h | ) | [pure virtual] |
Given a statement, return a label (or StmtHandle(0) if there is no label associated with the statement).
| virtual StmtHandle OA::CFG::CFGIRInterface::getLoopIncrement | ( | StmtHandle | h | ) | [pure virtual] |
Given a loop statement, return the increment statement.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::getMultiCatchall | ( | StmtHandle | h | ) | [pure virtual] |
Given a structured multi-way branch, return an IRRegionStmtIterator for the body corresponding to default/catchall case.
| virtual ExprHandle OA::CFG::CFGIRInterface::getSMultiCondition | ( | StmtHandle | h, | |
| int | bodyIndex | |||
| ) | [pure virtual] |
Given a structured multi-way branch, return the condition expression corresponding to target 'bodyIndex'. The n targets are indexed [0..n-1].
| virtual StmtLabel OA::CFG::CFGIRInterface::getTargetLabel | ( | StmtHandle | h, | |
| int | n | |||
| ) | [pure virtual] |
Given an unstructured two-way branch, return the label of the target statement. The second parameter is currently unused.
| virtual StmtLabel OA::CFG::CFGIRInterface::getUMultiCatchallLabel | ( | StmtHandle | h | ) | [pure virtual] |
Given an unstructured multi-way branch, return label of the target corresponding to the optional default/catchall case. Return 0 if there is no default target.
| virtual ExprHandle OA::CFG::CFGIRInterface::getUMultiCondition | ( | StmtHandle | h, | |
| int | targetIndex | |||
| ) | [pure virtual] |
| virtual StmtLabel OA::CFG::CFGIRInterface::getUMultiTargetLabel | ( | StmtHandle | h, | |
| int | targetIndex | |||
| ) | [pure virtual] |
Given an unstructured multi-way branch, return the label of the target statement at 'targetIndex'. The n targets are indexed [0..n-1].
| virtual bool OA::CFG::CFGIRInterface::isBreakImplied | ( | StmtHandle | multicond | ) | [pure virtual] |
Given a structured multi-way branch, return true if the cases have implied break semantics. For example, this method would return false for C since one case will fall-through to the next if there is no explicit break statement. Matlab, on the other hand, implicitly exits the switch statement once a particular case has executed, so this method would return true.
| virtual bool OA::CFG::CFGIRInterface::isCatchAll | ( | StmtHandle | h, | |
| int | bodyIndex | |||
| ) | [pure virtual] |
Given a structured multi-way branch, return true if the body corresponding to target 'bodyIndex' is the default/catchall/ case.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::loopBody | ( | StmtHandle | h | ) | [pure virtual] |
Given a loop statement, return an IRRegionStmtIterator for the loop body.
| virtual StmtHandle OA::CFG::CFGIRInterface::loopHeader | ( | StmtHandle | h | ) | [pure virtual] |
Given a loop statement, return the loop header statement. This would be the initialization statement in a C 'for' loop, for example.
| virtual bool OA::CFG::CFGIRInterface::loopIterationsDefinedAtEntry | ( | StmtHandle | h | ) | [pure virtual] |
Given a loop statement, return:
True: If the number of loop iterations is defined at loop entry (i.e. Fortran semantics). This causes the CFG builder to add the loop statement representative to the header node so that definitions from inside the loop don't reach the condition and increment specifications in the loop statement.
False: If the number of iterations is not defined at entry (i.e. C semantics), we add the loop statement to a node that is inside the loop in the CFG so definitions inside the loop will reach uses in the conditional test. For C style semantics, the increment itself may be a separate statement. if so, it will appear explicitly at the bottom of the loop.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::multiBody | ( | StmtHandle | h, | |
| int | bodyIndex | |||
| ) | [pure virtual] |
Given a structured multi-way branch, return an IRRegionStmtIterator for the body corresponding to target 'bodyIndex'. The n targets are indexed [0..n-1].
| virtual int OA::CFG::CFGIRInterface::numberOfDelaySlots | ( | StmtHandle | h | ) | [pure virtual] |
Given an unstructured branch/jump statement, return the number of delay slots. Again, this would be used when the underlying IR is a low-level/assembly-level language for a VLIW or superscalar instruction set. The default implementation (which is appropriate for most IR's) is to return 0.
Implemented in OA::CFG::CFGIRInterfaceDefault.
| virtual int OA::CFG::CFGIRInterface::numMultiCases | ( | StmtHandle | h | ) | [pure virtual] |
Given a structured multi-way branch, return the number of cases. The count does not include the default/catchall case.
| virtual int OA::CFG::CFGIRInterface::numUMultiTargets | ( | StmtHandle | h | ) | [pure virtual] |
Given an unstructured multi-way branch, return the number of targets. The count does not include the optional default/catchall case.
| virtual bool OA::CFG::CFGIRInterface::parallelWithSuccessor | ( | StmtHandle | h | ) | [pure virtual] |
Given a statement, return true if it issues in parallel with its successor. This would be used, for example, when the underlying IR is a low-level/assembly-level language for a VLIW or superscalar instruction set. The default implementation (which is appropriate for most IR's) is to return false.
Implemented in OA::CFG::CFGIRInterfaceDefault.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::procBody | ( | ProcHandle | h | ) | [pure virtual] |
Given a ProcHandle, return an IRRegionStmtIterator* for the procedure.
| virtual bool OA::CFG::CFGIRInterface::returnStatementsAllowed | ( | ) | [pure virtual] |
Are return statements allowed.
| virtual OA_ptr<IRRegionStmtIterator> OA::CFG::CFGIRInterface::trueBody | ( | StmtHandle | h | ) | [pure virtual] |
Given a structured two-way conditional statement, return an IRRegionStmtIterator for the "true" part (i.e., the statements under the "if" clause).
1.7.1