diff options
| author | Nikita Popov <npopov@redhat.com> | 2024-08-02 13:43:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-02 13:43:02 +0200 |
| commit | 79af6892f8eee1d0fb96c243716c8b03936751c9 (patch) | |
| tree | e85ce18cdaecfedef63820ca8623373a58922e84 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface | |
| parent | aa0a33be56f1ef8195eccbca57a103a8e1e302e3 (diff) | |
[SCEV] Handle more adds in computeConstantDifference() (#101339)
Currently it only deals with the case where we're subtracting adds with
at most one non-constant operand. This patch extends it to cancel out
common operands for the subtraction of arbitrary add expressions.
The background here is that I want to replace a getMinusSCEV() call in
LAA with computeConstantDifference():
https://github.com/llvm/llvm-project/blob/93fecc2577ece0329f3bbe2719bbc5b4b9b30010/llvm/lib/Analysis/LoopAccessAnalysis.cpp#L1602-L1603
This particular call is very expensive in some cases (e.g. lencod with
LTO) and computeConstantDifference() could achieve this much more
cheaply, because it does not need to construct new SCEV expressions.
However, the current computeConstantDifference() implementation is too
weak for this and misses many basic cases. This is a step towards making
it more powerful while still keeping it pretty fast.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface')
0 files changed, 0 insertions, 0 deletions
