This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower intrinsics to HLFIR part 1
ClosedPublic

Authored by jeanPerier on Dec 8 2022, 1:48 AM.

Details

Summary

This patch adds support for lowering intrinsics that have no dynamic
optionality aspects to handle and that requires argument to be lowered
to value, addr, or box.

It uses the current intrinsic lowering framework that can be re-used in
HLFIR to start with. HLFIR operations for charater/transformational
intrinsics will be added as needed from an optimization point of view.
The current approach will still create temporary variables for their
value directly in lowering.

Later patch will still need to add:

  • support for dynamically optional arguments
  • inquires
  • "moving" the in memory computation of character and transformational

intrinsics to hlfir.expr. This is not needed from a semantic point of
view, but will help optimizing and will probably be required inside
hlfir.elemental returning characters so that the returned element
type is an hlfir.expr and match the result type of later hlfir.apply.

Diff Detail

Event Timeline

jeanPerier created this revision.Dec 8 2022, 1:48 AM
Herald added a project: Restricted Project. · View Herald Transcript
jeanPerier requested review of this revision.Dec 8 2022, 1:48 AM
This revision is now accepted and ready to land.Dec 8 2022, 8:18 AM
This revision was automatically updated to reflect the committed changes.