[llvm] [MC] Use StringTable to reduce dynamic relocations (PR #144202)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 11:20:39 PDT 2025
================
@@ -1495,6 +1501,8 @@ void SubtargetEmitter::emitSchedClassTables(SchedClassTables &SchedTables,
}
OS << "}; // " << Proc.ModelName << "SchedClasses\n";
}
+
+ StrTab.EmitStringTableDef(OS, Target + "SchedClassNames");
----------------
rnk wrote:
I didn't want the tablegen output to depend on the assertion mode. For most common builds, this doesn't matter, because tablgen is built using the host configuration, but there are some more advanced build configurations where tablegen is separate, and I wouldn't want to have to figure out how to plumb that configuration option through to trigger a tablegen re-run.
My intention is that we just rely on DCE, since it's trivially dead in the TU. I'm not getting a warning locally in NDEBUG builds, but I'm not sure why, because godbolt code samples show that we should warn in cases like this:
https://godbolt.org/z/jqq8rcz58
That investigation will continue.
https://github.com/llvm/llvm-project/pull/144202
More information about the llvm-commits
mailing list