[all-commits] [llvm/llvm-project] 189cb7: [flang] Lower optionals in GET_COMMAND_ARGUMENT an...
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon Apr 11 00:35:20 PDT 2022
Author: jeanPerier <jeanPerier at users.noreply.github.com>
Date: 2022-04-11 (Mon, 11 Apr 2022)
[flang] Lower optionals in GET_COMMAND_ARGUMENT and GET_ENVIRONMENT_VARIABLE
Handle dynamic optional argument in GET_COMMAND_ARGUMENT and GET_ENVIRONMENT_VARIABLE
(previously compiled but caused segfaults). The previous code
handled static presence/absence aspects, but not when an absent dummy optional was
passed to one of the optional intrinsic arguments.
Simplify the runtime call lowering to simply lower the runtime call without
dealing with optionality there. This keeps the optional handling logic in
Note that the new code will generate some extra "if (not null addr )/then/else"
when the actual arguments are always there at runtime. That makes the implementation
a lot simpler/safer, and I think it is OK for now (I do not expect these runtime
function to be called in hot loop nests).
Differential Revision: https://reviews.llvm.org/D123388
More information about the All-commits