-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[acc][flang] Checking scalar like variables when there's storage operand to fir.declare #163439
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
Conversation
Test? |
@clementval yes, adding rn |
Thanks! |
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. Wait for @razvanlupusoru if he has any comment on this.
// to the declared memref. | ||
if (auto storage = op.getStorage()) | ||
return storage; | ||
return op.getMemref(); |
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 is not desirable because in FIR, having access to the fir.declare as the "base reference" allows us to get all of the Fortran properties. I would suggest returning varPtr
instead.
✅ With the latest revision this PR passed the C/C++ code formatter. |
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.
Thank you.
currently this variable
is categorized as a scalar type when it really should be an aggregate type, because it is part of !fir.ref<!fir.array<4xi8>>
This MR adds a classification to capture the storage operand in fir.declare.