This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add fir.char_convert op
ClosedPublic

Authored by clementval on Sep 30 2021, 6:01 AM.

Details

Summary

Add the fir-char_convert op.

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Sep 30 2021, 6:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2021, 6:01 AM
clementval requested review of this revision.Sep 30 2021, 6:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2021, 6:01 AM
kiranchandramohan requested changes to this revision.Sep 30 2021, 2:52 PM

The verification tests are missing.

flang/include/flang/Optimizer/Dialect/FIROps.td
435

Random Comment: I think the name and syntax can be better. But not sure what it could be. I tried the following but it is also not great.

fir.char_copy_convert %1 to %2 count=%3 : !fir.ref<!fir.char<1,?>>, !fir.ref<!fir.char<2,20>>, i32
flang/include/flang/Optimizer/Dialect/FIRType.h
155 ↗(On Diff #376172)

This function is not used or defined in this patch.

This revision now requires changes to proceed.Sep 30 2021, 2:52 PM
mehdi_amini added inline comments.Sep 30 2021, 3:00 PM
flang/include/flang/Optimizer/Dialect/FIRType.h
155 ↗(On Diff #376172)

The functions above don't seem used either by the eay

Remove unsude defintion + add invalid tests

clementval marked 2 inline comments as done.Oct 1 2021, 12:36 AM
clementval updated this revision to Diff 376457.Oct 1 2021, 2:33 AM

Remove unused functions

kiranchandramohan accepted this revision.Oct 1 2021, 2:34 AM

LGTM. Thanks @clementval for the changes.

This revision is now accepted and ready to land.Oct 1 2021, 2:34 AM
clementval updated this revision to Diff 376460.Oct 1 2021, 2:51 AM

Remove unsued function (again:-))

This revision was automatically updated to reflect the committed changes.