LLVM API Documentation
#include "StratifiedSets.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/None.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
#include <forward_list>
#include <tuple>
Go to the source code of this file.
Enumerations | |
enum | Level |
enum | EdgeType |
Functions | |
static Optional< Function * > | parentFunctionOfValue (Value *) |
template<typename Inst > | |
static bool | getPossibleTargets (Inst *, SmallVectorImpl< Function * > &) |
static Optional< Value * > | getTargetValue (Instruction *) |
static bool | hasUsefulEdges (Instruction *) |
INITIALIZE_AG_PASS (CFLAliasAnalysis, AliasAnalysis,"cfl-aa","CFL-Based AA implementation", false, true, false) ImmutablePass *llvm | |
static StratifiedAttr | argNumberToAttrIndex (StratifiedAttr) |
static Optional< StratifiedAttr > | valueToAttrIndex (Value *Val) |
static EdgeType | flipWeight (EdgeType) |
static void | argsToEdges (CFLAliasAnalysis &, Instruction *, SmallVectorImpl< Edge > &) |
static Level | directionOfEdgeType (EdgeType) |
static void | buildGraphFrom (CFLAliasAnalysis &, Function *, SmallVectorImpl< Value * > &, NodeMapT &, GraphT &) |
static FunctionInfo | buildSetsFrom (CFLAliasAnalysis &, Function *) |
static StratifiedAttr | argNumberToAttrIndex (unsigned ArgNum) |
enum EdgeType |
Definition at line 98 of file CFLAliasAnalysis.cpp.
enum Level |
Definition at line 94 of file CFLAliasAnalysis.cpp.
static StratifiedAttr argNumberToAttrIndex | ( | StratifiedAttr | ) | [static] |
Referenced by valueToAttrIndex().
static StratifiedAttr argNumberToAttrIndex | ( | unsigned | ArgNum | ) | [static] |
Definition at line 765 of file CFLAliasAnalysis.cpp.
static void argsToEdges | ( | CFLAliasAnalysis & | Analysis, |
Instruction * | Inst, | ||
SmallVectorImpl< Edge > & | Output | ||
) | [static] |
Definition at line 783 of file CFLAliasAnalysis.cpp.
Referenced by buildGraphFrom().
static void buildGraphFrom | ( | CFLAliasAnalysis & | Analysis, |
Function * | Fn, | ||
SmallVectorImpl< Value * > & | ReturnedValues, | ||
NodeMapT & | Map, | ||
GraphT & | Graph | ||
) | [static] |
Definition at line 805 of file CFLAliasAnalysis.cpp.
References argsToEdges(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorBase::empty(), flipWeight(), llvm::Function::getBasicBlockList(), getTargetValue(), hasUsefulEdges(), Node, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MipsISD::Ret.
Referenced by buildSetsFrom().
static FunctionInfo buildSetsFrom | ( | CFLAliasAnalysis & | Analysis, |
Function * | Fn | ||
) | [static] |
Definition at line 854 of file CFLAliasAnalysis.cpp.
References llvm::StratifiedSetsBuilder< T >::add(), llvm::StratifiedSetsBuilder< T >::addAbove(), llvm::StratifiedSetsBuilder< T >::addBelow(), llvm::StratifiedSetsBuilder< T >::addWith(), llvm::Function::args(), llvm::StratifiedSetsBuilder< T >::build(), buildGraphFrom(), llvm::SmallVectorImpl< T >::clear(), directionOfEdgeType(), llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::find(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::insert(), Node, llvm::StratifiedSetsBuilder< T >::noteAttributes(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::resize(), and valueToAttrIndex().
static Level directionOfEdgeType | ( | EdgeType | Weight | ) | [static] |
Definition at line 789 of file CFLAliasAnalysis.cpp.
References llvm_unreachable.
Referenced by buildSetsFrom().
static EdgeType flipWeight | ( | EdgeType | Initial | ) | [static] |
Definition at line 771 of file CFLAliasAnalysis.cpp.
References llvm_unreachable.
Referenced by buildGraphFrom().
static bool getPossibleTargets | ( | Inst * | Call, |
SmallVectorImpl< Function * > & | Output | ||
) | [static] |
Definition at line 732 of file CFLAliasAnalysis.cpp.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
static Optional< Value * > getTargetValue | ( | Instruction * | Inst | ) | [static] |
Definition at line 744 of file CFLAliasAnalysis.cpp.
Referenced by buildGraphFrom().
static bool hasUsefulEdges | ( | Instruction * | Inst | ) | [static] |
Definition at line 749 of file CFLAliasAnalysis.cpp.
Referenced by buildGraphFrom().
INITIALIZE_AG_PASS | ( | CFLAliasAnalysis | , |
AliasAnalysis | , | ||
"cfl-aa" | , | ||
"CFL-Based AA implementation" | , | ||
false | , | ||
true | , | ||
false | |||
) |
Definition at line 684 of file CFLAliasAnalysis.cpp.
static Optional< Function * > parentFunctionOfValue | ( | Value * | Val | ) | [static] |
Definition at line 720 of file CFLAliasAnalysis.cpp.
References llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), and llvm::GlobalValue::getParent().
static Optional< StratifiedAttr > valueToAttrIndex | ( | Value * | Val | ) | [static] |
Definition at line 755 of file CFLAliasAnalysis.cpp.
References argNumberToAttrIndex().
Referenced by buildSetsFrom().