This is an archive of the discontinued LLVM Phabricator instance.

[flang] Implement more transformational intrinsic functions in runtime
ClosedPublic

Authored by klausler on May 20 2021, 10:40 AM.

Details

Summary

Define APIs, naively implement, and add basic sanity unit tests for
the transformational intrinsic functions CSHIFT, EOSHIFT, PACK,
SPREAD, TRANSPOSE, and UNPACK. These are the remaining transformational
intrinsic functions that rearrange data without regard to type
(except for default boundary values in EOSHIFT); RESHAPE was already
in place as a stress test for the runtime's descriptor handling
facilities.

Code is in place to create copies of allocatable/automatic
components when transforming arrays of derived type, but it won't
do anything until we have derived type information being passed to the
runtime from the frontend.

Diff Detail

Event Timeline

klausler created this revision.May 20 2021, 10:40 AM
klausler requested review of this revision.May 20 2021, 10:40 AM
klausler updated this revision to Diff 346826.May 20 2021, 12:35 PM

Fix problems in PACK noticed by running tests in more environments.

PeteSteinfeld accepted this revision.May 20 2021, 1:20 PM

All builds, tests, and looks good.

flang/runtime/transformational.cpp
13–17

Should we ask Mark to attempt to clarify this with the on-going standards work?

This revision is now accepted and ready to land.May 20 2021, 1:20 PM
This revision was landed with ongoing or failed builds.May 20 2021, 1:28 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2021, 1:28 PM