diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 6 | ||||
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 17abae4eb9..302204e41b 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -107,6 +107,12 @@ public: return Copy; } + Location getWithNewSize(uint64_t NewSize) const { + Location Copy(*this); + Copy.Size = NewSize; + return Copy; + } + Location getWithoutTBAATag() const { Location Copy(*this); Copy.TBAATag = 0; diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index b5c68f6833..c1a1536037 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -227,11 +227,14 @@ namespace llvm { BBSkipFirstBlockPair Pair; /// NonLocalDeps - The results of the query for each relevant block. NonLocalDepInfo NonLocalDeps; + /// Size - The maximum size of the dereferences of the + /// pointer. May be UnknownSize if the sizes are unknown. + uint64_t Size; /// TBAATag - The TBAA tag associated with dereferences of the /// pointer. May be null if there are no tags or conflicting tags. - MDNode *TBAATag; + const MDNode *TBAATag; - NonLocalPointerInfo() : TBAATag(0) {} + NonLocalPointerInfo() : Size(0), TBAATag(0) {} }; /// CachedNonLocalPointerInfo - This map stores the cached results of doing @@ -315,14 +318,6 @@ namespace llvm { bool isLoad, BasicBlock *BB, SmallVectorImpl<NonLocalDepResult> &Result); - /// getNonLocalPointerDependence - A convenience wrapper. - void getNonLocalPointerDependency(Value *Pointer, bool isLoad, - BasicBlock *BB, - SmallVectorImpl<NonLocalDepResult> &Result){ - return getNonLocalPointerDependency(AliasAnalysis::Location(Pointer), - isLoad, BB, Result); - } - /// removeInstruction - Remove an instruction from the dependence analysis, /// updating the dependence of instructions that previously depended on it. void removeInstruction(Instruction *InstToRemove); |