clang API Documentation
#include <ThreadSafetyTIL.h>
Classes | |
struct | TopologyNode |
Public Types | |
typedef SimpleArray< SExpr * > | InstrArray |
typedef SimpleArray< BasicBlock * > | BlockArray |
Public Member Functions | |
BasicBlock (MemRegionRef A) | |
BasicBlock (BasicBlock &B, MemRegionRef A, InstrArray &&As, InstrArray &&Is, Terminator *T) | |
int | blockID () const |
Returns the block ID. Every block has a unique ID in the CFG. | |
size_t | numPredecessors () const |
Returns the number of predecessors. | |
size_t | numSuccessors () const |
const SCFG * | cfg () const |
SCFG * | cfg () |
const BasicBlock * | parent () const |
BasicBlock * | parent () |
const InstrArray & | arguments () const |
InstrArray & | arguments () |
InstrArray & | instructions () |
const InstrArray & | instructions () const |
BlockArray & | predecessors () |
const BlockArray & | predecessors () const |
ArrayRef< BasicBlock * > | successors () |
ArrayRef< BasicBlock * > | successors () const |
const Terminator * | terminator () const |
Terminator * | terminator () |
void | setTerminator (Terminator *E) |
bool | Dominates (const BasicBlock &Other) |
bool | PostDominates (const BasicBlock &Other) |
void | addArgument (Phi *V) |
Add a new argument. | |
void | addInstruction (SExpr *V) |
Add a new instruction. | |
unsigned | addPredecessor (BasicBlock *Pred) |
void | reserveArguments (unsigned Nargs) |
void | reserveInstructions (unsigned Nins) |
void | reservePredecessors (unsigned NumPreds) |
unsigned | findPredecessorIndex (const BasicBlock *BB) const |
Return the index of BB, or Predecessors.size if BB is not a predecessor. | |
template<class V > | |
V::R_BasicBlock | traverse (V &Vs, typename V::R_Ctx Ctx) |
template<class C > | |
C::CType | compare (const BasicBlock *E, C &Cmp) const |
Static Public Member Functions | |
static bool | classof (const SExpr *E) |
Friends | |
class | SCFG |
A basic block is part of an SCFG. It can be treated as a function in continuation passing style. A block consists of a sequence of phi nodes, which are "arguments" to the function, followed by a sequence of instructions. It ends with a Terminator, which is a Branch or Goto to another basic block in the same SCFG.
Definition at line 1521 of file ThreadSafetyTIL.h.
Definition at line 1524 of file ThreadSafetyTIL.h.
Definition at line 1523 of file ThreadSafetyTIL.h.
clang::threadSafety::til::BasicBlock::BasicBlock | ( | MemRegionRef | A | ) | [inline, explicit] |
Definition at line 1550 of file ThreadSafetyTIL.h.
clang::threadSafety::til::BasicBlock::BasicBlock | ( | BasicBlock & | B, |
MemRegionRef | A, | ||
InstrArray && | As, | ||
InstrArray && | Is, | ||
Terminator * | T | ||
) | [inline] |
Definition at line 1553 of file ThreadSafetyTIL.h.
void clang::threadSafety::til::BasicBlock::addArgument | ( | Phi * | V | ) | [inline] |
Add a new argument.
Definition at line 1600 of file ThreadSafetyTIL.h.
void clang::threadSafety::til::BasicBlock::addInstruction | ( | SExpr * | V | ) | [inline] |
Add a new instruction.
Definition at line 1605 of file ThreadSafetyTIL.h.
Definition at line 59 of file ThreadSafetyTIL.cpp.
References clang::threadSafety::til::SimpleArray< T >::push_back(), clang::threadSafety::til::SimpleArray< T >::reserveCheck(), and clang::threadSafety::til::SimpleArray< T >::size().
const InstrArray& clang::threadSafety::til::BasicBlock::arguments | ( | ) | const [inline] |
Definition at line 1571 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBasicBlock().
InstrArray& clang::threadSafety::til::BasicBlock::arguments | ( | ) | [inline] |
Definition at line 1572 of file ThreadSafetyTIL.h.
int clang::threadSafety::til::BasicBlock::blockID | ( | ) | const [inline] |
Returns the block ID. Every block has a unique ID in the CFG.
Definition at line 1559 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBasicBlock(), and clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBlockLabel().
const SCFG* clang::threadSafety::til::BasicBlock::cfg | ( | ) | const [inline] |
Definition at line 1565 of file ThreadSafetyTIL.h.
SCFG* clang::threadSafety::til::BasicBlock::cfg | ( | ) | [inline] |
Definition at line 1566 of file ThreadSafetyTIL.h.
static bool clang::threadSafety::til::BasicBlock::classof | ( | const SExpr * | E | ) | [inline, static] |
Definition at line 1548 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SExpr::opcode().
C::CType clang::threadSafety::til::BasicBlock::compare | ( | const BasicBlock * | E, |
C & | Cmp | ||
) | const [inline] |
Definition at line 1653 of file ThreadSafetyTIL.h.
bool clang::threadSafety::til::BasicBlock::Dominates | ( | const BasicBlock & | Other | ) | [inline] |
Definition at line 1591 of file ThreadSafetyTIL.h.
unsigned clang::threadSafety::til::BasicBlock::findPredecessorIndex | ( | const BasicBlock * | BB | ) | const [inline] |
Return the index of BB, or Predecessors.size if BB is not a predecessor.
Definition at line 1623 of file ThreadSafetyTIL.h.
InstrArray& clang::threadSafety::til::BasicBlock::instructions | ( | ) | [inline] |
Definition at line 1574 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBasicBlock().
const InstrArray& clang::threadSafety::til::BasicBlock::instructions | ( | ) | const [inline] |
Definition at line 1575 of file ThreadSafetyTIL.h.
size_t clang::threadSafety::til::BasicBlock::numPredecessors | ( | ) | const [inline] |
Returns the number of predecessors.
Definition at line 1562 of file ThreadSafetyTIL.h.
size_t clang::threadSafety::til::BasicBlock::numSuccessors | ( | ) | const [inline] |
Definition at line 1563 of file ThreadSafetyTIL.h.
const BasicBlock* clang::threadSafety::til::BasicBlock::parent | ( | ) | const [inline] |
Definition at line 1568 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBasicBlock().
BasicBlock* clang::threadSafety::til::BasicBlock::parent | ( | ) | [inline] |
Definition at line 1569 of file ThreadSafetyTIL.h.
bool clang::threadSafety::til::BasicBlock::PostDominates | ( | const BasicBlock & | Other | ) | [inline] |
Definition at line 1595 of file ThreadSafetyTIL.h.
BlockArray& clang::threadSafety::til::BasicBlock::predecessors | ( | ) | [inline] |
Returns a list of predecessors. The order of predecessors in the list is important; each phi node has exactly one argument for each precessor, in the same order.
Definition at line 1580 of file ThreadSafetyTIL.h.
const BlockArray& clang::threadSafety::til::BasicBlock::predecessors | ( | ) | const [inline] |
Definition at line 1581 of file ThreadSafetyTIL.h.
void clang::threadSafety::til::BasicBlock::reserveArguments | ( | unsigned | Nargs | ) | [inline] |
Definition at line 1614 of file ThreadSafetyTIL.h.
void clang::threadSafety::til::BasicBlock::reserveInstructions | ( | unsigned | Nins | ) | [inline] |
Definition at line 1617 of file ThreadSafetyTIL.h.
void clang::threadSafety::til::BasicBlock::reservePredecessors | ( | unsigned | NumPreds | ) |
Definition at line 73 of file ThreadSafetyTIL.cpp.
References clang::threadSafety::til::SimpleArray< T >::reserve().
void clang::threadSafety::til::BasicBlock::setTerminator | ( | Terminator * | E | ) | [inline] |
Definition at line 1589 of file ThreadSafetyTIL.h.
ArrayRef<BasicBlock*> clang::threadSafety::til::BasicBlock::successors | ( | ) | [inline] |
Definition at line 1583 of file ThreadSafetyTIL.h.
ArrayRef<BasicBlock*> clang::threadSafety::til::BasicBlock::successors | ( | ) | const [inline] |
Definition at line 1584 of file ThreadSafetyTIL.h.
const Terminator* clang::threadSafety::til::BasicBlock::terminator | ( | ) | const [inline] |
Definition at line 1586 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBasicBlock().
Terminator* clang::threadSafety::til::BasicBlock::terminator | ( | ) | [inline] |
Definition at line 1587 of file ThreadSafetyTIL.h.
V::R_BasicBlock clang::threadSafety::til::BasicBlock::traverse | ( | V & | Vs, |
typename V::R_Ctx | Ctx | ||
) | [inline] |
Definition at line 1629 of file ThreadSafetyTIL.h.
friend class SCFG [friend] |
Definition at line 1659 of file ThreadSafetyTIL.h.