Commit 6c47182
committed
[RegAlloc] Allow rematerialization with virtual reg uses
Stacked on llvm#159180.
Unless overridden by the target, we currently only allow rematerlization of instructions with immediate or constant physical register operands, i.e. no virtual registers.
The comment states that this is because we might increase a live range of the virtual register, but we don't actually do this. LiveRangeEdit::allUsesAvailableAt makes sure that we only rematerialize instructions whose virtual registers are already live at the use sites.
This patch relaxes this constraint which reduces a significant amount of reloads across various targets.
This is another attempt at https://reviews.llvm.org/D106408, but llvm#159180 aims to have addressed the issue with the weights that may have caused the previous regressions.1 parent 048922e commit 6c47182
File tree
28 files changed
+1320
-1347
lines changed- llvm
- lib/CodeGen
- test/CodeGen
- AArch64
- GlobalISel
- ARM
- RISCV
- Thumb2
- LowOverheadLoops
- X86
- AMX
28 files changed
+1320
-1347
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | 1660 | | |
1667 | 1661 | | |
1668 | 1662 | | |
| |||
0 commit comments