[llvm] [LLVM] Change Intrinsic::ID to encode target and intrinsic index (PR #113576)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 15:03:47 PDT 2024
================
@@ -155,13 +158,13 @@ void IntrinsicEmitter::EmitEnumInfo(const CodeGenIntrinsicTable &Ints,
OS << "// Enum values for intrinsics.\n";
bool First = true;
- for (const auto &Int : Ints[*Set]) {
+ for (const auto &Int : Set->getIntrinsics()) {
OS << " " << Int.EnumName;
// Assign a value to the first intrinsic in this target set so that all
// intrinsic ids are distinct.
if (First) {
- OS << " = " << Set->Offset + 1;
+ Intrinsic::PrintIntrinsicIDEncoding(OS, Set->TargetIndex, 0);
----------------
rnk wrote:
LLVM only guarantees API stability within major versions. This means we have to avoid back porting changes that add new intrinsics to release branches, or if we want the ability to do that, we'd need to assign every intrinsic a stable id. I'm not proposing that and I don't want to do it.
https://github.com/llvm/llvm-project/pull/113576
More information about the llvm-commits
mailing list