LLVM  6.0.0svn
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
 Compute iterated dominance frontiers using a linear time algorithm.
 

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

◆ 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 902 of file CFLAndersAliasAnalysis.cpp.

◆ initializeWorkList()

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

Definition at line 602 of file CFLAndersAliasAnalysis.cpp.

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

Referenced by buildAttrMap().

◆ 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 633 of file CFLAndersAliasAnalysis.cpp.

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

Referenced by buildAttrMap().

◆ propagate()

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