[llvm] [MCP] Use MCRegUnit as the key type of CopyTracker::Copies map. NFC. (PR #98277)

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 23:59:24 PDT 2024


https://github.com/bzEq created https://github.com/llvm/llvm-project/pull/98277

`CopyTracker` is indeed tracking at RegUnit level, not MCRegister.

>From 3b607c0fb584b5bfd53c3b2822157b7521b30d80 Mon Sep 17 00:00:00 2001
From: Kai Luo <lkail at cn.ibm.com>
Date: Wed, 10 Jul 2024 14:52:18 +0800
Subject: [PATCH] [MCP] Use MCRegUnit as the key type of CopyTracker::Copies
 map. NFC.

---
 llvm/lib/CodeGen/MachineCopyPropagation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
index bdc17e99d1fb0..6adec4adf6c2d 100644
--- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp
+++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
@@ -112,7 +112,7 @@ class CopyTracker {
     bool Avail;
   };
 
-  DenseMap<MCRegister, CopyInfo> Copies;
+  DenseMap<MCRegUnit, CopyInfo> Copies;
 
 public:
   /// Mark all of the given registers and their subregisters as unavailable for



More information about the llvm-commits mailing list