diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 18:17:33 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-01 18:17:33 +0800 |
| commit | e0c77d80585428818c32886eb8c26755ea8ed159 (patch) | |
| tree | f1d79404cb767c91b9aed3ad1a7709a628b3860f /backend/lib/CodeGen/MachineFunctionCloner.cpp | |
| parent | 6e09614afd2a589690d107b41308f6fe6614c266 (diff) | |
| download | rcc-project-e0c77d80585428818c32886eb8c26755ea8ed159.tar.gz rcc-project-e0c77d80585428818c32886eb8c26755ea8ed159.tar.xz | |
[CodeGen] Track debug instruction identities
Add monotonic MIR debug instruction numbers and structured value substitutions. Verify live number uniqueness, meta-instruction exclusion, substitution graph integrity, and target subregister references while preserving debug identities during cloning.
Diffstat (limited to 'backend/lib/CodeGen/MachineFunctionCloner.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MachineFunctionCloner.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/lib/CodeGen/MachineFunctionCloner.cpp b/backend/lib/CodeGen/MachineFunctionCloner.cpp index aae74ff..2f99341 100644 --- a/backend/lib/CodeGen/MachineFunctionCloner.cpp +++ b/backend/lib/CodeGen/MachineFunctionCloner.cpp @@ -388,6 +388,12 @@ cloneMemOperand(const MachineMemOperand &SourceOperand, CloneState &State) { } if (SourceInstruction->origin()) NewInstruction->setOrigin(*SourceInstruction->origin()); + if (SourceInstruction->debugInstrNumber() != 0) { + auto DebugNumberResult = + NewInstruction->setDebugInstrNumber(SourceInstruction->debugInstrNumber()); + if (!DebugNumberResult) + return std::unexpected(DebugNumberResult.error()); + } auto AppendResult = DestinationBlock->appendInstruction(*NewInstruction); if (!AppendResult) |
