|
LLVM
3.7.0
|
#include "llvm/Analysis/MemoryDependenceAnalysis.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/AssumptionCache.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.
Macros | |
| #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) |
| RemoveFromReverseMap - This is a helper function that removes Val from 'Inst's set in ReverseMap. More... | |
| static AliasAnalysis::ModRefResult | GetLocation (const Instruction *Inst, MemoryLocation &Loc, AliasAnalysis *AA) |
| GetLocation - If the given instruction references a specific memory location, fill in Loc with the details, otherwise set Loc.Ptr to null. More... | |
| static bool | isLoadLoadClobberIfExtendedToFullWidth (const MemoryLocation &MemLoc, const Value *&MemLocBase, int64_t &MemLocOffs, const LoadInst *LI) |
| isLoadLoadClobberIfExtendedToFullWidth - Return true if LI is a load that would fully overlap MemLoc if done as a wider legal integer load. More... | |
| static bool | isVolatile (Instruction *Inst) |
| static void | AssertSorted (MemoryDependenceAnalysis::NonLocalDepInfo &Cache, int Count=-1) |
| AssertSorted - This method is used when -debug is specified to verify that cache arrays are properly kept sorted. More... | |
| static void | SortNonLocalDepInfoCache (MemoryDependenceAnalysis::NonLocalDepInfo &Cache, unsigned NumSortedEntries) |
| SortNonLocalDepInfoCache - Sort the NonLocalDepInfo cache, given a certain number of elements in the array that are already properly ordered. More... | |
Variables | |
| static const unsigned int | BlockScanLimit = 100 |
| static const unsigned int | NumResultsLimit = 100 |
| memdep | |
| Memory Dependence | Analysis |
| Memory Dependence | false |
| #define DEBUG_TYPE "memdep" |
Definition at line 36 of file MemoryDependenceAnalysis.cpp.
|
static |
AssertSorted - This method is used when -debug is specified to verify that cache arrays are properly kept sorted.
Definition at line 709 of file MemoryDependenceAnalysis.cpp.
Referenced by llvm::MemoryDependenceAnalysis::getNonLocalCallDependency().
|
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 122 of file MemoryDependenceAnalysis.cpp.
References llvm::MemoryLocation::get(), llvm::AliasAnalysis::getTargetLibraryInfo(), llvm::isFreeCall(), llvm::Instruction::mayReadFromMemory(), llvm::Instruction::mayWriteToMemory(), llvm::AliasAnalysis::Mod, llvm::AliasAnalysis::ModRef, llvm::Monotonic, llvm::AliasAnalysis::NoModRef, llvm::AliasAnalysis::Ref, and SI.
Referenced by llvm::MemoryDependenceAnalysis::getDependency().
| INITIALIZE_PASS_BEGIN | ( | MemoryDependenceAnalysis | , |
| "memdep" | , | ||
| "Memory Dependence Analysis" | , | ||
| false | , | ||
| true | |||
| ) |
|
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 260 of file MemoryDependenceAnalysis.cpp.
References llvm::DL, llvm::Module::getDataLayout(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), llvm::Instruction::getModule(), llvm::GetPointerBaseWithConstantOffset(), llvm::MemoryLocation::Ptr, and llvm::MemoryLocation::Size.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
|
static |
Definition at line 353 of file MemoryDependenceAnalysis.cpp.
References SI.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAlignedStore(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::IRBuilder< true, TargetFolder >::CreateStore(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), getUnderlyingObjectsForInstr(), hasNormalLoadOperand(), haveSameSpecialState(), isRemovable(), isUnsafeMemoryObject(), LLVMGetVolatile(), PerformInsertEltCombine(), performIntToFpCombine(), PerformSTORECombine(), PerformVMOVRRDCombine(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitICmpInst(), and WriteInstruction().
|
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 105 of file MemoryDependenceAnalysis.cpp.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and Found().
Referenced by llvm::MemoryDependenceAnalysis::getDependency(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), and llvm::MemoryDependenceAnalysis::removeInstruction().
|
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 994 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" | |||
| ) |
| Memory Dependence Analysis |
Definition at line 64 of file MemoryDependenceAnalysis.cpp.
Definition at line 52 of file MemoryDependenceAnalysis.cpp.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
| Memory Dependence false |
Definition at line 64 of file MemoryDependenceAnalysis.cpp.
| memdep |
Definition at line 64 of file MemoryDependenceAnalysis.cpp.
Definition at line 55 of file MemoryDependenceAnalysis.cpp.
1.8.6