Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@maerhart
Copy link
Member

This adds some registers to later test passes such as register alloction, assembly emission, correct behavior of the elaboration pass in presence of registers, etc.

@maerhart maerhart added the RTG Involving the `rtg` dialect label Nov 29, 2024
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +47 to +58
Virtual registers will be assigned a concrete register when running register
allocation.
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably doesn't make sense for a test dialect, but in practice, would you have virtual registers as a separate op that cannot be CSEd, and actual ISA register as something "pure" or maybe even "constant-like"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! Having concrete registers CSE would be very nice. Having separate ops for concrete and virtual registers complicates register allocation a bit but makes elaboration easier. Let me think about that a bit more.


// Flat allocation of unique IDs to all registers. The actual ID value does not
// matter.
def RegisterAttr : I32EnumAttr<
Copy link
Member Author

Choose a reason for hiding this comment

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

I think ideally this attribute should be of IntegerRegisterType, not I32. It's not a big deal for now though.

@maerhart maerhart force-pushed the maerhart-rtg-getsizeops-elaboration branch from 31e652b to 81f191f Compare December 9, 2024 15:18
Base automatically changed from maerhart-rtg-getsizeops-elaboration to main December 9, 2024 15:33
This adds some registers to later test passes such as register alloction, assembly emission, correct behavior of the elaboration pass in presence of registers, etc.

Co-authored-by: Andrew Lenharth <[email protected]>
@maerhart maerhart force-pushed the maerhart-rtgtest-registers branch from 49fccfd to d868ec9 Compare December 9, 2024 15:59
@maerhart
Copy link
Member Author

maerhart commented Jan 6, 2025

I'll merge this as-is for now and will follow up with another PR to fix the above two points.

@maerhart maerhart merged commit 90fac44 into main Jan 6, 2025
4 checks passed
@maerhart maerhart deleted the maerhart-rtgtest-registers branch January 6, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RTG Involving the `rtg` dialect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants