clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::threadSafety::til::BasicBlock Class Reference

#include <ThreadSafetyTIL.h>

Inheritance diagram for clang::threadSafety::til::BasicBlock:
Inheritance graph
[legend]
Collaboration diagram for clang::threadSafety::til::BasicBlock:
Collaboration graph
[legend]

List of all members.

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 SCFGcfg () const
SCFGcfg ()
const BasicBlockparent () const
BasicBlockparent ()
const InstrArrayarguments () const
InstrArrayarguments ()
InstrArrayinstructions ()
const InstrArrayinstructions () const
BlockArraypredecessors ()
const BlockArraypredecessors () const
ArrayRef< BasicBlock * > successors ()
ArrayRef< BasicBlock * > successors () const
const Terminatorterminator () const
Terminatorterminator ()
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

Detailed Description

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.


Member Typedef Documentation

Definition at line 1524 of file ThreadSafetyTIL.h.

Definition at line 1523 of file ThreadSafetyTIL.h.


Constructor & Destructor Documentation

Definition at line 1550 of file ThreadSafetyTIL.h.

Definition at line 1553 of file ThreadSafetyTIL.h.


Member Function Documentation

Add a new argument.

Definition at line 1600 of file ThreadSafetyTIL.h.

Add a new instruction.

Definition at line 1605 of file ThreadSafetyTIL.h.

Definition at line 1572 of file ThreadSafetyTIL.h.

Definition at line 1565 of file ThreadSafetyTIL.h.

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().

template<class C >
C::CType clang::threadSafety::til::BasicBlock::compare ( const BasicBlock E,
C &  Cmp 
) const [inline]

Definition at line 1653 of file ThreadSafetyTIL.h.

Definition at line 1591 of file ThreadSafetyTIL.h.

Return the index of BB, or Predecessors.size if BB is not a predecessor.

Definition at line 1623 of file ThreadSafetyTIL.h.

Definition at line 1575 of file ThreadSafetyTIL.h.

Returns the number of predecessors.

Definition at line 1562 of file ThreadSafetyTIL.h.

Definition at line 1563 of file ThreadSafetyTIL.h.

Definition at line 1569 of file ThreadSafetyTIL.h.

Definition at line 1595 of file ThreadSafetyTIL.h.

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.

Definition at line 1581 of file ThreadSafetyTIL.h.

Definition at line 1614 of file ThreadSafetyTIL.h.

Definition at line 1617 of file ThreadSafetyTIL.h.

Definition at line 1589 of file ThreadSafetyTIL.h.

Definition at line 1583 of file ThreadSafetyTIL.h.

Definition at line 1584 of file ThreadSafetyTIL.h.

Definition at line 1587 of file ThreadSafetyTIL.h.

template<class V >
V::R_BasicBlock clang::threadSafety::til::BasicBlock::traverse ( V &  Vs,
typename V::R_Ctx  Ctx 
) [inline]

Definition at line 1629 of file ThreadSafetyTIL.h.


Friends And Related Function Documentation

friend class SCFG [friend]

Definition at line 1659 of file ThreadSafetyTIL.h.


The documentation for this class was generated from the following files: