This is an archive of the discontinued LLVM Phabricator instance.

[flang] add ConvertType to lowering
ClosedPublic

Authored by schweitz on Jun 2 2020, 2:09 PM.

Details

Summary

Converting the Fortran types from the parse tree to their semantic equivalents in the FIR dialect is done in the ConvertType module.

This patch upstreams these conversions into LLVM.

Diff Detail

Event Timeline

schweitz created this revision.Jun 2 2020, 2:09 PM
Herald added a project: Restricted Project. · View Herald Transcript
schweitz updated this revision to Diff 268350.Jun 3 2020, 7:18 PM

Proactively update this patch to conform with LLVM coding conventions.

jeanPerier accepted this revision.Jun 4 2020, 2:55 AM
This revision is now accepted and ready to land.Jun 4 2020, 2:55 AM

A few questions.

flang/lib/Lower/ConvertType.cpp
264

What are the possible parameter types for the type helper function gen?

302

Why is it a TypelessPtr for BOZLiteralConstant?

379

Are the polymorphic or class stars missing?

389

Isn't similar processing required for non-character sequences?
If yes, can a TODO be added?

This revision was automatically updated to reflect the committed changes.
schweitz marked 4 inline comments as done.Jun 5 2020, 11:16 AM
schweitz added inline comments.
flang/lib/Lower/ConvertType.cpp
264

Your questions got lost in the general shuffle.

I don't understand this question.

302

A BOZ constant is a string of bits and has no type.

379

Yes. (We're focused on F77 end-to-end.)

389

CHARACTER is a strange intrinsic type indeed. We have to handle it special in the bridge. Line 399 handles the common case.