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

core: use InsertPoint for block inlining #2311

Merged
merged 3 commits into from
Mar 7, 2024
Merged

Conversation

superlopuh
Copy link
Member

Unifies implementations

@superlopuh superlopuh added the core xDSL core (ir, textual format, ...) label Mar 6, 2024
@superlopuh superlopuh self-assigned this Mar 6, 2024
@@ -147,7 +147,6 @@ def test_inline_block_at_end():
"builtin.module"() ({
%0 = "test.op"() : () -> !test.type<"int">
"test.op"() ({
^0:
Copy link
Member Author

Choose a reason for hiding this comment

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

inlined source blocks are now consistently deleted when inlined into another block

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense to me, that's actually what MLIR does as well!

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 89.56%. Comparing base (a2f84dc) to head (f39e36f).

Files Patch % Lines
xdsl/rewriter.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2311      +/-   ##
==========================================
+ Coverage   89.54%   89.56%   +0.02%     
==========================================
  Files         332      332              
  Lines       39604    39596       -8     
  Branches     5916     5910       -6     
==========================================
+ Hits        35464    35466       +2     
+ Misses       3277     3270       -7     
+ Partials      863      860       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Cool

@@ -147,7 +147,6 @@ def test_inline_block_at_end():
"builtin.module"() ({
%0 = "test.op"() : () -> !test.type<"int">
"test.op"() ({
^0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense to me, that's actually what MLIR does as well!

Base automatically changed from sasha/core/move-insert-point to main March 6, 2024 21:20
Copy link
Collaborator

@AntonLydike AntonLydike left a comment

Choose a reason for hiding this comment

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

Very nice stuff!

@superlopuh superlopuh merged commit 9b5f3f1 into main Mar 7, 2024
10 checks passed
@superlopuh superlopuh deleted the sasha/core/inline-at-loc branch March 7, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants