This is a new technique I thought of today, idea is to fold copies of vregs to vregs. Probably will support some cases where there are physregs too.
Diff Detail
- Repository
- rL LLVM
Event Timeline
Ah yes, thanks. Test and full context included now.
PL
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
lib/CodeGen/MIRCanonicalizerPass.cpp | ||
---|---|---|
318 | Capitalize variables and clang-format, please. | |
319 | for (MachineInstr &MI : MBB->instrs()), maybe? | |
320–321 | Do we need to be careful about register classes here to preserve semantics? | |
324 | Better to write "MachineInstr *" rather than auto here, it's not much longer and the clarity is worth it | |
339–347 | Is the RenameMOs vector necessary? Why not just setReg in the loop over uses? Also I believe we can use range-for with MRI.uses() here to simplify. | |
test/CodeGen/MIR/AArch64/mirCanonCopyCopyProp.mir | ||
109–111 ↗ | (On Diff #141518) | I feel like this test can be made much shorter. Can't we do this with just two or three instructions? |
Capitalize variables and clang-format, please.