[llvm] [GlobalISel] Change MatchTable entries to 1 byte each (PR #74429)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 20:23:55 PST 2023


================
@@ -39,10 +40,46 @@ std::string getEnumNameForPredicate(const TreePredicateFn &Predicate) {
 std::string getMatchOpcodeForImmPredicate(const TreePredicateFn &Predicate) {
   return "GIM_Check" + Predicate.getImmTypeIdentifier().str() + "ImmPredicate";
 }
+
+// GIMT_Encode2/4/8
+constexpr StringLiteral EncodeMacroName = "GIMT_Encode";
+
 } // namespace
 
 //===- Helpers ------------------------------------------------------------===//
 
+void emitEncodingMacrosDef(raw_ostream &OS) {
----------------
wangpc-pp wrote:

Why not just put these prints in `emitEncodingMacrosDef` and `emitEncodingMacrosUndef` to  `emitMatchTable`? So that we can see the whole structure of generated code.

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


More information about the llvm-commits mailing list