This is an archive of the discontinued LLVM Phabricator instance.

[flang] Upstream runtime changes for inquiry intrinsics
ClosedPublic

Authored by PeteSteinfeld on Feb 9 2022, 11:17 AM.

Details

Summary

This change adds runtime routines and tests for LBOUND when passed a DIM argument, SIZE, and UBOUND when not passed a DIM argument.

Associated changes for lowering have already been merged into fir-dev.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Feb 9 2022, 11:17 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: mgorny. · View Herald Transcript
PeteSteinfeld requested review of this revision.Feb 9 2022, 11:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2022, 11:17 AM
klausler added inline comments.Feb 9 2022, 11:56 AM
flang/include/flang/Runtime/inquiry.h
27

"array" would be a more descriptive name for the second argument than "descriptor".

flang/runtime/inquiry.cpp
60

Since the function returns std::int64_t, that should also be the type of "result".

klausler accepted this revision.Feb 9 2022, 11:56 AM
This revision is now accepted and ready to land.Feb 9 2022, 11:56 AM
PeteSteinfeld added inline comments.Feb 9 2022, 12:41 PM
flang/include/flang/Runtime/inquiry.h
27

Thanks. I'll change it.

flang/runtime/inquiry.cpp
60

Good catch. I'll change it.

This revision was landed with ongoing or failed builds.Feb 9 2022, 12:43 PM
This revision was automatically updated to reflect the committed changes.