-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allow caller of classify_argument to specify that the first arg is sret #272
base: master
Are you sure you want to change the base?
Conversation
`classify_arguments` uses the function type so it can't do that determination on it's own.
Also sret as an attribute is not always set even if Julia makes an sret. E.g. the code snippet in EnzymeAD/Enzyme.jl#154 will result in the first arg as sret, but without the attribute. |
|
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
=======================================
Coverage 87.12% 87.12%
=======================================
Files 22 22
Lines 2112 2112
=======================================
Hits 1840 1840
Misses 272 272
Continue to review full report at Codecov.
|
We could pass it the function instead, but I guess that first need a fix in Julia to set the |
Only relevant for code calling the function in this PR, I remember @vtjnash said there was a compile-time performance reason why sret wasn't set and it didn't matter for correctness so I'm not sure there will be a proper Julia fix so much as a "derive it in the same way". |
Can we easily derive it? Otherwise that'd be a great thing for |
There are also sometimes 2 sret arguments. In codegen we call |
classify_arguments
uses the function type so it can't do thatdetermination on it's own.
cc: @wsmoses