mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user