[all-commits] [llvm/llvm-project] d045e2: [ConstraintElim] Refactor GEP offset collection.
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon Nov 27 01:06:36 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d045e23c2d00a445e40a8c97471df023d8364f59
https://github.com/llvm/llvm-project/commit/d045e23c2d00a445e40a8c97471df023d8364f59
Author: Florian Hahn <flo at fhahn.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
M llvm/test/Transforms/ConstraintElimination/gep-add-multiple-indices.ll
M llvm/test/Transforms/ConstraintElimination/gep-sub.ll
Log Message:
-----------
[ConstraintElim] Refactor GEP offset collection.
Move GEP offset collection to separate helper function and collect
variable and constant offsets in OffsetResult. For now, this only
supports 1 VariableOffset, but the new code structure can be more easily
extended to handle more offsets in the future.
The refactoring drops the check that the VariableOffset >= -1 * constant
offset. This is not needed to check whether the constraint is
monotonically increasing. The constant factors can be ignored, the
constraint will be monotonically increasing if all variables are
positive.
See https://alive2.llvm.org/ce/z/ah2uSQ,
https://alive2.llvm.org/ce/z/NCADNZ
More information about the All-commits
mailing list