diff options
| author | David Green <david.green@arm.com> | 2023-02-05 10:28:54 +0000 |
|---|---|---|
| committer | David Green <david.green@arm.com> | 2023-02-05 10:28:54 +0000 |
| commit | 120ce83660dea7e70abe1c8f9408f39fe2502f8d (patch) | |
| tree | b517a9909d9bb6547af1fdfafab626e5ebf9b1a4 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 50ca8b3e8726180a74fcbc4611893f19189b97c0 (diff) | |
[DAG] Add visitABD optimizations
This adds basic a visitABD to optimize ABDS and ABDU nodes, similar to the
existing visitAVG method.
The fold I was initially interested in was folding shuffles though the binop.
This also:
- Marks ABDS and ABDU as commutative binops (https://alive2.llvm.org/ce/z/oCDogb
and https://alive2.llvm.org/ce/z/7zrs86).
- Add reassociative folds.
- Add constant folding using max(x,y)-min(x,y)
- Canonicalizes constants to the RHS
- Folds abds x, 0 -> abs(x) (https://alive2.llvm.org/ce/z/4ZEibv)
- Folds abdu x, 0 -> x (https://alive2.llvm.org/ce/z/J_rKqx)
- Folds abd x, undef -> 0 (https://alive2.llvm.org/ce/z/NV6Nsv and
https://alive2.llvm.org/ce/z/vs92hu).
Differential Revision: https://reviews.llvm.org/D143193
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
