[all-commits] [llvm/llvm-project] 734ee0: [LVI] Support using block values when handling con...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Jan 2 01:49:58 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 734ee0e01feeadd75bdbed35acc08f242623a212
https://github.com/llvm/llvm-project/commit/734ee0e01feeadd75bdbed35acc08f242623a212
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-01-02 (Tue, 02 Jan 2024)
Changed paths:
M llvm/lib/Analysis/LazyValueInfo.cpp
M llvm/test/Transforms/CorrelatedValuePropagation/cond-using-block-value.ll
Log Message:
-----------
[LVI] Support using block values when handling conditions (#75311)
Currently, LVI will only use conditions like "X < C" to constrain the
value of X on the relevant edge. This patch extends it to handle
conditions like "X < Y" by querying the known range of Y.
This means that getValueFromCondition() and various related APIs can now
return nullopt to indicate that they have pushed to the worklist, and
need to be called again later. This behavior is currently controlled by
a UseBlockValue option, and only enabled for actual edge value handling.
All other places deriving constraints from conditions keep using the
previous logic for now.
This change was originally motivated as a fix for the regression
reported in
https://github.com/llvm/llvm-project/pull/73662#issuecomment-1849281758.
Unfortunately, it doesn't actually fix it, because we run into another
issue there (LVI currently is really bad at handling values used in
loops).
This change has some compile-time impact, but it's fairly small,
in the 0.05% range.
More information about the All-commits
mailing list