[llvm] [LiveIntervals] Ignore artificial regs when adding kill flags (PR #116963)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 02:09:47 PST 2024
================
@@ -710,6 +710,30 @@ void LiveIntervals::pruneValue(LiveRange &LR, SlotIndex Kill,
// Register allocator hooks.
//
+/// Returns true if the physreg has multiple regunits that can be accessed
+/// as independent registers.
+///
+/// Returns 'true' for e.g.:
+/// gpr64_0_gpr64_1
+// => two independently accessible registers gpr64_0 and gpr64_1.
+///
+/// Returns 'false' for e.g.:
+/// gpr64_0: => accessible register, reads/writes 64bits
+/// gpr32_0: => accessible sub-regsiter of gpr64_0, reads/writes 32bits
+// gpr32_0_hi => top 32bits of gpr64_0, not independently accessible.
+static bool hasMultipleAddressableRegUnits(const TargetRegisterInfo *TRI,
----------------
jayfoad wrote:
This seems like something that could be precomputed by tablegen like isInAllocatableClass, so we would have a simple table lookup instead of all these loops.
https://github.com/llvm/llvm-project/pull/116963
More information about the llvm-commits
mailing list