-
Notifications
You must be signed in to change notification settings - Fork 305
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
[RTGTest] Add some registers #7924
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Virtual registers will be assigned a concrete register when running register | ||
allocation. |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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< |
There was a problem hiding this comment.
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.
31e652b
to
81f191f
Compare
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]>
49fccfd
to
d868ec9
Compare
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.