[llvm] AMDGPU/GlobalISelDivergenceLowering: select divergent i1 phis (PR #80003)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 00:42:16 PST 2024


================
@@ -752,6 +752,17 @@ class MachineRegisterInfo {
   Register createVirtualRegister(const TargetRegisterClass *RegClass,
                                  StringRef Name = "");
 
+  /// All avilable attributes a virtual register can have.
+  struct RegisterAttributes {
----------------
Pierre-vh wrote:

I'm not sure I understand why this is needed. It seems like it's just an additional helper to create a new register with a type + RC/RB all in one right?

If so I think it should be contained to `SILowerI1Copies`, a new MachineRegisterInfo helper is not really needed, or at least not one with a new type just for it (+ the name "Attribute" is confusing in this context). I'd just pass two arguments to the function directly.

https://github.com/llvm/llvm-project/pull/80003


More information about the llvm-commits mailing list