This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add hlfir.as_expr definition
ClosedPublic

Authored by jeanPerier on Dec 7 2022, 2:53 AM.

Details

Summary

hlfir.as_expr allows taking a value from a character, derived type,
or array expressions. This will allow implementing parentheses.

Combining as_expr + hlfir.associate will allow creating a variable copy
into a new temporary variable.

A later patch will add the ability to "move" a variable into an
expression (to give ownership of the variable storage to the expression,
with the commitment that the variable will not be used anymore).

Diff Detail

Event Timeline

jeanPerier created this revision.Dec 7 2022, 2:53 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 7 2022, 2:53 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
jeanPerier requested review of this revision.Dec 7 2022, 2:53 AM
clementval accepted this revision.Dec 7 2022, 2:59 AM

LGTM. Looks like the patch cannot be applied correctly.

This revision is now accepted and ready to land.Dec 7 2022, 2:59 AM

LGTM. Looks like the patch cannot be applied correctly.

Right, I rebased and it did not fix, it looks like there may be a bot issue given the message. I will wait this gets fix before merging:

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.')
INFO    Syncing local, origin and upstream...
INFO    Backing off reset_repository(...) for 9.9s (git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git reset --hard
  stderr: 'fatal: Unable to create '/var/lib/buildkite-agent/builds/llvm-project-fork/.git/index.lock': File exists.

Right, I rebased and it did not fix, it looks like there may be a bot issue given the message. I will wait this gets fix before merging:

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.')
INFO    Syncing local, origin and upstream...
INFO    Backing off reset_repository(...) for 9.9s (git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git reset --hard
  stderr: 'fatal: Unable to create '/var/lib/buildkite-agent/builds/llvm-project-fork/.git/index.lock': File exists.

Yeah looks like pre-commit checks are quite slow since yesterday. It might be related. If you are confident with the patch just land it.

This revision was landed with ongoing or failed builds.Dec 7 2022, 5:44 AM
This revision was automatically updated to reflect the committed changes.