summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-02-28 09:45:54 +0000
committerTobias Grosser <tobias@grosser.es>2017-02-28 09:45:54 +0000
commitd7c4975349e9be6906c28cb336158882a3fc027f (patch)
treee5374c98311ba505c33bb58e5acce275428ce71a /lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
parent566a15d7492799a1fcf3ab2e2b8e5c9144cab717 (diff)
downloadbcm5719-llvm-d7c4975349e9be6906c28cb336158882a3fc027f.tar.gz
bcm5719-llvm-d7c4975349e9be6906c28cb336158882a3fc027f.zip
[ScopInfo] Simplify inbounds assumptions under domain constraints
Without this simplification for a loop nest: void foo(long n1_a, long n1_b, long n1_c, long n1_d, long p1_b, long p1_c, long p1_d, float A_1[][p1_b][p1_c][p1_d]) { for (long i = 0; i < n1_a; i++) for (long j = 0; j < n1_b; j++) for (long k = 0; k < n1_c; k++) for (long l = 0; l < n1_d; l++) A_1[i][j][k][l] += i + j + k + l; } the assumption: n1_a <= 0 or (n1_a > 0 and n1_b <= 0) or (n1_a > 0 and n1_b > 0 and n1_c <= 0) or (n1_a > 0 and n1_b > 0 and n1_c > 0 and n1_d <= 0) or (n1_a > 0 and n1_b > 0 and n1_c > 0 and n1_d > 0 and p1_b >= n1_b and p1_c >= n1_c and p1_d >= n1_d) is taken rather than the simpler assumption: p9_b >= n9_b and p9_c >= n9_c and p9_d >= n9_d. The former is less strict, as it allows arbitrary values of p1_* in case, the loop is not executed at all. However, in practice these precise constraints explode when combined across different accesses and loops. For now it seems to make more sense to take less precise, but more scalable constraints by default. In case we find a practical example where more precise constraints are needed, we can think about allowing such precise constraints in specific situations where they help. This change speeds up the new test case from taking very long (waited at least a minute, but it probably takes a lot more) to below a second. llvm-svn: 296456
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud