This is an archive of the discontinued LLVM Phabricator instance.

[ConstraintElimination] Replace isKnownNegative entry with upper and lower bound info for each decomposed variable.
Needs ReviewPublic

Authored by zjaffal on Feb 26 2023, 11:06 PM.

Details

Reviewers
fhahn
spatel
nikic
Summary

This patch relaces having only a binary lower bound if the the variable is negative or not with two bounds, a lower bound value and an upper bound which start at MinSignedConstraintValue and
MaxConstraintValue respectively.
During decompositon we can update both bound values and utilize that information when solving the system of linear equations. The original behaviour of isKnownNegative is preserved here and we don't add constraints to the system if the bounds are not set i.e bounds
are still at MinSignedConstraintValue and MaxConstraintValue.

Diff Detail