LLVM API Documentation
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionTracker.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/PHITransAddr.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/PredIteratorCache.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "memdep" |
Functions | |
STATISTIC (NumCacheNonLocal,"Number of fully cached non-local responses") | |
STATISTIC (NumCacheDirtyNonLocal,"Number of dirty cached non-local responses") | |
STATISTIC (NumUncacheNonLocal,"Number of uncached non-local responses") | |
STATISTIC (NumCacheNonLocalPtr,"Number of fully cached non-local ptr responses") | |
STATISTIC (NumCacheDirtyNonLocalPtr,"Number of cached, but dirty, non-local ptr responses") | |
STATISTIC (NumUncacheNonLocalPtr,"Number of uncached non-local ptr responses") | |
STATISTIC (NumCacheCompleteNonLocalPtr,"Number of block queries that were completely cached") | |
INITIALIZE_PASS_BEGIN (MemoryDependenceAnalysis,"memdep","Memory Dependence Analysis", false, true) INITIALIZE_PASS_END(MemoryDependenceAnalysis | |
template<typename KeyTy > | |
static void | RemoveFromReverseMap (DenseMap< Instruction *, SmallPtrSet< KeyTy, 4 > > &ReverseMap, Instruction *Inst, KeyTy Val) |
static AliasAnalysis::ModRefResult | GetLocation (const Instruction *Inst, AliasAnalysis::Location &Loc, AliasAnalysis *AA) |
static bool | isLoadLoadClobberIfExtendedToFullWidth (const AliasAnalysis::Location &MemLoc, const Value *&MemLocBase, int64_t &MemLocOffs, const LoadInst *LI, const DataLayout *DL) |
static void | AssertSorted (MemoryDependenceAnalysis::NonLocalDepInfo &Cache, int Count=-1) |
static void | SortNonLocalDepInfoCache (MemoryDependenceAnalysis::NonLocalDepInfo &Cache, unsigned NumSortedEntries) |
Variables | |
static const int | BlockScanLimit = 100 |
memdep | |
Memory Dependence | Analysis |
Memory Dependence | false |
#define DEBUG_TYPE "memdep" |
Definition at line 36 of file MemoryDependenceAnalysis.cpp.
static void AssertSorted | ( | MemoryDependenceAnalysis::NonLocalDepInfo & | Cache, |
int | Count = -1 |
||
) | [static] |
AssertSorted - This method is used when -debug is specified to verify that cache arrays are properly kept sorted.
Definition at line 698 of file MemoryDependenceAnalysis.cpp.
Referenced by llvm::MemoryDependenceAnalysis::getNonLocalCallDependency().
static AliasAnalysis::ModRefResult GetLocation | ( | const Instruction * | Inst, |
AliasAnalysis::Location & | Loc, | ||
AliasAnalysis * | AA | ||
) | [static] |
GetLocation - If the given instruction references a specific memory location, fill in Loc with the details, otherwise set Loc.Ptr to null. Return a ModRefInfo value describing the general behavior of the instruction.
Definition at line 125 of file MemoryDependenceAnalysis.cpp.
References llvm::AliasAnalysis::getLocation(), llvm::AliasAnalysis::getTargetLibraryInfo(), llvm::isFreeCall(), LI, llvm::Instruction::mayReadFromMemory(), llvm::Instruction::mayWriteToMemory(), llvm::AliasAnalysis::Mod, llvm::AliasAnalysis::ModRef, llvm::Monotonic, llvm::AliasAnalysis::NoModRef, and llvm::AliasAnalysis::Ref.
Referenced by llvm::MemoryDependenceAnalysis::getDependency().
INITIALIZE_PASS_BEGIN | ( | MemoryDependenceAnalysis | , |
"memdep" | , | ||
"Memory Dependence Analysis" | , | ||
false | , | ||
true | |||
) |
static bool isLoadLoadClobberIfExtendedToFullWidth | ( | const AliasAnalysis::Location & | MemLoc, |
const Value *& | MemLocBase, | ||
int64_t & | MemLocOffs, | ||
const LoadInst * | LI, | ||
const DataLayout * | DL | ||
) | [static] |
isLoadLoadClobberIfExtendedToFullWidth - Return true if LI is a load that would fully overlap MemLoc if done as a wider legal integer load.
MemLocBase, MemLocOffset are lazily computed here the first time the base/offs of memloc is needed.
Definition at line 266 of file MemoryDependenceAnalysis.cpp.
References llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), llvm::GetPointerBaseWithConstantOffset(), llvm::AliasAnalysis::Location::Ptr, and llvm::AliasAnalysis::Location::Size.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
static void RemoveFromReverseMap | ( | DenseMap< Instruction *, SmallPtrSet< KeyTy, 4 > > & | ReverseMap, |
Instruction * | Inst, | ||
KeyTy | Val | ||
) | [static] |
RemoveFromReverseMap - This is a helper function that removes Val from 'Inst's set in ReverseMap. If the set becomes empty, remove Inst's entry.
Definition at line 108 of file MemoryDependenceAnalysis.cpp.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::erase().
Referenced by llvm::MemoryDependenceAnalysis::getDependency(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), and llvm::MemoryDependenceAnalysis::removeInstruction().
static void SortNonLocalDepInfoCache | ( | MemoryDependenceAnalysis::NonLocalDepInfo & | Cache, |
unsigned | NumSortedEntries | ||
) | [static] |
SortNonLocalDepInfoCache - Sort the NonLocalDepInfo cache, given a certain number of elements in the array that are already properly ordered. This is optimized for the case when only a few entries are added.
Definition at line 956 of file MemoryDependenceAnalysis.cpp.
STATISTIC | ( | NumCacheNonLocal | , |
"Number of fully cached non-local responses" | |||
) |
STATISTIC | ( | NumCacheDirtyNonLocal | , |
"Number of dirty cached non-local responses" | |||
) |
STATISTIC | ( | NumUncacheNonLocal | , |
"Number of uncached non-local responses" | |||
) |
STATISTIC | ( | NumCacheNonLocalPtr | , |
"Number of fully cached non-local ptr responses" | |||
) |
STATISTIC | ( | NumCacheDirtyNonLocalPtr | , |
"Number of | cached, | ||
but | dirty, | ||
non-local ptr responses" | |||
) |
STATISTIC | ( | NumUncacheNonLocalPtr | , |
"Number of uncached non-local ptr responses" | |||
) |
STATISTIC | ( | NumCacheCompleteNonLocalPtr | , |
"Number of block queries that were completely cached" | |||
) |
Definition at line 61 of file MemoryDependenceAnalysis.cpp.
const int BlockScanLimit = 100 [static] |
Definition at line 52 of file MemoryDependenceAnalysis.cpp.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
Definition at line 61 of file MemoryDependenceAnalysis.cpp.
Definition at line 61 of file MemoryDependenceAnalysis.cpp.