diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2013-10-24 09:17:24 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2013-10-24 09:17:24 +0000 |
commit | 5e1d0d39db5fefe013f58c124a94694f96bce2f1 (patch) | |
tree | b4dcda463d9c83c54bd43c0324baf253d3f03287 /include/llvm/Analysis | |
parent | 2f21452ba1ee5bde8fee438b4cf1a1ce95beb6ca (diff) | |
download | external_llvm-5e1d0d39db5fefe013f58c124a94694f96bce2f1.zip external_llvm-5e1d0d39db5fefe013f58c124a94694f96bce2f1.tar.gz external_llvm-5e1d0d39db5fefe013f58c124a94694f96bce2f1.tar.bz2 |
fix PR17635: false positive with packed structures
LLVM optimizers may widen accesses to packed structures that overflow the structure itself, but should be in bounds up to the alignment of the object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/MemoryBuiltins.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h index c54b7e6..91224ad 100644 --- a/include/llvm/Analysis/MemoryBuiltins.h +++ b/include/llvm/Analysis/MemoryBuiltins.h @@ -228,6 +228,7 @@ class ObjectSizeOffsetEvaluator Value *Zero; CacheMapTy CacheMap; PtrSetTy SeenVals; + bool RoundToAlign; SizeOffsetEvalType unknown() { return std::make_pair((Value*)0, (Value*)0); @@ -236,7 +237,7 @@ class ObjectSizeOffsetEvaluator public: ObjectSizeOffsetEvaluator(const DataLayout *DL, const TargetLibraryInfo *TLI, - LLVMContext &Context); + LLVMContext &Context, bool RoundToAlign = false); SizeOffsetEvalType compute(Value *V); bool knownSize(SizeOffsetEvalType SizeOffset) { |