This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Remove CallBuilder class
ClosedPublic

Authored by jeanPerier on Jan 11 2023, 8:24 AM.

Details

Summary

The methods of CallBuilder do need to belong to a class.
This was made to avoid having to propagate generic lowering context
(converter, symbol mappings, location and StatementContext).

Packaging them together will actually make it harder to share the code
for user and intrinsic elemental lowering (I plan to use C++ CRTP),
and it is also misleading: one could think there is something going
with the class state while lowering the function while there is not
(and there should not be).

Removes the class and turns the methods into static functions.
Add a new CallContext class to solve the argument threading
inconvenience.

This contains no functional changes at all.

Diff Detail

Event Timeline

jeanPerier created this revision.Jan 11 2023, 8:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 8:24 AM
jeanPerier requested review of this revision.Jan 11 2023, 8:24 AM
This revision is now accepted and ready to land.Jan 11 2023, 9:02 AM
PeteSteinfeld accepted this revision.Jan 11 2023, 11:06 AM

Things build and test correctly and look good.

flang/lib/Lower/ConvertCall.cpp
660–694

Should this say "elemental"?

This revision was automatically updated to reflect the committed changes.
jeanPerier marked an inline comment as done.