[PATCH] D113988: [flang][CodeGen] Transform `fir.field_index` to a sequence of LLVM MLIR
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 16 23:16:26 PST 2021
rovka accepted this revision.
rovka added a comment.
This revision is now accepted and ready to land.
LGTM (with minor nits).
================
Comment at: flang/test/Fir/convert-to-llvm.fir:1209
+func @field_index_static_size() -> () {
+ %1 = fir.field_index i, !fir.type<t{i:i32}>
+ return
----------------
Nit: Can you add another field to the struct and check its index too?
================
Comment at: flang/test/Fir/convert-to-llvm.fir:1221
+// just a dummy example to aid testing.
+func @custom_typeP.field_id.offset() -> i32 {
+ %c = arith.constant 5 : i32
----------------
Nit: I think you can get away with just declaring this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113988/new/
https://reviews.llvm.org/D113988
More information about the llvm-commits
mailing list