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
Handle preExp and varDecls for crefs with subs. #923
Merged
lochel
merged 4 commits into
OpenModelica:master
from
mahge:fix_prev_exp_var_decls_for_cref_subs
Jun 3, 2020
Merged
Handle preExp and varDecls for crefs with subs. #923
lochel
merged 4 commits into
OpenModelica:master
from
mahge:fix_prev_exp_var_decls_for_cref_subs
Jun 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline. - If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it.
Add a reference to ticket:5994 in a commit message |
@sjoelund Will do. This is not over yet. I am trying to see if these changes (which are mostly renaming and parameter additions) broke anything. Just to to simplify things. The actual fix comes on the next commit/s |
- This fixes ticket:5994. - The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created. - Split up the function to take different paths for normal and parallel functions.
mahge
force-pushed
the
fix_prev_exp_var_decls_for_cref_subs
branch
from
June 3, 2020 08:56
dc70d57
to
b93569f
Compare
lochel
approved these changes
Jun 3, 2020
adrpo
pushed a commit
to adrpo/OpenModelica
that referenced
this pull request
Jun 17, 2020
* Handle preExp and varDecls for crefs with subs. - We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline. - If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it. * Fix wrong ordering of buffer arguments. * Avoid unnecessary code generation. - This fixes ticket:5994. - The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created. - Split up the function to take different paths for normal and parallel functions. * Add a test case for Ticket:5994.
adrpo
pushed a commit
that referenced
this pull request
Jun 17, 2020
* Handle preExp and varDecls for crefs with subs. - We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline. - If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it. * Fix wrong ordering of buffer arguments. * Avoid unnecessary code generation. - This fixes ticket:5994. - The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created. - Split up the function to take different paths for normal and parallel functions. * Add a test case for Ticket:5994.
adrpo
pushed a commit
to adrpo/OpenModelica
that referenced
this pull request
Sep 28, 2020
* Handle preExp and varDecls for crefs with subs. - We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline. - If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it. * Fix wrong ordering of buffer arguments. * Avoid unnecessary code generation. - This fixes ticket:5994. - The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created. - Split up the function to take different paths for normal and parallel functions. * Add a test case for Ticket:5994.
adrpo
pushed a commit
that referenced
this pull request
Sep 28, 2020
* Handle preExp and varDecls for crefs with subs. - We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline. - If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it. * Fix wrong ordering of buffer arguments. * Avoid unnecessary code generation. - This fixes ticket:5994. - The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created. - Split up the function to take different paths for normal and parallel functions. * Add a test case for Ticket:5994.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes ticket:5994.
We used to throw away any extra expressions and variable declarations
needed for crefs with (complicated) subscripts, i.e., if it has some complicated
subscript that can not be generated inline.
If you are sure you have a path (a cref with no subs) then you can use
contextCrefNoPrevExp
(e.g. variable names are just paths. They are justrepresented as cref). Otherwise
contextCref
now needs apreExp
andvarDecls
buffer passed to it.
Avoid unnecessary code generation.
The path we took for crefs with subscripts in function context
used to create unnecessary temporaries and expressions which we did
not notice because they were were thrown away after being created.
Split up the LHS cref generation template function to take different paths for
normal and parallel functions.
Add a test case for Ticket:5994.
Remaining issues
like buffers and correct context. This needs to be updated.
for recent changes.
contextCref or an appropriate function.