This is an archive of the discontinued LLVM Phabricator instance.

[flang][fir][NFC] Move ShapeType to TableGen type definition
ClosedPublic

Authored by clementval on Feb 10 2021, 7:30 AM.

Details

Summary

This is the first patch of a serie to move FIR types to TableGen format as suggested in D96172.
This patch is setting up the files for FIR types and move the ShapeType to TableGen.

As discussed with @schweitz, I'm taking over this task to help the FIR upstreaming effort.

Diff Detail

Event Timeline

clementval created this revision.Feb 10 2021, 7:30 AM
clementval requested review of this revision.Feb 10 2021, 7:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2021, 7:30 AM
clementval edited the summary of this revision. (Show Details)Feb 10 2021, 8:27 AM
clementval added a project: Restricted Project.
clementval edited the summary of this revision. (Show Details)Feb 10 2021, 8:29 AM

Add summary to type

clementval edited the summary of this revision. (Show Details)
clementval retitled this revision from [flang][fir] Move ShapeType to TableGen type definition to [flang][fir][NFC] Move ShapeType to TableGen type definition.
mehdi_amini accepted this revision.Feb 10 2021, 1:55 PM
mehdi_amini added inline comments.
flang/include/flang/Optimizer/Dialect/FIRTypes.td
47

Parser methods are usually chained like this:

int rank;
if ($_parser.parseLess() || $_parser.parseInteger(rank) || $_parser.parseGreater())
    return Type();
This revision is now accepted and ready to land.Feb 10 2021, 1:55 PM

Update parser

clementval marked an inline comment as done.Feb 10 2021, 3:06 PM
clementval added inline comments.
flang/include/flang/Optimizer/Dialect/FIRTypes.td
47

Sure it looks cleaner. I just updated the patch before landing it.

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