[BasicAA] Remove checks for GEP decomposition limit reached
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 7 Nov 2020 18:02:49 +0000 (19:02 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 12 Nov 2020 19:43:38 +0000 (20:43 +0100)
commitc00545dc3213af24786029ff04d6be31c7baf0b7
tree7803d66090e32af78fc0e44143ac2a1dfc70ffe2
parente7c7a1982632270ae655c7ec8e490ca2c44193a0
[BasicAA] Remove checks for GEP decomposition limit reached

The GEP aliasing code currently checks for the GEP decomposition
limit being reached (i.e., we did not reach the "final" underlying
object). As far as I can see, these checks are not necessary. It is
perfectly fine to work with a GEP whose base can still be further
decomposed.

Looking back through the commit history, these checks were originally
introduced in 1a444489e9d90915cfdda0720489893896ef1503. However, I
believe that the problem this was intended to address was later
properly fixed with 1726fc698ccb85fe4bb23c200a50f28b57fc53cb, and
the checks are no longer necessary since then (and were not the
right fix in the first place).

Differential Revision: https://reviews.llvm.org/D91010
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/gep-decomposition-limit.ll