|
clang 23.0.0git
|
A basic block is part of an SCFG. More...
#include "clang/Analysis/Analyses/ThreadSafetyTIL.h"
Classes | |
| struct | TopologyNode |
Public Types | |
| using | InstrArray = SimpleArray<SExpr *> |
| using | BlockArray = SimpleArray<BasicBlock *> |
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 () |
| Returns a list of 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 |
| 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) |
Friends | |
| class | 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 |
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 1412 of file ThreadSafetyTIL.h.
Definition at line 1415 of file ThreadSafetyTIL.h.
Definition at line 1414 of file ThreadSafetyTIL.h.
|
inlineexplicit |
Definition at line 1443 of file ThreadSafetyTIL.h.
References false, and clang::threadSafety::til::SExpr::SExpr().
Referenced by addPredecessor(), BasicBlock(), compare(), Dominates(), findPredecessorIndex(), parent(), parent(), and PostDominates().
|
inline |
Definition at line 1445 of file ThreadSafetyTIL.h.
References BasicBlock(), false, and clang::threadSafety::til::SExpr::SExpr().
|
inline |
|
inline |
Add a new instruction.
Definition at line 1500 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SExpr::SExpr(), and V.
| unsigned BasicBlock::addPredecessor | ( | BasicBlock * | Pred | ) |
Definition at line 57 of file ThreadSafetyTIL.cpp.
References BasicBlock().
|
inline |
Definition at line 1466 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1465 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBasicBlock().
|
inline |
Returns the block ID. Every block has a unique ID in the CFG.
Definition at line 1453 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBasicBlock(), and clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBlockLabel().
|
inline |
Definition at line 1460 of file ThreadSafetyTIL.h.
References SCFG.
|
inline |
Definition at line 1459 of file ThreadSafetyTIL.h.
References SCFG.
Definition at line 1450 of file ThreadSafetyTIL.h.
References clang::threadSafety::til::SExpr::opcode(), and clang::threadSafety::til::SExpr::SExpr().
|
inline |
Definition at line 1549 of file ThreadSafetyTIL.h.
References BasicBlock(), clang::C, and Cmp.
|
inline |
Definition at line 1485 of file ThreadSafetyTIL.h.
References BasicBlock(), and clang::Other.
|
inline |
Return the index of BB, or Predecessors.size if BB is not a predecessor.
Definition at line 1519 of file ThreadSafetyTIL.h.
References BasicBlock().
|
inline |
Definition at line 1468 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBasicBlock().
|
inline |
Definition at line 1469 of file ThreadSafetyTIL.h.
|
inline |
Returns the number of predecessors.
Definition at line 1456 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1457 of file ThreadSafetyTIL.h.
References successors().
|
inline |
Definition at line 1463 of file ThreadSafetyTIL.h.
References BasicBlock().
|
inline |
Definition at line 1462 of file ThreadSafetyTIL.h.
References BasicBlock().
Referenced by clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBasicBlock().
|
inline |
Definition at line 1489 of file ThreadSafetyTIL.h.
References BasicBlock(), and clang::Other.
|
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 1474 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1475 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1510 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1513 of file ThreadSafetyTIL.h.
| void BasicBlock::reservePredecessors | ( | unsigned | NumPreds | ) |
Definition at line 70 of file ThreadSafetyTIL.cpp.
|
inline |
Definition at line 1483 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1477 of file ThreadSafetyTIL.h.
Referenced by numSuccessors().
|
inline |
Definition at line 1478 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1481 of file ThreadSafetyTIL.h.
|
inline |
Definition at line 1480 of file ThreadSafetyTIL.h.
Referenced by clang::threadSafety::til::PrettyPrinter< Self, StreamType >::printBasicBlock().
|
inline |
Definition at line 1525 of file ThreadSafetyTIL.h.
References V.
|
friend |