This is an archive of the discontinued LLVM Phabricator instance.

[fir] Update fir.allocmem op
ClosedPublic

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

Details

Summary

Updatet the fir.allocmem operation.

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 24 2021, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:25 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Sep 24 2021, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:25 AM

Move verifier to the .cpp file

mehdi_amini added inline comments.Sep 24 2021, 9:39 AM
flang/lib/Optimizer/Dialect/FIROps.cpp
86

Can you document the syntax here?

I'm also curious if this could just use the declarative assembly instead?

Address some review comments

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

Let me give it a try with the declarative assembly.

mehdi_amini added inline comments.Sep 29 2021, 9:31 AM
flang/lib/Optimizer/Dialect/FIROps.cpp
185

I'm not sure about using this in the builder API?
It seems like it'll yield confusing errors at runtime, could this be just an assert here instead?

assert(intype.isa<ReferenceType, HeapType, PointerType, FunctionType>());

((the assert may be already in the HeadType ctor by the way)

schweitz accepted this revision.Sep 29 2021, 12:42 PM
This revision is now accepted and ready to land.Sep 29 2021, 12:42 PM
clementval added inline comments.Sep 30 2021, 12:33 AM
flang/lib/Optimizer/Dialect/FIROps.cpp
185

Right. I'll make a separate patch for this.

This revision was automatically updated to reflect the committed changes.