[PATCH] D113566: [fir] Add fir.box_isarray, fir.box_isptr and fir.box_isalloc conversion.

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 08:23:43 PST 2021


clementval added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:34-35
+/// `fir.box` attribute values as defined in flang/ISO_Fortran_binding.h.
+static constexpr unsigned kAttrPointer = CFI_attribute_pointer;
+static constexpr unsigned kAttrAllocatable = CFI_attribute_allocatable;
+
----------------
clementval wrote:
> awarzynski wrote:
> > Why not use the macro directly?
> `fir.box` is an abstraction of a descriptor also we can get a compile time error in case the macro is not a uint. 
also it makes it homogenous with the `fir.box` field indexing added previously so the code is maybe easier to understand. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113566



More information about the llvm-commits mailing list