Skip to content

[OM] Simplify evaluator placeholder handling, NFCI#10555

Open
uenoku wants to merge 5 commits into
llvm:mainfrom
uenoku:dev/hidetou/om-evaluator-cleanup-2
Open

[OM] Simplify evaluator placeholder handling, NFCI#10555
uenoku wants to merge 5 commits into
llvm:mainfrom
uenoku:dev/hidetou/om-evaluator-cleanup-2

Conversation

@uenoku
Copy link
Copy Markdown
Member

@uenoku uenoku commented May 28, 2026

This is a first commit to fully migrate to new evaluation flow, NFCI.

Remove ReferenceValue because there is no ObjectFieldOp in new evaluation flow. Hence we can drop the fully-evaluated counter, worklist. This also removes assertion evaluation since it's checked in the prepass.

During evaluation, only ObjectValue placeholders may remain partially evaluated while fields are being connected.

In following PR partial evaluation flag will be also removed.

Assisted-by: claude code: sonnet 4.6

@uenoku uenoku force-pushed the dev/hidetou/om-evaluator-cleanup-2 branch from ac9aa35 to 10cb658 Compare May 28, 2026 07:05
@uenoku uenoku changed the title [OM] Simplify evaluator placeholder handling [OM] Simplify evaluator placeholder handling, NFCI May 28, 2026
@uenoku uenoku force-pushed the dev/hidetou/om-evaluator-cleanup-2 branch 2 times, most recently from 4223993 to 91f0627 Compare May 28, 2026 07:27
Remove ReferenceValue indirection and evaluator finalization from the OM evaluator. Object-valued cycles are now represented by preallocated ObjectValue placeholders that are filled once fields are evaluated, so there is no post-evaluation reference-stripping pass.

Drop the fully-evaluated counter, worklist, pending-assert flow, parameter-keyed evaluator cache, and recursive ActualParameters threading that existed to resolve ReferenceValue updates. The current instantiation cache is keyed by SSA value, cleared per instantiation, and class parameters are bound once before evaluating the class body.

Centralize partial-evaluation checks and use evaluateOp overloads for operation dispatch. Remove the now-obsolete C API and Python bindings for evaluator reference values and update the evaluator tests for the simplified flow.
@uenoku uenoku force-pushed the dev/hidetou/om-evaluator-cleanup-2 branch from 91f0627 to baf9440 Compare May 28, 2026 07:30
@circt-bot
Copy link
Copy Markdown

circt-bot Bot commented May 28, 2026

Results of circt-tests run for 91f083b compared to results for 6360de5: no change to test results.

@uenoku uenoku requested review from mikeurbach and seldridge May 30, 2026 02:35
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