[llvm] [TableGen] Use bitwise operations to access HwMode ID. (PR #88377)

Jason Eckhardt via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 20:43:50 PDT 2024


================
@@ -240,7 +240,23 @@ class MCSubtargetInfo {
     return ProcFeatures;
   }
 
-  virtual unsigned getHwMode() const { return 0; }
+  /// HwMode ID will be stored as bits, allowing users to pull the specific
+  /// HwMode ID (like RegInfo HwMode ID) from the bits as needed. This enables
+  /// users to control multiple features with one hwmode (as previously) or use
+  /// different hwmodes to control different features.
----------------
nvjle wrote:

The language "stored as bits" here is a tad bit strange (either too vague or to general). I think it is better to describe this for what it now is-- a bit vector or bit set.

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


More information about the llvm-commits mailing list