diff options
author | Peter Klausler <pklausler@nvidia.com> | 2022-04-22 14:16:16 -0700 |
---|---|---|
committer | Peter Klausler <pklausler@nvidia.com> | 2022-04-25 09:25:09 -0700 |
commit | 149d3e4365325fdb9b79a4d0e3f88a2c84e0baaf (patch) | |
tree | 5a75a2b730ae802d3de963e4c4a5bdd5ac4ab623 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | ffe03ff75c26d598ce71d19c5eacf528f63a670b (diff) | |
download | llvm-149d3e4365325fdb9b79a4d0e3f88a2c84e0baaf.zip llvm-149d3e4365325fdb9b79a4d0e3f88a2c84e0baaf.tar.gz llvm-149d3e4365325fdb9b79a4d0e3f88a2c84e0baaf.tar.bz2 |
[flang] Disambiguate F(X)=Y case where F is a function returning a pointer
F(X)=Y may be initially parsed as a statement function definition; an
existing pass will detect statement functions that should be rewritten
into assignment statemets with array element references as their
left-hand side variables. However, F() may also be a reference to a
function that returns a data pointer, and f18 did not handle this
case correctly.
The right fix is to rewrite the parse tree for F(X)=Y into an assignment
to a function reference result. The cases that are actually assignments
to array elements -- including all of the cases previously handled --
will have their left-hand sides converted to array element references
later by another existing rewriting step.
Differential Revision: https://reviews.llvm.org/D124299
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions