refactor(recompiler): remove dead translation and emitter stubs #14708

Merged
akkadbakkad89 merged 1 commit from upstream-pr/14708 into main 2026-11-12 01:29:49 +00:00
akkadbakkad89 commented 2026-11-01 17:13:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-11-01T17:13:56Z.


What

Removes 23 unconditionally throwing legacy entry points the progress scanner counts as unsupported: the free Translate*Instruction functions (Scalar/Vector/Float/Integer/Compare/Convert/ControlFlow/Attribute/Dispatch/Memory, each with IrBuilder and TranslationContext overloads), the TranslationContext::translateInstruction/DispatchInstruction member overloads, and the SpirvModule-based EmitAluValue/EmitControlFlow overloads. Every removed symbol was verified caller-free — live dispatch goes through TranslationContext and SpirvValueEmitContext. Also drops the 11 dead headers and their includes. Unsupported-throw count goes 148 to 125 (Translation 47 to 27, SpirvBackend 16 to 13).

Tested

Windows 11, MinGW: cmake --build build --target shader_recompiler_agc_driver — all 284 objects compile and libshader_recompiler_agc_driver.a links clean. tools/shader_scan.py reports 125 throw sites. agc_driver_graphics_tests passes on main and on this branch under ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; neither log contains was not found but was requested and the change adds no VUID- lines.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3070, driver 617.42, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5109672329 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14708). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-11-01T17:13:56Z. --- ### What Removes 23 unconditionally throwing legacy entry points the progress scanner counts as unsupported: the free `Translate*Instruction` functions (`Scalar`/`Vector`/`Float`/`Integer`/`Compare`/`Convert`/`ControlFlow`/`Attribute`/`Dispatch`/`Memory`, each with `IrBuilder` and `TranslationContext` overloads), the `TranslationContext::translateInstruction`/`DispatchInstruction` member overloads, and the `SpirvModule`-based `EmitAluValue`/`EmitControlFlow` overloads. Every removed symbol was verified caller-free — live dispatch goes through `TranslationContext` and `SpirvValueEmitContext`. Also drops the 11 dead headers and their includes. Unsupported-throw count goes 148 to 125 (Translation 47 to 27, SpirvBackend 16 to 13). ### Tested Windows 11, MinGW: `cmake --build build --target shader_recompiler_agc_driver` — all 284 objects compile and `libshader_recompiler_agc_driver.a` links clean. `tools/shader_scan.py` reports 125 throw sites. `agc_driver_graphics_tests` passes on `main` and on this branch under `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`; neither log contains `was not found but was requested` and the change adds no `VUID-` lines. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 3070, driver 617.42, Windows 11 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-01 17:20:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T17:20:35Z.

Review: COMMENTED


Reviewed — no blocking findings

The deleted overloads and headers have no in-repository callers, and the current context-based translation and emission paths remain intact.

What I ran

Reviewed head 09bba0fc798d4df178e920f753e44936d471013d against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build.

git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...09bba0fc798d4df178e920f753e44936d471013d
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14708
git grep -n -E 'Translate(Scalar|Vector|Float|Integer|Compare|Convert|ControlFlow|Attribute|Dispatch|Memory)Instruction|EmitAluValue|EmitControlFlow|translateInstruction|DispatchInstruction' refs/review/queue/20261101/14708 -- ':!core/shader/recompiler/Translation/include/*' ':!core/shader/recompiler/Translation/src/*' ':!core/shader/recompiler/SpirvBackend/include/*' ':!core/shader/recompiler/SpirvBackend/src/*'

Results

Check Result Note
Diff and conventions passed No whitespace errors; conventions passed.
Merge preview passed Clean against the current base.
Caller and include audit passed No live in-repository references found.
Test-quality helper failed Optional helper is absent from the PR snapshot.
Hosted CI not run Four jobs were queued.
Build and Vulkan tests not run Author reported Windows results; not reproduced here.
Precheck table and raw output
Check Status Note
build_and_compile not applicable Precheck does not build.
diff_check passed Exact base-to-head diff check.
conventions_and_pr_template passed Conventions pass.
changed_export_abi_audit not applicable No PRX exports changed.
python_syntax not applicable No Python implementation changed.
related_python_unit_tests not applicable No applicable tools module changed.
python_test_registration not applicable No Python tests changed.
live_dependency_and_mergeability_check passed Clean stack preview.
build_dependent_cpp_tests not applicable Requires a build.
test_quality_heuristics failed Helper absent from detached snapshot.
negative_controls not applicable No applicable no-build control.
All conventions checks passed.

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14708-09bba0fc798d/head-09bba0fc798d-a42268c7/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Not run: this is a deletion-only refactor, and a meaningful negative control requires compiling and testing the recompiler.

Findings

Blocking

None found in the reviewed diff.

Non-blocking

Approval is deferred while required hosted checks are queued. The precheck's test-quality helper could not run because it is absent from the detached PR snapshot. The author-reported Windows build, Vulkan tests and shader-scan counts were not independently reproduced; tools/shader_scan.py is absent from this workspace.

Sources

Not verified

  • Hosted CI was queued and not independently completed here.
  • The Windows compiler build, Vulkan runtime tests and GPU behavior were only reported by the author.
  • External out-of-tree users of the removed internal headers were not assessed.

To get this to a good state

Let the queued CI checks finish. I will rerun the same no-build checks on any changed head and reassess when CI completes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729322008 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14708#pullrequestreview-5729322008). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T17:20:35Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The deleted overloads and headers have no in-repository callers, and the current context-based translation and emission paths remain intact. ## What I ran Reviewed head `09bba0fc798d4df178e920f753e44936d471013d` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build. ```sh git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...09bba0fc798d4df178e920f753e44936d471013d python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14708 git grep -n -E 'Translate(Scalar|Vector|Float|Integer|Compare|Convert|ControlFlow|Attribute|Dispatch|Memory)Instruction|EmitAluValue|EmitControlFlow|translateInstruction|DispatchInstruction' refs/review/queue/20261101/14708 -- ':!core/shader/recompiler/Translation/include/*' ':!core/shader/recompiler/Translation/src/*' ':!core/shader/recompiler/SpirvBackend/include/*' ':!core/shader/recompiler/SpirvBackend/src/*' ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | No whitespace errors; conventions passed. | | Merge preview | passed | Clean against the current base. | | Caller and include audit | passed | No live in-repository references found. | | Test-quality helper | failed | Optional helper is absent from the PR snapshot. | | Hosted CI | not run | Four jobs were queued. | | Build and Vulkan tests | not run | Author reported Windows results; not reproduced here. | <details><summary>Precheck table and raw output</summary> | Check | Status | Note | |---|---|---| | build_and_compile | not applicable | Precheck does not build. | | diff_check | passed | Exact base-to-head diff check. | | conventions_and_pr_template | passed | Conventions pass. | | changed_export_abi_audit | not applicable | No PRX exports changed. | | python_syntax | not applicable | No Python implementation changed. | | related_python_unit_tests | not applicable | No applicable tools module changed. | | python_test_registration | not applicable | No Python tests changed. | | live_dependency_and_mergeability_check | passed | Clean stack preview. | | build_dependent_cpp_tests | not applicable | Requires a build. | | test_quality_heuristics | failed | Helper absent from detached snapshot. | | negative_controls | not applicable | No applicable no-build control. | ```text All conventions checks passed. /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14708-09bba0fc798d/head-09bba0fc798d-a42268c7/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Negative control Not run: this is a deletion-only refactor, and a meaningful negative control requires compiling and testing the recompiler. ## Findings ### Blocking None found in the reviewed diff. ### Non-blocking Approval is deferred while required hosted checks are queued. The precheck's test-quality helper could not run because it is absent from the detached PR snapshot. The author-reported Windows build, Vulkan tests and shader-scan counts were not independently reproduced; `tools/shader_scan.py` is absent from this workspace. ## Sources - [Current instruction dispatch at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/09bba0fc798d4df178e920f753e44936d471013d/core/shader/recompiler/Translation/src/DispatchInstructions.cpp) - [Active context-based control-flow emission at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/09bba0fc798d4df178e920f753e44936d471013d/core/shader/recompiler/SpirvBackend/src/SpirvFlowEmitter.cpp) - [Retained recompiler source registration at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/09bba0fc798d4df178e920f753e44936d471013d/core/shader/recompiler/CMakeLists.txt) - [Retained SPIR-V emitter call site at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/09bba0fc798d4df178e920f753e44936d471013d/core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp) ## Not verified - Hosted CI was queued and not independently completed here. - The Windows compiler build, Vulkan runtime tests and GPU behavior were only reported by the author. - External out-of-tree users of the removed internal headers were not assessed. ## To get this to a good state Let the queued CI checks finish. I will rerun the same no-build checks on any changed head and reassess when CI completes.
MarcZX10 commented 2026-11-02 11:01:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T11:01:53Z.

Review: APPROVED


Re-checked — same head, approved

The full review found no blocking issue, and the hosted checks that were queued at review time have now completed successfully.

What I ran

Confirmed PR #14708 remains open at head 09bba0fc798d4df178e920f753e44936d471013d, based on f2d874c1fdccf781c0fa5d86619bb5dd8894b958. My full review of this exact head is here. This follow-up checked hosted CI; I did not run a local build or tests.

gh pr checks 14708 --repo boykopovar/AnyPS5

Results

Check Result Note
Hosted relinker jobs passed Linux, Windows, macOS and ASan jobs passed.
Conventions, intake, labels and eligibility passed Completed successfully.
Linux, Windows and specialized test jobs not applicable Skipped by the workflow.
Hosted check output (unedited)
conventions	pass	14s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411472/job/124919121618
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124919121073
intake	pass	4s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411471/job/124919121743
labels	pass	5s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411456/job/124919121716
relinker (macos-latest, clang++)	pass	4m55s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557297
relinker (macos-latest, clang++, x86_64)	pass	5m7s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557276
relinker (ubuntu-latest, g++)	pass	4m30s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557311
relinker (windows-latest, g++)	pass	9m37s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557255
relinker-asan	pass	2m42s	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557218
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557933
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558282
windows	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558569
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558074

Findings

No blocking findings in the full review of this exact head.

Sources

Not verified

I did not run a local build, CTest, or console tests. The Linux, Windows, register-context, and write-watch test jobs were skipped by CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5735551836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14708#pullrequestreview-5735551836). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T11:01:53Z. **Review:** APPROVED --- # Re-checked — same head, approved The full review found no blocking issue, and the hosted checks that were queued at review time have now completed successfully. ## What I ran Confirmed PR #14708 remains open at head `09bba0fc798d4df178e920f753e44936d471013d`, based on `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. My full review of this exact head is [here](https://github.com/boykopovar/AnyPS5/pull/14708#pullrequestreview-5729322008). This follow-up checked hosted CI; I did not run a local build or tests. ```sh gh pr checks 14708 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Hosted relinker jobs | passed | Linux, Windows, macOS and ASan jobs passed. | | Conventions, intake, labels and eligibility | passed | Completed successfully. | | Linux, Windows and specialized test jobs | not applicable | Skipped by the workflow. | <details><summary>Hosted check output (unedited)</summary> ```text conventions pass 14s https://github.com/boykopovar/AnyPS5/actions/runs/41330411472/job/124919121618 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124919121073 intake pass 4s https://github.com/boykopovar/AnyPS5/actions/runs/41330411471/job/124919121743 labels pass 5s https://github.com/boykopovar/AnyPS5/actions/runs/41330411456/job/124919121716 relinker (macos-latest, clang++) pass 4m55s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557297 relinker (macos-latest, clang++, x86_64) pass 5m7s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557276 relinker (ubuntu-latest, g++) pass 4m30s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557311 relinker (windows-latest, g++) pass 9m37s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557255 relinker-asan pass 2m42s https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557218 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926557933 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558282 windows skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558569 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41330411696/job/124926558074 ``` </details> ## Findings No blocking findings in the full review of this exact head. ## Sources - [Full source review and pinned source links](https://github.com/boykopovar/AnyPS5/pull/14708#pullrequestreview-5729322008) ## Not verified I did not run a local build, CTest, or console tests. The Linux, Windows, register-context, and write-watch test jobs were skipped by CI.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!14708
No description provided.