clang 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::threadSafety::til::Phi Class Reference

Phi Node, for code in SSA form. More...

#include "clang/Analysis/Analyses/ThreadSafetyTIL.h"

Inheritance diagram for clang::threadSafety::til::Phi:
Inheritance graph
[legend]

Public Types

enum  Status { PH_MultiVal = 0 , PH_SingleVal , PH_Incomplete }
 
using ValArray = SimpleArray< SExpr * >
 

Public Member Functions

 Phi ()
 
 Phi (MemRegionRef A, unsigned Nvals)
 
 Phi (const Phi &P, ValArray &&Vs)
 
const ValArrayvalues () const
 
ValArrayvalues ()
 
Status status () const
 
void setStatus (Status s)
 
const ValueDeclclangDecl () const
 Return the clang declaration of the variable for this Phi node, if any.
 
void setClangDecl (const ValueDecl *Cvd)
 Set the clang variable associated with this Phi node.
 
template<class V >
V::R_SExpr traverse (V &Vs, typename V::R_Ctx Ctx)
 
template<class C >
C::CType compare (const Phi *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.
 
BasicBlockblock () 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)
 

Additional Inherited Members

- Protected Member Functions inherited from clang::threadSafety::til::SExpr
 SExpr (TIL_Opcode Op)
 
 SExpr (const SExpr &E)
 
SExproperator= (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
 
BasicBlockBlock = nullptr
 

Detailed Description

Phi Node, for code in SSA form.

Each Phi node has an array of possible values that it can take, depending on where control flow comes from.

Definition at line 1302 of file ThreadSafetyTIL.h.

Member Typedef Documentation

◆ ValArray

Definition at line 1304 of file ThreadSafetyTIL.h.

Member Enumeration Documentation

◆ Status

Enumerator
PH_MultiVal 
PH_SingleVal 
PH_Incomplete 

Definition at line 1309 of file ThreadSafetyTIL.h.

Constructor & Destructor Documentation

◆ Phi() [1/3]

clang::threadSafety::til::Phi::Phi ( )
inline

Definition at line 1315 of file ThreadSafetyTIL.h.

◆ Phi() [2/3]

clang::threadSafety::til::Phi::Phi ( MemRegionRef  A,
unsigned  Nvals 
)
inline

Definition at line 1316 of file ThreadSafetyTIL.h.

◆ Phi() [3/3]

clang::threadSafety::til::Phi::Phi ( const Phi P,
ValArray &&  Vs 
)
inline

Definition at line 1317 of file ThreadSafetyTIL.h.

Member Function Documentation

◆ clangDecl()

const ValueDecl * clang::threadSafety::til::Phi::clangDecl ( ) const
inline

Return the clang declaration of the variable for this Phi node, if any.

Definition at line 1328 of file ThreadSafetyTIL.h.

◆ classof()

static bool clang::threadSafety::til::Phi::classof ( const SExpr E)
inlinestatic

Definition at line 1319 of file ThreadSafetyTIL.h.

References E.

◆ compare()

template<class C >
C::CType clang::threadSafety::til::Phi::compare ( const Phi E,
C Cmp 
) const
inline

Definition at line 1344 of file ThreadSafetyTIL.h.

References E.

◆ setClangDecl()

void clang::threadSafety::til::Phi::setClangDecl ( const ValueDecl Cvd)
inline

Set the clang variable associated with this Phi node.

Definition at line 1331 of file ThreadSafetyTIL.h.

◆ setStatus()

void clang::threadSafety::til::Phi::setStatus ( Status  s)
inline

◆ status()

Status clang::threadSafety::til::Phi::status ( ) const
inline

◆ traverse()

template<class V >
V::R_SExpr clang::threadSafety::til::Phi::traverse ( V Vs,
typename V::R_Ctx  Ctx 
)
inline

◆ values() [1/2]

ValArray & clang::threadSafety::til::Phi::values ( )
inline

Definition at line 1322 of file ThreadSafetyTIL.h.

◆ values() [2/2]

const ValArray & clang::threadSafety::til::Phi::values ( ) const
inline

Definition at line 1321 of file ThreadSafetyTIL.h.

Referenced by clang::threadSafety::til::simplifyIncompleteArg().


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