|
clang 23.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) | |
| Arena (Cfg.Arena) | |
| Blocks (std::move(Ba)) | |
| bool | valid () const |
| Return true if this CFG is valid. | |
| bool | normal () const |
| Return true if this CFG has been normalized. | |
| 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. | |
| unsigned | numInstructions () |
| Return the total number of instructions in the CFG. | |
| 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 |
| Public Member Functions inherited from clang::threadSafety::til::SExpr | |
| 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. | |
| void | operator delete (void *)=delete |
| SExpr objects cannot be deleted. | |
| unsigned | id () const |
| Returns the instruction ID for this expression. | |
| BasicBlock * | block () const |
| Returns the block, if this is an instruction in a basic block, otherwise returns null. | |
| void | setID (BasicBlock *B, unsigned id) |
| Set the basic block and instruction ID for this expression. | |
Static Public Member Functions | |
| static bool | classof (const SExpr *E) |
Public Attributes | |
| : SExpr(COP_SCFG) | |
Additional Inherited Members | |
| Protected Member Functions inherited from clang::threadSafety::til::SExpr | |
| SExpr (TIL_Opcode Op) | |
| SExpr (const SExpr &E) | |
| SExpr & | operator= (const SExpr &)=delete |
| Protected Attributes inherited from clang::threadSafety::til::SExpr | |
| const TIL_Opcode | 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 1600 of file ThreadSafetyTIL.h.
Definition at line 1602 of file ThreadSafetyTIL.h.
Definition at line 1604 of file ThreadSafetyTIL.h.
Definition at line 1603 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1606 of file ThreadSafetyTIL.h.
Referenced by compare().
|
inline |
Definition at line 1655 of file ThreadSafetyTIL.h.
| clang::threadSafety::til::SCFG::Arena | ( | Cfg. | Arena | ) |
References clang::threadSafety::til::SExpr::SExpr().
|
inline |
Definition at line 1632 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1635 of file ThreadSafetyTIL.h.
References cbegin().
|
inline |
Definition at line 1618 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1638 of file ThreadSafetyTIL.h.
Referenced by begin().
|
inline |
Definition at line 1639 of file ThreadSafetyTIL.h.
Referenced by end().
Definition at line 1622 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SExpr::opcode(), and clang::threadSafety::til::SExpr::SExpr().
|
inline |
Definition at line 1680 of file ThreadSafetyTIL.h.
| void SCFG::computeNormalForm | ( | ) |
Definition at line 289 of file ThreadSafetyTIL.cpp.
References clang::threadSafety::til::SExpr::Block, computeNodeID(), and computeNodeSize().
|
inline |
Definition at line 1633 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1636 of file ThreadSafetyTIL.h.
References cend().
|
inline |
Definition at line 1642 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1641 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1644 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1643 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 1630 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 1648 of file ThreadSafetyTIL.h.
|
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 1653 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1662 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1663 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1668 of file ThreadSafetyTIL.h.
References V.
|
inline |
Return true if this CFG is valid.
Definition at line 1625 of file ThreadSafetyTIL.h.
| clang::threadSafety::til::SCFG::__pad0__ |
Definition at line 1606 of file ThreadSafetyTIL.h.