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

Fix bug where emitc constants wouldn't be directly emitted in subscripts. #411

Merged
merged 10 commits into from
Dec 13, 2024

Conversation

lmendesp-amd
Copy link
Collaborator

No description provided.

@mgehre-amd
Copy link
Collaborator

Beyond the subscript expression, is there any other use of getOrCreateName that could conflict with constantsAsVariables = false?
Is there a way to make getOrCreateName fail/assert, so that future issues could be detected before generating invalid C++ code?

Copy link
Collaborator

@mgehre-amd mgehre-amd 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!

@mgehre-amd mgehre-amd requested a review from josel-amd December 12, 2024 20:49
Copy link
Collaborator

@josel-amd josel-amd left a comment

Choose a reason for hiding this comment

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

The diff to upstream in this file is slowly but steadily starting to get meaningful. At some point we should think about pushing all upstream, but not now. If I recall correctly, this exact same trick - the fake emitter - is used somewhere in the MLIR ASM printer to print all the aliases before printing the actual IR :)

@lmendesp-amd lmendesp-amd merged commit a4494ea into feature/fused-ops Dec 13, 2024
4 checks passed
@lmendesp-amd lmendesp-amd deleted the lmendesp.emitc-constants-in-subscript branch December 13, 2024 10:12
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.

3 participants