diff options
| author | Fateme Hosseini <quic_fhossein@quicinc.com> | 2025-11-06 14:02:15 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-06 14:02:15 -0600 |
| commit | 8d0df57340bee4eabe82c1c9c6604cefa4b5c299 (patch) | |
| tree | ab3abd8842c3e0e3401a289a614bffd7ffa54eeb /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | |
| parent | 316236b1c05a81bcc9b29d3d8a6a9143f0930a5d (diff) | |
| download | llvm-8d0df57340bee4eabe82c1c9c6604cefa4b5c299.zip llvm-8d0df57340bee4eabe82c1c9c6604cefa4b5c299.tar.gz llvm-8d0df57340bee4eabe82c1c9c6604cefa4b5c299.tar.bz2 | |
[Hexagon] Improve QFP Optimizer (#166647)
This patch enhances HexagonQFPOptimizer in multiple ways:
1. Refactor the code for better readability and maintainability.
2. Optimize vabs,vneg and vilog2 converts
The three instruction mentioned can be optimized like below:
```v1.sf = v0.qf32
v2.qf = vneg v1.sf```
to
```v2.qf = vneg v0.qf32```
This optimization eliminates one conversion and is applicable
to both qf32 and qf16 types.
3. Enable vsub fusion with mixed arguments Previously, QFPOptimizer did
not fuse partial qfloat operands with vsub. This update allows selective
use of vsub_hf_mix, vsub_sf_mix, vsub_qf16_mix, and vsub_qf32_mix when
appropriate. It also enables QFP simplifications involving vector pair
subregisters.
Example scenario in a machine basic block targeting Hexagon: ```v1.qf32
= ... // result of a vadd
v2.sf = v1.qf32
v3.qf32 = vmpy(v2.sf, v2.sf)```
4. Remove redundant conversions Under certain conditions, we previously
bailed out before removing qf-to-sf/hf conversions. This patch removes
that bailout, enabling more aggressive elimination of unnecessary
conversions.
5. Don't optimize equals feeding into multiply: Removing converts
feeding into multiply loses precision. This patch avoids optimizing
multiplies along with giving the users an option to enable this by a
flag.
Patch By: Fateme Hosseini
Co-authored-by: Kaushik Kulkarni <quic_kauskulk@quicinc.com>
Co-authored-by: Santanu Das <santdas@qti.qualcomm.com>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions
