systemc-clang 2.0.0
Parsing SystemC constructs
|
#include <SplitCFGBlock.h>
Classes | |
struct | SuccessorIterator |
Public Types | |
using | VectorCFGElementPtr = llvm::SmallVector<const clang::CFGElement *> |
using | VectorCFGElementPtrImpl |
using | VectorSplitCFGBlockPtr = llvm::SmallVector<const SplitCFGBlock *> |
using | VectorSplitCFGBlockPtrImpl = llvm::SmallVector<const SplitCFGBlock *> |
using | succ_iterator = SuccessorIterator |
using | const_succ_iterator = SuccessorIterator::const_iterator |
using | succ_iterator_range = llvm::iterator_range<succ_iterator> |
using | const_succ_iterator_range = llvm::iterator_range<const_succ_iterator> |
Public Member Functions | |
bool | succ_empty () const |
SuccessorIterator::const_iterator | succ_begin () const |
SuccessorIterator::const_iterator | succ_end () const |
const_succ_iterator_range | const_succs () |
SplitCFGBlock () | |
Constructor. | |
SplitCFGBlock (const SplitCFGBlock &from) | |
Copy constructor. | |
const clang::CFGBlock * | getCFGBlock () const |
Returns the pointer to the original CFGBlock from which the SplitCFGBlock was created. | |
std::size_t | getNumOfElements () const |
Returns the number of CFGElements in this block. | |
const VectorCFGElementPtrImpl & | getElements () const |
Returns the elements in this block. | |
const VectorSplitCFGBlockPtrImpl & | getSuccessors () const |
Returns the successors for the block. | |
const VectorSplitCFGBlockPtrImpl & | getPredecessors () const |
Returns the predecessors for the block. | |
bool | hasWait () const |
Returns whether the SplitCFGBlock is a wait block or not. | |
bool | isConditional () const |
Return whether the SplitCFGBlock is an IF CFGBlock. | |
bool | isLoopWithTwoSuccessors () const |
Return whether the SplitCFGBlock is a loop CFGBlock with two succesors. | |
bool | hasTerminatorBreak () const |
Return whether the terminator for this block has a break statement in it. | |
bool | hasTerminatorWait () const |
Return whether the terminator for this block has a wait statement in it. | |
unsigned int | getBlockID () const |
Returns the block ID for the SplitCFGBlock. | |
unsigned int | getNextState () const |
Returns the next state. Only pertinent for blocks that have waits in them. | |
llvm::APInt | getWaitArg () const |
Returns the integer value of the argument supplied to the wait(). | |
void | insertElements (VectorCFGElementPtr &elements) |
The elements are added to this SplitCFGBlock. | |
void | identifyBreaks (clang::ASTContext &context) |
Identify if the terminator of a CFGBlock has a break in it. | |
void | dump () const |
void | dumpColored () const |
Private Member Functions | |
void | setNextState (unsigned int state) |
Private Attributes | |
const clang::CFGBlock * | block_ |
A pointer to the original CFGBlock. | |
bool | has_wait_ |
bool | is_conditional_ |
bool | is_loop_with_two_succ_ |
bool | terminator_has_break_ |
The terminator has break. | |
bool | terminator_has_wait_ |
The terminator has break. | |
unsigned int | id_ |
The block id. | |
unsigned int | next_state_ |
The next state that the wait would transform to. | |
llvm::APInt | wait_arg_ |
The wait argument. | |
llvm::SmallVector< unsigned int > | wait_element_ids_ |
VectorCFGElementPtr | elements_ |
CFG Elements. | |
llvm::SmallVector< const SplitCFGBlock * > | predecessors_ |
Predecessors and successors. | |
llvm::SmallVector< const SplitCFGBlock * > | successors_ |
Friends | |
class | SplitCFG |
This class represents information that is stored to split a single CFGBlock into elements that are wait() calls versus others.
Definition at line 79 of file SplitCFGBlock.h.
Definition at line 147 of file SplitCFGBlock.h.
using systemc_clang::SplitCFGBlock::const_succ_iterator_range = llvm::iterator_range<const_succ_iterator> |
Definition at line 149 of file SplitCFGBlock.h.
Definition at line 146 of file SplitCFGBlock.h.
using systemc_clang::SplitCFGBlock::succ_iterator_range = llvm::iterator_range<succ_iterator> |
Definition at line 148 of file SplitCFGBlock.h.
using systemc_clang::SplitCFGBlock::VectorCFGElementPtr = llvm::SmallVector<const clang::CFGElement *> |
Definition at line 81 of file SplitCFGBlock.h.
Definition at line 82 of file SplitCFGBlock.h.
using systemc_clang::SplitCFGBlock::VectorSplitCFGBlockPtr = llvm::SmallVector<const SplitCFGBlock *> |
Definition at line 84 of file SplitCFGBlock.h.
using systemc_clang::SplitCFGBlock::VectorSplitCFGBlockPtrImpl = llvm::SmallVector<const SplitCFGBlock *> |
Definition at line 85 of file SplitCFGBlock.h.
SplitCFGBlock::SplitCFGBlock | ( | ) |
Constructor.
Definition at line 7 of file SplitCFGBlock.cpp.
SplitCFGBlock::SplitCFGBlock | ( | const SplitCFGBlock & | from | ) |
Copy constructor.
Definition at line 18 of file SplitCFGBlock.cpp.
|
inline |
Definition at line 160 of file SplitCFGBlock.h.
void SplitCFGBlock::dump | ( | ) | const |
Print the terminator.
Definition at line 88 of file SplitCFGBlock.cpp.
void SplitCFGBlock::dumpColored | ( | ) | const |
Definition at line 127 of file SplitCFGBlock.cpp.
unsigned int SplitCFGBlock::getBlockID | ( | ) | const |
Returns the block ID for the SplitCFGBlock.
Definition at line 69 of file SplitCFGBlock.cpp.
const clang::CFGBlock * SplitCFGBlock::getCFGBlock | ( | ) | const |
Returns the pointer to the original CFGBlock from which the SplitCFGBlock was created.
Definition at line 45 of file SplitCFGBlock.cpp.
const SplitCFGBlock::VectorCFGElementPtrImpl & SplitCFGBlock::getElements | ( | ) | const |
Returns the elements in this block.
Definition at line 47 of file SplitCFGBlock.cpp.
unsigned int SplitCFGBlock::getNextState | ( | ) | const |
Returns the next state. Only pertinent for blocks that have waits in them.
Definition at line 71 of file SplitCFGBlock.cpp.
std::size_t SplitCFGBlock::getNumOfElements | ( | ) | const |
Returns the number of CFGElements in this block.
Definition at line 63 of file SplitCFGBlock.cpp.
const SplitCFGBlock::VectorSplitCFGBlockPtrImpl & SplitCFGBlock::getPredecessors | ( | ) | const |
Returns the predecessors for the block.
Definition at line 57 of file SplitCFGBlock.cpp.
const SplitCFGBlock::VectorSplitCFGBlockPtrImpl & SplitCFGBlock::getSuccessors | ( | ) | const |
Returns the successors for the block.
Definition at line 52 of file SplitCFGBlock.cpp.
llvm::APInt SplitCFGBlock::getWaitArg | ( | ) | const |
Returns the integer value of the argument supplied to the wait().
Definition at line 73 of file SplitCFGBlock.cpp.
bool SplitCFGBlock::hasTerminatorBreak | ( | ) | const |
Return whether the terminator for this block has a break statement in it.
Definition at line 39 of file SplitCFGBlock.cpp.
bool SplitCFGBlock::hasTerminatorWait | ( | ) | const |
Return whether the terminator for this block has a wait statement in it.
Definition at line 41 of file SplitCFGBlock.cpp.
bool SplitCFGBlock::hasWait | ( | ) | const |
Returns whether the SplitCFGBlock is a wait block or not.
Definition at line 61 of file SplitCFGBlock.cpp.
void SplitCFGBlock::identifyBreaks | ( | clang::ASTContext & | context | ) |
Identify if the terminator of a CFGBlock has a break in it.
See if we can iterate through all the terminator code.
Definition at line 75 of file SplitCFGBlock.cpp.
void SplitCFGBlock::insertElements | ( | VectorCFGElementPtr & | elements | ) |
The elements are added to this SplitCFGBlock.
Definition at line 65 of file SplitCFGBlock.cpp.
bool SplitCFGBlock::isConditional | ( | ) | const |
Return whether the SplitCFGBlock is an IF CFGBlock.
Definition at line 37 of file SplitCFGBlock.cpp.
bool SplitCFGBlock::isLoopWithTwoSuccessors | ( | ) | const |
Return whether the SplitCFGBlock is a loop CFGBlock with two succesors.
Definition at line 33 of file SplitCFGBlock.cpp.
|
private |
Definition at line 43 of file SplitCFGBlock.cpp.
|
inline |
Definition at line 152 of file SplitCFGBlock.h.
|
inline |
Definition at line 151 of file SplitCFGBlock.h.
|
inline |
Definition at line 155 of file SplitCFGBlock.h.
|
friend |
Definition at line 88 of file SplitCFGBlock.h.
|
private |
A pointer to the original CFGBlock.
Definition at line 91 of file SplitCFGBlock.h.
|
private |
CFG Elements.
Definition at line 119 of file SplitCFGBlock.h.
|
private |
Whether this SplitCFGBlock is a wait block or not. Only one element if it is a wait block.
Definition at line 94 of file SplitCFGBlock.h.
|
private |
The block id.
Definition at line 107 of file SplitCFGBlock.h.
|
private |
Definition at line 96 of file SplitCFGBlock.h.
|
private |
Definition at line 98 of file SplitCFGBlock.h.
|
private |
The next state that the wait would transform to.
Definition at line 109 of file SplitCFGBlock.h.
|
private |
Predecessors and successors.
Definition at line 121 of file SplitCFGBlock.h.
|
private |
Definition at line 122 of file SplitCFGBlock.h.
|
private |
The terminator has break.
Definition at line 101 of file SplitCFGBlock.h.
|
private |
The terminator has break.
Definition at line 104 of file SplitCFGBlock.h.
|
private |
The wait argument.
Definition at line 111 of file SplitCFGBlock.h.
|
private |
This holds the ids in split_elements_ that correspond to the wait statements. This will be a single vector with just the wait() element.
Definition at line 116 of file SplitCFGBlock.h.