Skip to content

Move module/discovery/import driver out-of-line into MLIRGenModule.cpp (review doc 1)#219

Merged
ASDAlexander77 merged 1 commit into
mainfrom
refactor/mlirgen-tu-split-module
Jul 13, 2026
Merged

Move module/discovery/import driver out-of-line into MLIRGenModule.cpp (review doc 1)#219
ASDAlexander77 merged 1 commit into
mainfrom
refactor/mlirgen-tu-split-module

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Third mechanical slice of the §1 TU split from docs/MLIRGen-refactoring-review.md (follows #217, #218).

What

  • MLIRGenModule.cpp (new): the contiguous module-driver family — report, source loading (loadMainSourceFile/loadSourceFile/loadSourceBuf), mlirGenSourceFile, codegen init, dependency-declaration emission, mlirDiscoverAllDependencies, mlirCodeGenModule, namespace registration/entry, mlirGenInclude, and shared-lib import (24 methods, ~930 lines) — defined out-of-line.
  • MLIRGenImpl.h shrinks from 22,096 to 21,225 lines.
  • Method-level #ifdef GENERATE_IMPORT_INFO_USING_D_TS_FILE guards are preserved around both the declarations in the header and the definitions in the new TU, so conditional compilation is unchanged.

Same mechanical recipe as #217/#218: bodies byte-identical, MLIRGenImpl:: qualification added, default arguments stay on declarations only.

Verification

  • Debug build clean.
  • MLIRGenTests 12/12.
  • Full ctest suite: 681/681 (339 JIT + 342 AOT).

🤖 Generated with Claude Code

…p (review doc 1)

Third slice of the TU split: the module driver family (report,
loadMainSourceFile/loadSourceFile/loadSourceBuf, mlirGenSourceFile,
mlirDiscoverAllDependencies, mlirCodeGenModule, namespace registration,
include loading, shared-lib import; 24 methods, ~930 lines) moves from
inline bodies in MLIRGenImpl.h to MLIRGenModule.cpp.

Method-level #ifdef guards (GENERATE_IMPORT_INFO_USING_D_TS_FILE) are
kept around both the declarations and the moved definitions.

Verified: MLIRGenTests 12/12, full ctest 681/681 (JIT + AOT).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ASDAlexander77 ASDAlexander77 merged commit af59ec2 into main Jul 13, 2026
2 checks passed
@ASDAlexander77 ASDAlexander77 deleted the refactor/mlirgen-tu-split-module branch July 13, 2026 00:22
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