This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add external name interop pass
ClosedPublic

Authored by clementval on Oct 4 2021, 7:24 AM.

Details

Summary

Add the external name conversion pass needed for compiler
interoperability. This pass convert the Flang internal symbol name to
the common gfortran convention.

Clean up old passes without implementation in the Passes.ts file so
the project and fir-opt can build correctly.

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

Diff Detail

Event Timeline

clementval created this revision.Oct 4 2021, 7:24 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: mgorny. · View Herald Transcript
clementval requested review of this revision.Oct 4 2021, 7:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2021, 7:24 AM
mehdi_amini added inline comments.Oct 4 2021, 12:53 PM
flang/include/flang/Optimizer/Transforms/Passes.td
27

Can you clarify why are these all needed?

I would think that no dependent dialect is needed at all here.
(do you have a failing test if you remove them?)

40

This method still exists in the header.
(same for the others)

clementval added inline comments.Oct 4 2021, 1:16 PM
flang/include/flang/Optimizer/Transforms/Passes.td
27

I guess this was a mistake on our side and we were thinking we needed to add "allowed" dialects here but it indeed not needed and I'll update the patch to remove these extra dependencies.

40

Right I forgot to clean the header as well.

clementval updated this revision to Diff 377021.Oct 4 2021, 1:19 PM

Cleanup header and remove useless dialects dependencies.

schweitz accepted this revision.Oct 5 2021, 8:57 AM
This revision is now accepted and ready to land.Oct 5 2021, 8:57 AM
clementval marked 2 inline comments as done.Oct 5 2021, 11:32 AM
This revision was landed with ongoing or failed builds.Oct 5 2021, 11:34 AM
This revision was automatically updated to reflect the committed changes.