Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SemIR fidelity when representing rewrite semantics #3833

Merged
merged 10 commits into from
May 23, 2024

Conversation

chandlerc
Copy link
Contributor

@chandlerc chandlerc commented Mar 29, 2024

The toolchain's Semantic IR should start off modeling the full,
complex, and rich library-based and generic extension point semantics of Carbon
without eliding any layers or rewrites for compile time efficiency. We shouldn't
front-load elision or optimization when implementing the designs.

Once we have a full-fidelity implementation, we should work to build an
efficient elision, short-circuit, or common case simplification into the design
itself sufficient to make the SemIR model efficient. Only if we cannot find a
reasonable approach for that should we diverge the SemIR model to optimize its
efficiency, and we should preserve full fidelity in an optional mode.

@chandlerc chandlerc added proposal A proposal proposal draft Proposal in draft, not ready for review labels Mar 29, 2024
@chandlerc chandlerc force-pushed the semir-rewrite-fidelity branch 2 times, most recently from 94a605c to 96f3fcb Compare March 29, 2024 07:27
@chandlerc chandlerc marked this pull request as ready for review March 29, 2024 07:28
@github-actions github-actions bot added proposal rfc Proposal with request-for-comment sent out and removed proposal draft Proposal in draft, not ready for review labels Mar 29, 2024
proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Outdated Show resolved Hide resolved
testing/file_test/autoupdate.cpp Outdated Show resolved Hide resolved
proposals/p3833.md Show resolved Hide resolved
@chandlerc
Copy link
Contributor Author

(the brief diff issues should be fixed now, sorry for that)

proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Show resolved Hide resolved
Copy link
Contributor Author

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Thanks for comments, most addressed, and one follow-up question inline!

proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Outdated Show resolved Hide resolved
proposals/p3833.md Show resolved Hide resolved
chandlerc and others added 6 commits May 8, 2024 19:02
The toolchain's [Semantic IR][semir] should start off modeling the full,
complex, and rich library-based and generic extension point semantics of Carbon
without eliding any layers or rewrites for compile time efficiency. We shouldn't
front-load elision or optimization when implementing the designs.

Once we have a full-fidelity implementation, we should work to build an
efficient elision, short-circuit, or common case simplification into the design
itself sufficient to make the SemIR model efficient. Only if we cannot find a
reasonable approach for that should we diverge the SemIR model to optimize its
efficiency, and we should preserve full fidelity in an optional mode.

[semir]:
    https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw#heading=h.503m6lfcnmui
Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com>
@chandlerc
Copy link
Contributor Author

(Fixed weird mis-merge, sorry about that)

Copy link
Contributor Author

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

PTAL, I think the comments are addressed now?

@chandlerc
Copy link
Contributor Author

Ping? It's been a while since update...

Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

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

Looks good, let's move forward with this. Apologies for the delay.

proposals/p3833.md Outdated Show resolved Hide resolved
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
proposals/p3833.md Outdated Show resolved Hide resolved
Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
@chandlerc chandlerc added this pull request to the merge queue May 23, 2024
Merged via the queue into carbon-language:trunk with commit 31060ca May 23, 2024
7 checks passed
@chandlerc chandlerc deleted the semir-rewrite-fidelity branch May 23, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal rfc Proposal with request-for-comment sent out proposal A proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants