This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add fir derived type runtime builder
ClosedPublic

Authored by clementval on Nov 23 2021, 1:35 PM.

Details

Summary

This patch adds the builder to generate derived type runtime API calls.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Peter Klausler <pklausler@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Nov 23 2021, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 1:35 PM
clementval requested review of this revision.Nov 23 2021, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 1:35 PM

Rebase on top of D114557

rovka added inline comments.Dec 1 2021, 7:24 PM
flang/lib/Optimizer/Builder/Runtime/Derived.cpp
26

This doesn't seem to match the prototype from the runtime

34

This doesn't match the runtime prototype for Destroy (it needs a bool too).
Also, we probably need one of these for Finalize as well?

42

Is this really needed? We already have one in https://reviews.llvm.org/D114475. Maybe Assign was moved from derived.h to assign.h and this wasn't updated?

clementval marked an inline comment as done.

Address review comments

clementval added inline comments.Dec 3 2021, 12:33 AM
flang/lib/Optimizer/Builder/Runtime/Derived.cpp
26

It matches the runtime api file flang/include/flang/Runtime/derived-api.h.

34

It matches the runtime api file flang/include/flang/Runtime/derived-api.h. It will probably have some update for F20xx

42

Removed

rovka accepted this revision.Dec 3 2021, 4:59 AM

LGTM, thanks.

flang/lib/Optimizer/Builder/Runtime/Derived.cpp
26

Oh, oops, I didn't even notice there was no RTNAME there.

This revision is now accepted and ready to land.Dec 3 2021, 4:59 AM
This revision was landed with ongoing or failed builds.Dec 3 2021, 5:52 AM
This revision was automatically updated to reflect the committed changes.