LLVM  8.0.1
Classes | Namespaces | Macros | Enumerations | Functions
CFLAndersAliasAnalysis.cpp File Reference
#include "llvm/Analysis/CFLAndersAliasAnalysis.h"
#include "AliasAnalysisSummary.h"
#include "CFLGraph.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <utility>
#include <vector>
Include dependency graph for CFLAndersAliasAnalysis.cpp:

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< OffsetValue >
 
struct  llvm::DenseMapInfo< OffsetInstantiatedValue >
 
class  llvm::CFLAndersAAResult::FunctionInfo
 

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "cfl-anders-aa"
 

Enumerations

enum  MatchState : uint8_t
 

Functions

static bool hasReadOnlyState (StateSet Set)
 
static bool hasWriteOnlyState (StateSet Set)
 
static Optional< InterfaceValuegetInterfaceValue (InstantiatedValue IValue, const SmallVectorImpl< Value *> &RetVals)
 
static void populateAttrMap (DenseMap< const Value *, AliasAttrs > &AttrMap, const AliasAttrMap &AMap)
 
static void populateAliasMap (DenseMap< const Value *, std::vector< OffsetValue >> &AliasMap, const ReachabilitySet &ReachSet)
 
static void populateExternalRelations (SmallVectorImpl< ExternalRelation > &ExtRelations, const Function &Fn, const SmallVectorImpl< Value *> &RetVals, const ReachabilitySet &ReachSet)
 
static void populateExternalAttributes (SmallVectorImpl< ExternalAttribute > &ExtAttributes, const Function &Fn, const SmallVectorImpl< Value *> &RetVals, const AliasAttrMap &AMap)
 
static void propagate (InstantiatedValue From, InstantiatedValue To, MatchState State, ReachabilitySet &ReachSet, std::vector< WorkListItem > &WorkList)
 
static void initializeWorkList (std::vector< WorkListItem > &WorkList, ReachabilitySet &ReachSet, const CFLGraph &Graph)
 
static Optional< InstantiatedValuegetNodeBelow (const CFLGraph &Graph, InstantiatedValue V)
 
static void processWorkListItem (const WorkListItem &Item, const CFLGraph &Graph, ReachabilitySet &ReachSet, AliasMemSet &MemSet, std::vector< WorkListItem > &WorkList)
 
static AliasAttrMap buildAttrMap (const CFLGraph &Graph, const ReachabilitySet &ReachSet)
 
 INITIALIZE_PASS (CFLAndersAAWrapperPass, "cfl-anders-aa", "Inclusion-Based CFL Alias Analysis", false, true) ImmutablePass *llvm
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "cfl-anders-aa"

Definition at line 90 of file CFLAndersAliasAnalysis.cpp.

Enumeration Type Documentation

◆ MatchState

enum MatchState : uint8_t
strong

Definition at line 99 of file CFLAndersAliasAnalysis.cpp.

Function Documentation

◆ buildAttrMap()

static AliasAttrMap buildAttrMap ( const CFLGraph Graph,
const ReachabilitySet &  ReachSet 
)
static

Definition at line 734 of file CFLAndersAliasAnalysis.cpp.

References E, I, and llvm::cflaa::CFLGraph::value_mappings().

◆ getInterfaceValue()

static Optional<InterfaceValue> getInterfaceValue ( InstantiatedValue  IValue,
const SmallVectorImpl< Value *> &  RetVals 
)
static

◆ getNodeBelow()

static Optional<InstantiatedValue> getNodeBelow ( const CFLGraph Graph,
InstantiatedValue  V 
)
static

◆ hasReadOnlyState()

static bool hasReadOnlyState ( StateSet  Set)
static

Definition at line 344 of file CFLAndersAliasAnalysis.cpp.

Referenced by populateExternalRelations().

◆ hasWriteOnlyState()

static bool hasWriteOnlyState ( StateSet  Set)
static

Definition at line 348 of file CFLAndersAliasAnalysis.cpp.

Referenced by populateExternalRelations().

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( CFLAndersAAWrapperPass  ,
"cfl-anders-aa ,
"Inclusion-Based CFL Alias Analysis ,
false  ,
true   
)

Definition at line 905 of file CFLAndersAliasAnalysis.cpp.

◆ initializeWorkList()

static void initializeWorkList ( std::vector< WorkListItem > &  WorkList,
ReachabilitySet &  ReachSet,
const CFLGraph Graph 
)
static

◆ populateAliasMap()

static void populateAliasMap ( DenseMap< const Value *, std::vector< OffsetValue >> &  AliasMap,
const ReachabilitySet &  ReachSet 
)
static

◆ populateAttrMap()

static void populateAttrMap ( DenseMap< const Value *, AliasAttrs > &  AttrMap,
const AliasAttrMap &  AMap 
)
static

◆ populateExternalAttributes()

static void populateExternalAttributes ( SmallVectorImpl< ExternalAttribute > &  ExtAttributes,
const Function Fn,
const SmallVectorImpl< Value *> &  RetVals,
const AliasAttrMap &  AMap 
)
static

◆ populateExternalRelations()

static void populateExternalRelations ( SmallVectorImpl< ExternalRelation > &  ExtRelations,
const Function Fn,
const SmallVectorImpl< Value *> &  RetVals,
const ReachabilitySet &  ReachSet 
)
static

◆ processWorkListItem()

static void processWorkListItem ( const WorkListItem &  Item,
const CFLGraph Graph,
ReachabilitySet &  ReachSet,
AliasMemSet &  MemSet,
std::vector< WorkListItem > &  WorkList 
)
static

Definition at line 635 of file CFLAndersAliasAnalysis.cpp.

References assert(), getNodeBelow(), and propagate().

◆ propagate()

static void propagate ( InstantiatedValue  From,
InstantiatedValue  To,
MatchState  State,
ReachabilitySet &  ReachSet,
std::vector< WorkListItem > &  WorkList 
)
static