[PATCH] D78680: [flang] Compute sizes and offsets for symbols

Steve Scalpone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 16:52:45 PDT 2020


sscalpone added inline comments.


================
Comment at: flang/lib/Semantics/compute-offsets.cpp:76
+  }
+  // NOTE: these must be sorted in the same order as in .mod files
+  std::sort(sorted.begin(), sorted.end(),
----------------
Please say why the sort must be the same.  Is there a way to assert that sizing and alignment match the mod file?


================
Comment at: flang/lib/Semantics/compute-offsets.cpp:114
+    std::size_t size{
+        runtime::Descriptor::SizeInBytes(symbol.Rank(), false, lenParams)};
+    return {size, maxAlignment};
----------------
SizeInBytes needs to be aware of //target// size and alignment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78680/new/

https://reviews.llvm.org/D78680





More information about the llvm-commits mailing list