aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-11-08 09:48:38 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-11-18 21:48:49 +0100
commitcd3c22c47e4bef347599e137ee6b1c3c510d7902 (patch)
treeadd674c1d144f1facb383a4770f939dbf10f255a /lldb/source/Commands/CommandObjectThread.cpp
parentca76e9f34da844d5f78029f0d437efef08b4dd3f (diff)
downloadllvm-cd3c22c47e4bef347599e137ee6b1c3c510d7902.zip
llvm-cd3c22c47e4bef347599e137ee6b1c3c510d7902.tar.gz
llvm-cd3c22c47e4bef347599e137ee6b1c3c510d7902.tar.bz2
[BasicAA] Generalize base offset modulus handling
The GEP aliasing implementation currently has two pieces of code that solve two different subsets of the same basic problem: If you have GEPs with offsets 4*x + 0 and 4*y + 1 (assuming access size 1), then they do not alias regardless of whether x and y are the same. One implementation is in aliasSameBasePointerGEPs(), which looks at this in a limited structural way. It requires both GEP base pointers to be exactly the same, then (optionally) a number of equal indexes, then an unknown index, then a non-equal index into a struct. This set of limitations works, but it's overly restrictive and hides the core property we're trying to exploit. The second implementation is part of aliasGEP() itself and tries to find a common modulus in the scales, so it can then check that the constant offset doesn't overlap under modular arithmetic. The second implementation has the right idea of what the general problem is, but effectively only considers power of two factors in the scales (while aliasSameBasePointerGEPs also works with non-pow2 struct sizes.) What this patch does is to adjust the aliasGEP() implementation to instead find the largest common factor in all the scales (i.e. the GCD) and use that as the modulus. Differential Revision: https://reviews.llvm.org/D91027
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
0 files changed, 0 insertions, 0 deletions