[llvm] [AArch64][llvm] Rewrite the TLBI multiclass to be clearer (NFC) (PR #186451)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 06:55:25 PDT 2026


================
@@ -444,13 +447,15 @@ struct SysAliasReg : SysAlias {
 };
 
 struct SysAliasOptionalReg : SysAlias {
-  bool NeedsReg;
-  bool OptionalReg;
-  constexpr SysAliasOptionalReg(const char *N, uint16_t E, bool R, bool O)
-      : SysAlias(N, E), NeedsReg(R), OptionalReg(O) {}
-  constexpr SysAliasOptionalReg(const char *N, uint16_t E, bool R, bool O,
+  SysAliasRegUse RegUse;
+  constexpr SysAliasOptionalReg(const char *N, uint16_t E, SysAliasRegUse R)
+      : SysAlias(N, E), RegUse(R) {}
+  constexpr SysAliasOptionalReg(const char *N, uint16_t E, SysAliasRegUse R,
                                 FeatureBitset F)
-      : SysAlias(N, E, F), NeedsReg(R), OptionalReg(O) {}
+      : SysAlias(N, E, F), RegUse(R) {}
+
+  constexpr bool needsReg() const { return RegUse == REG_REQUIRED; }
----------------
Lukacma wrote:

I am on the fence whether these should exist. You can do the check directly. But if you think this is  better than I am fine with keeping it.

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


More information about the llvm-commits mailing list