Skip to content

[Sim] Set the GetFileOp operation to procedural only#10474

Merged
fzi-hielscher merged 2 commits into
llvm:mainfrom
nanjo712:refactor/make-getfileOp-proceduralOp
May 15, 2026
Merged

[Sim] Set the GetFileOp operation to procedural only#10474
fzi-hielscher merged 2 commits into
llvm:mainfrom
nanjo712:refactor/make-getfileOp-proceduralOp

Conversation

@nanjo712
Copy link
Copy Markdown
Contributor

Set the GetFileOp operation to procedural only.

@nanjo712 nanjo712 force-pushed the refactor/make-getfileOp-proceduralOp branch 2 times, most recently from 87ca790 to 8d6359e Compare May 15, 2026 04:36
@nanjo712 nanjo712 marked this pull request as draft May 15, 2026 04:55
@nanjo712 nanjo712 force-pushed the refactor/make-getfileOp-proceduralOp branch from 8d6359e to 169cbbd Compare May 15, 2026 05:04
@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 15, 2026

Results of circt-tests run for 169cbbd compared to results for 2cdd246: no change to test results.

@nanjo712 nanjo712 marked this pull request as ready for review May 15, 2026 08:05
Comment on lines +758 to +762
auto *procRoot =
getFileOp->getParentWithTrait<mlir::OpTrait::IsIsolatedFromAbove>();
if (procRoot)
dceRoots.insert(procRoot);
getFileOp.erase();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could perhaps replace it with SparseOpSCC like #10469 . However, this isn't really relevant to this PR, so I prefer to keep the cleanup logic the same as the handling of printOp.

%file = sim.get_file %fileName

sim.print %msg on %clk if %cond to %file
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the GetFileOp is marked as ProceduralOp, I think these test is no longer needed. We may need to clean the logic about GetFileOp in ProceduralizeSim in the follow-up PR.

Copy link
Copy Markdown
Contributor

@fzi-hielscher fzi-hielscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM.

@fzi-hielscher fzi-hielscher merged commit e34177a into llvm:main May 15, 2026
6 checks passed
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.

2 participants