LLVM  8.0.1
Classes | Public Types | Public Member Functions | List of all members
llvm::cflaa::CFLGraph Class Reference

The Program Expression Graph (PEG) of CFL analysis CFLGraph is auxiliary data structure used by CFL-based alias analysis to describe flow-insensitive pointer-related behaviors. More...

#include "Analysis/CFLGraph.h"

Classes

struct  Edge
 
struct  NodeInfo
 
class  ValueInfo
 

Public Types

using Node = InstantiatedValue
 
using EdgeList = std::vector< Edge >
 
using const_value_iterator = ValueMap::const_iterator
 

Public Member Functions

bool addNode (Node N, AliasAttrs Attr=AliasAttrs())
 
void addAttr (Node N, AliasAttrs Attr)
 
void addEdge (Node From, Node To, int64_t Offset=0)
 
const NodeInfogetNode (Node N) const
 
AliasAttrs attrFor (Node N) const
 
iterator_range< const_value_iteratorvalue_mappings () const
 

Detailed Description

The Program Expression Graph (PEG) of CFL analysis CFLGraph is auxiliary data structure used by CFL-based alias analysis to describe flow-insensitive pointer-related behaviors.

Given an LLVM function, the main purpose of this graph is to abstract away unrelated facts and translate the rest into a form that can be easily digested by CFL analyses. Each Node in the graph is an InstantiatedValue, and each edge represent a pointer assignment between InstantiatedValue. Pointer references/dereferences are not explicitly stored in the graph: we implicitly assume that for each node (X, I) it has a dereference edge to (X, I+1) and a reference edge to (X, I-1).

Definition at line 59 of file CFLGraph.h.

Member Typedef Documentation

◆ const_value_iterator

Definition at line 112 of file CFLGraph.h.

◆ EdgeList

using llvm::cflaa::CFLGraph::EdgeList = std::vector<Edge>

Definition at line 68 of file CFLGraph.h.

◆ Node

Definition at line 61 of file CFLGraph.h.

Member Function Documentation

◆ addAttr()

void llvm::cflaa::CFLGraph::addAttr ( Node  N,
AliasAttrs  Attr 
)
inline

Definition at line 122 of file CFLGraph.h.

References assert(), and Info.

◆ addEdge()

void llvm::cflaa::CFLGraph::addEdge ( Node  From,
Node  To,
int64_t  Offset = 0 
)
inline

Definition at line 128 of file CFLGraph.h.

References assert(), From, and llvm::cflaa::CFLGraph::Edge::Offset.

◆ addNode()

bool llvm::cflaa::CFLGraph::addNode ( Node  N,
AliasAttrs  Attr = AliasAttrs() 
)
inline

◆ attrFor()

AliasAttrs llvm::cflaa::CFLGraph::attrFor ( Node  N) const
inline

Definition at line 145 of file CFLGraph.h.

References assert(), and Info.

◆ getNode()

const NodeInfo* llvm::cflaa::CFLGraph::getNode ( Node  N) const
inline

◆ value_mappings()

iterator_range<const_value_iterator> llvm::cflaa::CFLGraph::value_mappings ( ) const
inline

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