Skip to content

refactor: remove legacy PTOPlanMemory pass and --plan-memory-impl option - #1476

Draft
KurrinQu wants to merge 1 commit into
hw-native-sys:masterfrom
KurrinQu:codecheck-b1-planmemory
Draft

refactor: remove legacy PTOPlanMemory pass and --plan-memory-impl option#1476
KurrinQu wants to merge 1 commit into
hw-native-sys:masterfrom
KurrinQu:codecheck-b1-planmemory

Conversation

@KurrinQu

@KurrinQu KurrinQu commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

The legacy vector-only planner (PTOPlanMemory.cpp) is superseded by PTOPlanMemoryModern, which plans every local address space. Delete the legacy pass and its CLI switch so modern is the only implementation:

  • drop PTOPlanMemory.cpp/.h and their CMake entry
  • remove createPlanMemoryPass; point the PlanMemory tablegen def at createPlanMemoryModernPass and anchor GEN_PASS_DEF_PLANMEMORY in PTOPlanMemoryModern.cpp so pto-plan-memory stays registered for pto-test-opt and textual pipelines
  • delete --plan-memory-impl from ptoas; --plan-memory-order-by-size now defaults to true when not set explicitly, matching the modern pipeline default (pass false to reproduce old default-order behavior)
  • update lit tests: drop --plan-memory-impl=modern, remove legacy-only tests, and refresh CHECK expectations (sync emission, address reuse, in-place tile planning) for the modern planner's output

Codecheck remediation batch 1: PTOPlanMemory.cpp is obsolete.

@KurrinQu
KurrinQu force-pushed the codecheck-b1-planmemory branch from 353ba78 to a64df92 Compare September 7, 2026 09:42
The legacy vector-only planner (PTOPlanMemory.cpp) is superseded by
PTOPlanMemoryModern, which plans every local address space. Delete the
legacy pass and its CLI switch so modern is the only implementation:

- drop PTOPlanMemory.cpp/.h and their CMake entry
- remove createPlanMemoryPass; point the PlanMemory tablegen def at
  createPlanMemoryModernPass and anchor GEN_PASS_DEF_PLANMEMORY in
  PTOPlanMemoryModern.cpp so 'pto-plan-memory' stays registered for
  pto-test-opt and textual pipelines
- delete --plan-memory-impl from ptoas; --plan-memory-order-by-size keeps
  its default of false so the default pipeline is byte-identical to the
  previous legacy default path (largest-first ordering stays opt-in;
  TileLib ST found correctness issues with it on tscatter_mask_col)
- update lit tests: drop --plan-memory-impl=modern, remove legacy-only
  tests, and refresh CHECK expectations (sync emission, address reuse,
  in-place tile planning) for the modern planner's output

Codecheck remediation batch 1: PTOPlanMemory.cpp is obsolete.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant