diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2023-09-20 01:02:19 +0800 |
---|---|---|
committer | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2023-09-20 01:02:19 +0800 |
commit | 93fde2ea1b2cb07ed5741057571ee38e7e224978 (patch) | |
tree | 8b4f3cf5be320bce0fccdc15ab2c3b16030ac2ba /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h | |
parent | fba457d77e59bff91fe3e01dcaec6cf3d2b5b556 (diff) | |
download | llvm-93fde2ea1b2cb07ed5741057571ee38e7e224978.zip llvm-93fde2ea1b2cb07ed5741057571ee38e7e224978.tar.gz llvm-93fde2ea1b2cb07ed5741057571ee38e7e224978.tar.bz2 |
[RISCV] Add a pass to rewrite rd to x0 for non-computational instrs whose return values are unused
When AMOs are used to implement parallel reduction operations, typically the return value would be discarded.
This patch adds a peephole pass `RISCVDeadRegisterDefinitions`. It rewrites `rd` to `x0` when `rd` is marked as dead.
It may improve the register allocation and reduce pipeline hazards on CPUs without register renaming and OOO.
Comparison with GCC: https://godbolt.org/z/bKaxnEcec
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D158759
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions