This is an archive of the discontinued LLVM Phabricator instance.

[fir][NFC] Move fir.global printer to cpp file
ClosedPublic

Authored by clementval on Oct 1 2021, 6:10 AM.

Details

Summary

All big enough parser, printer and verifier are moved to the cpp file.
This is one of the last one to be moved.

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

Diff Detail

Event Timeline

clementval created this revision.Oct 1 2021, 6:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2021, 6:10 AM
clementval requested review of this revision.Oct 1 2021, 6:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2021, 6:10 AM
This revision is now accepted and ready to land.Oct 1 2021, 10:11 AM
This revision was automatically updated to reflect the committed changes.

Can this be converted to declarative assembly instead?

Can this be converted to declarative assembly instead?

flang/lib/Optimizer/Dialect/FIROps.cpp
1186

ODS generates already an accessor constantAttrName (same for all other attributes) which returns an Identifier (and so allows for pointer comparison instead of strcmp).

Can this be converted to declarative assembly instead?

This one is not trivial to convert to assembly format at least not in the current form.

flang/lib/Optimizer/Dialect/FIROps.cpp
1186

Ok. It's a member function right? How to how access the attribute name in the parser?

mehdi_amini added inline comments.Oct 4 2021, 12:57 PM
flang/lib/Optimizer/Dialect/FIROps.cpp
1186

Oh right, the parser won't have access to it since it get initialized in the AbstractOperation IIRC