[PATCH] D144841: [ConstraintElimination] Replace isKnownNegative entry with upper and lower bound info for each decomposed variable.

Zain Jaffal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 26 23:06:33 PST 2023


zjaffal created this revision.
zjaffal added reviewers: fhahn, spatel, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
zjaffal requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144841

Files:
  llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144841.500669.patch
Type: text/x-patch
Size: 4967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230227/40797ff3/attachment.bin>


More information about the llvm-commits mailing list