[all-commits] [llvm/llvm-project] ac1ba1: [CodeGen] Introduce a VirtRegOrUnit class to hold ...
Craig Topper via All-commits
all-commits at lists.llvm.org
Fri Jan 24 18:30:50 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac1ba1f9dd7013852cd27f514467f57ee0e6ed16
https://github.com/llvm/llvm-project/commit/ac1ba1f9dd7013852cd27f514467f57ee0e6ed16
Author: Craig Topper <craig.topper at sifive.com>
Date: 2025-01-24 (Fri, 24 Jan 2025)
Changed paths:
M llvm/include/llvm/CodeGen/Register.h
M llvm/include/llvm/CodeGen/TargetRegisterInfo.h
M llvm/lib/CodeGen/LiveIntervals.cpp
M llvm/lib/CodeGen/MachineVerifier.cpp
Log Message:
-----------
[CodeGen] Introduce a VirtRegOrUnit class to hold virtual reg or physical reg unit. NFC (#123768)
LiveIntervals and MachineVerifier were previously using Register to
store this, but reg units are different than physical registers. One
important difference is that 0 is a valid reg unit number, but it is not
a valid phyiscal register.
This patch introduces a new VirtRegOrUnit class that is distinct from
Register. It can be be converted to/from a virtual Register or a
MCRegUnit. I've made all conversions explicit and used assertions to
check the validity.
I also fixed a place in MachineVerifier that was ignoring reg unit 0.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list