This is an archive of the discontinued LLVM Phabricator instance.

[fir] Update fir.alloca op
ClosedPublic

Authored by clementval on Sep 24 2021, 6:48 AM.

Details

Summary

Update the fir.alloca operation.

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

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

Diff Detail

Event Timeline

clementval created this revision.Sep 24 2021, 6:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:48 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Sep 24 2021, 6:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:48 AM

Move verifier to .cpp file

mehdi_amini added inline comments.Sep 24 2021, 9:36 AM
flang/include/flang/Optimizer/Dialect/FIROps.td
288–304

Why not save an indirection and write directly here: return parseAllocatableOp(wrapAllocaResultType, parser, result);?

289

(same here: printAllocatableOp(p, this);)

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

Is clang-tidy right here or is the clang-tidy configuration incorrect?

clementval added inline comments.Sep 25 2021, 5:18 AM
flang/include/flang/Optimizer/Dialect/FIROps.td
288–304

Yep makes sense.

289

+1

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

Good catch. Looks like we have mixed style in some places. I'll fix that.

Address review comment

clementval marked 3 inline comments as done.Sep 25 2021, 6:13 AM
mehdi_amini accepted this revision.Sep 25 2021, 11:10 AM
mehdi_amini added inline comments.
flang/lib/Optimizer/Dialect/FIROps.cpp
197

For trivial builder forwarding, you can also inline the body in ODS if you prefer.

This revision is now accepted and ready to land.Sep 25 2021, 11:10 AM
This revision was landed with ongoing or failed builds.Sep 30 2021, 2:06 AM
Closed by commit rG8014b28dcfa1: [fir] Update fir.alloca op (authored by schweitz, committed by clementval). · Explain Why
This revision was automatically updated to reflect the committed changes.