#
359bc5c5 |
| 13-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Bail out for GEPs when index size > 64 bits.
Limit pointer decomposition to pointers with index sizes of at most 64 bits. int64_t is used for coefficients, so as long as the index s
[ConstraintElim] Bail out for GEPs when index size > 64 bits.
Limit pointer decomposition to pointers with index sizes of at most 64 bits. int64_t is used for coefficients, so as long as the index size <= 64 bits we should be able to represent all pointer offsets.
Pointer decomposition is limited to inbounds GEPs, so if a index computation would overflow the result is poison, so it doesn't matter that the coefficient overflows.
This allows replacing MulOverflow with regular multiplications.
show more ...
|
#
0ebd2883 |
| 12-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Move GEP decomposition code to separate fn (NFC).
Breaks up a large function and allows for the use to early exits.
|
#
80e49f49 |
| 10-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Bail out for GEPs with scalable vectors.
This fixes a crash with scalable vectors, thanks @nikic for spotting this!
|
#
fee8f561 |
| 09-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Include index type scale.
The current decomposition for GEPs did not correctly handle cases where GEPs access different source types. Adjust the constraints by including the
[ConstraintElimination] Include index type scale.
The current decomposition for GEPs did not correctly handle cases where GEPs access different source types. Adjust the constraints by including the indexed type-size as coefficients.
Further generalization to allow GEPs with more than one index is a needed general follow-up improvement.
show more ...
|
#
11a6e64b |
| 09-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Move logic to get constraint for solving to helper.
Move common logic shared by callers of getConstraint that use the result to query the constraint system to a new helper getConstr
[ConstraintElim] Move logic to get constraint for solving to helper.
Move common logic shared by callers of getConstraint that use the result to query the constraint system to a new helper getConstraintForSolving.
This includes common legality checks (i.e. not an equality constraint, no new variables) and the logic to query the unsigned system if possible for signed predicates.
show more ...
|
#
e0136a62 |
| 08-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Support chained GEPs with constant offsets.
Handle the (gep (gep ....), C) case by incrementing the constant coefficient of the inner GEP, if C is a constant.
|
#
be858bda |
| 08-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Remove unused function (NFC).
|
#
9d31d1c2 |
| 08-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Use logic from 3771310eed for queries only.
The logic added in 3771310eed was placed sub-optimally. Applying the transform in ::getConstraint meant that it would also impact
[ConstraintElimination] Use logic from 3771310eed for queries only.
The logic added in 3771310eed was placed sub-optimally. Applying the transform in ::getConstraint meant that it would also impact conditions that are added to the system by the signed <-> unsigned transfer logic.
This meant we failed to add some signed facts to the signed system. To make sure we still add as many useful facts to the signed/unsigned systems, move the logic to the point where we query the system.
show more ...
|
#
3771310e |
| 07-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Convert to unsigned Pred if possible.
Convert SLE/SLT predicates to unsigned equivalents if both operands are known to be signed-positive.
https://alive2.llvm.org/ce/z/tBeiZr
|
#
a7ac0dd0 |
| 06-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Generalize AND matching.
Extend more general matching used for chains of ORs to also support chains of ANDs.
|
#
8e3e9629 |
| 06-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Order cmps for signed <-> unsigned transfer first.
Make sure conditions with constant operands come before conditions without constant operands. This increases the effectiven
[ConstraintElimination] Order cmps for signed <-> unsigned transfer first.
Make sure conditions with constant operands come before conditions without constant operands. This increases the effectiveness of the current signed <-> unsigned fact transfer logic.
show more ...
|
#
349375d0 |
| 06-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Generalize OR matching.
Extend OR handling to traverse chains of ORs.
|
#
7449570f |
| 06-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Use ConstraintTy::IsSigned instead of Predicate.
This should be NFC and ensure the sign of the constraint is used consistently in the future.
|
Revision tags: working |
|
#
9aa004a0 |
| 05-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Convert NewIndices to vector and rename (NFCI).
The callers of getConstraint only require a list of new variables. Update the naming and types to make this clearer.
|
Revision tags: llvmorg-15.0.2 |
|
#
b2daeb97 |
| 03-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Re-enable debug print when adding facts. (NFC)
Also add test coverage for important debug output.
|
#
bdfe986d |
| 03-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Simplify logic for using inverse predicate (NFC)
Recent improvements to the code structure mean we don't need to reset the condition's predicate in the IR and later restore i
[ConstraintElimination] Simplify logic for using inverse predicate (NFC)
Recent improvements to the code structure mean we don't need to reset the condition's predicate in the IR and later restore it. Remove the restorer logic.
show more ...
|
#
017552e8 |
| 03-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Remove stray comment (NFC).
The comment doens't apply in the current context, remove it.
|
#
a2efc29e |
| 03-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Remove unused StackEntry::IsNot field. (NFC)
The field is no unused and can be removed.
|
#
3fe6ddd9 |
| 02-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Update Changed status in ssub simplification.
Update tryToSimplifyOverflowMath to indicate whether the function made any changes to the IR.
|
#
04c711c7 |
| 30-Sep-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Make sure the variable is available before use.
This fixes a crash when trying to access an index for a value where we don't have a known index.
Fixes #58009.
|
#
16544cbe |
| 28-Sep-2022 |
serge-sans-paille <sguelton@redhat.com> |
[iwyu] Move <cmath> out of llvm/Support/MathExtras.h
Interestingly, MathExtras.h doesn't use <cmath> declaration, so move it out of that header and include it when needed.
No functional change inte
[iwyu] Move <cmath> out of llvm/Support/MathExtras.h
Interestingly, MathExtras.h doesn't use <cmath> declaration, so move it out of that header and include it when needed.
No functional change intended, but there's no longer a transitive include fromMathExtras.h to cmath.
show more ...
|
Revision tags: llvmorg-15.0.1 |
|
#
7914e53e |
| 17-Sep-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Fix crash when combining results.
f213128b292d didn't account for the possibility that the result of decompose may be empty. Fix that by explicitly checking. Use a newly intr
[ConstraintElimination] Fix crash when combining results.
f213128b292d didn't account for the possibility that the result of decompose may be empty. Fix that by explicitly checking. Use a newly introduced helper to also reduce some duplication.
Thanks @bjope for finding the issue!
show more ...
|
#
7f3ff9d3 |
| 14-Sep-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Track if variables are positive in constraint.
Keep track if variables are known positive during constraint decomposition, aggregate the information when building the constra
[ConstraintElimination] Track if variables are positive in constraint.
Keep track if variables are known positive during constraint decomposition, aggregate the information when building the constraint object and encode the extra information as constraints to be used during reasoning.
show more ...
|
#
efd3ec47 |
| 14-Sep-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Clear new indices directly in getConstraint(NFC)
Instead of checking if any of the new indices has a non-zero coefficient before using the constraint, do this directly when c
[ConstraintElimination] Clear new indices directly in getConstraint(NFC)
Instead of checking if any of the new indices has a non-zero coefficient before using the constraint, do this directly when constructing the constraint.
show more ...
|
#
f213128b |
| 14-Sep-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Further de-compose operands of add operations.
This simply extends the existing logic to look through adds and combine the components as done in other places already.
|