[PATCH] D91010: [BasicAA] Remove checks for GEP decomposition limit reached

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 12:07:11 PST 2020


nikic added inline comments.


================
Comment at: llvm/test/Analysis/BasicAA/gep-decomposition-limit.ll:11
+; CHECK-DAG: NoAlias: i8* %gep.inc4, i8* %gep.inc6
+; CHECK-DAG: NoAlias: i8* %gep.inc5, i8* %gep.inc6
 ;; After limit:
----------------
The effective change here is that results at the decomposition limit are now as good as results below the limit. Results above it have less precision.


================
Comment at: llvm/test/Analysis/BasicAA/gep-decomposition-limit.ll:15
 ; CHECK-DAG: MayAlias: i8* %gep.inc5, i8* %gep.inc7
-; CHECK-DAG: MayAlias: i8* %gep.inc6, i8* %gep.inc7
+; CHECK-DAG: NoAlias: i8* %gep.inc6, i8* %gep.inc7
 
----------------
Slightly non-obvious: The reason why we get a better result on the last one is that we strip off an offset 6 from both sides (from inc6 because that's all there is, from inc7 because of the limit). As the offset is the same, the recursive query can preserves access sizes, so we get a precise end result. For the other cases we'll strip off an asymmetric offset (5 and 6, or 7 and 6) and thus the recursive query is performed without sizes, so we don't get precise results there.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91010/new/

https://reviews.llvm.org/D91010



More information about the llvm-commits mailing list