clang
15.0.0git
|
An SCFG is a control-flow graph. More...
#include "clang/Analysis/Analyses/ThreadSafetyTIL.h"
Public Types | |
using | BlockArray = SimpleArray< BasicBlock * > |
using | iterator = BlockArray::iterator |
using | const_iterator = BlockArray::const_iterator |
Public Member Functions | |
SCFG (MemRegionRef A, unsigned Nblocks) | |
SCFG (const SCFG &Cfg, BlockArray &&Ba) | |
bool | valid () const |
Return true if this CFG is valid. More... | |
bool | normal () const |
Return true if this CFG has been normalized. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
const BasicBlock * | entry () const |
BasicBlock * | entry () |
const BasicBlock * | exit () const |
BasicBlock * | exit () |
size_t | numBlocks () const |
Return the number of blocks in the CFG. More... | |
unsigned | numInstructions () |
Return the total number of instructions in the CFG. More... | |
void | add (BasicBlock *BB) |
void | setEntry (BasicBlock *BB) |
void | setExit (BasicBlock *BB) |
void | computeNormalForm () |
template<class V > | |
V::R_SExpr | traverse (V &Vs, typename V::R_Ctx Ctx) |
template<class C > | |
C::CType | compare (const SCFG *E, C &Cmp) const |
![]() | |
SExpr ()=delete | |
TIL_Opcode | opcode () const |
void * | operator new (size_t S, MemRegionRef &R) |
void * | operator new (size_t)=delete |
SExpr objects must be created in an arena. More... | |
void | operator delete (void *)=delete |
SExpr objects cannot be deleted. More... | |
unsigned | id () const |
Returns the instruction ID for this expression. More... | |
BasicBlock * | block () const |
Returns the block, if this is an instruction in a basic block, otherwise returns null. More... | |
void | setID (BasicBlock *B, unsigned id) |
Set the basic block and instruction ID for this expression. More... | |
Static Public Member Functions | |
static bool | classof (const SExpr *E) |
Additional Inherited Members | |
![]() | |
SExpr (TIL_Opcode Op) | |
SExpr (const SExpr &E) | |
![]() | |
const unsigned char | Opcode |
unsigned char | Reserved = 0 |
unsigned short | Flags = 0 |
unsigned | SExprID = 0 |
BasicBlock * | Block = nullptr |
An SCFG is a control-flow graph.
It consists of a set of basic blocks, each of which terminates in a branch to another basic block. There is one entry point, and one exit point.
Definition at line 1688 of file ThreadSafetyTIL.h.
Definition at line 1690 of file ThreadSafetyTIL.h.
Definition at line 1692 of file ThreadSafetyTIL.h.
Definition at line 1691 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1694 of file ThreadSafetyTIL.h.
References add(), clang::threadSafety::til::BasicBlock::addArgument(), clang::threadSafety::til::BasicBlock::setTerminator(), and V.
|
inline |
Definition at line 1705 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1743 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::push_back(), and clang::threadSafety::til::SimpleArray< T >::reserveCheck().
Referenced by SCFG().
|
inline |
Definition at line 1720 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::begin().
|
inline |
Definition at line 1723 of file ThreadSafetyTIL.h.
References cbegin().
|
inline |
Definition at line 1726 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::cbegin().
Referenced by begin().
|
inline |
Definition at line 1727 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::cend().
Referenced by end().
Definition at line 1710 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SExpr::opcode().
|
inline |
Definition at line 1768 of file ThreadSafetyTIL.h.
void SCFG::computeNormalForm | ( | ) |
Definition at line 290 of file ThreadSafetyTIL.cpp.
References clang::threadSafety::til::SExpr::Block, computeNodeID(), and computeNodeSize().
|
inline |
Definition at line 1721 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::end().
|
inline |
Definition at line 1724 of file ThreadSafetyTIL.h.
References cend().
|
inline |
Definition at line 1730 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1729 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1732 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1731 of file ThreadSafetyTIL.h.
|
inline |
Return true if this CFG has been normalized.
After normalization, blocks are in topological order, and block and instruction IDs have been assigned.
Definition at line 1718 of file ThreadSafetyTIL.h.
|
inline |
Return the number of blocks in the CFG.
Block::blockID() will return a number less than numBlocks();
Definition at line 1736 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::size().
|
inline |
Return the total number of instructions in the CFG.
This is useful for building instruction side-tables; A call to SExpr::id() will return a number less than numInstructions().
Definition at line 1741 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1750 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1751 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1756 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::size().
|
inline |
Return true if this CFG is valid.
Definition at line 1713 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SimpleArray< T >::size().