Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle preExp and varDecls for crefs with subs. (#923)
* 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.
- Loading branch information