From 49d70380a6a95e4039f6b5e5ccce09671d5b4796 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sun, 2 Aug 2026 02:56:39 +0800 Subject: [CodeGen] Add machine metadata graphs Model ordered function-local metadata tuples with explicit embedded-IR and MachineFunction reference scopes. Preserve slot zero, distinct nodes, forward references, and cyclic graphs while verifying function-local closure and cloning the graph deterministically. --- backend/lib/CodeGen/MachineVerifier.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backend/lib/CodeGen/MachineVerifier.cpp') diff --git a/backend/lib/CodeGen/MachineVerifier.cpp b/backend/lib/CodeGen/MachineVerifier.cpp index 2fbbd38..2a29343 100644 --- a/backend/lib/CodeGen/MachineVerifier.cpp +++ b/backend/lib/CodeGen/MachineVerifier.cpp @@ -37,6 +37,9 @@ public: auto AttributeResult = Function.attributes().verify(); if (!AttributeResult) return failWith("function attributes", AttributeResult.error()); + auto MetadataResult = Function.metadata().verify(); + if (!MetadataResult) + return failWith("machine metadata", MetadataResult.error()); if (Function.targetState().hasValue()) { auto TargetStateResult = Function.targetState().verify(); if (!TargetStateResult) -- cgit v1.2.3