[PATCH] D80285: [mlir] make the bitwidth of device side index computations configurable

Tobias Gysi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 02:36:31 PDT 2020


gysit marked an inline comment as done.
gysit added inline comments.


================
Comment at: mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h:385
+                           /*indexBitwidth=*/kDeriveIndexBitwidthFromDataLayout,
+                           /*useAlignedAlloc=*/false},
                        PatternBenefit benefit = 1);
----------------
mehdi_amini wrote:
> I am puzzled how is this working?
> 
> This default value for this parameter is mapped to a reference member, how isn't it gonna lead to "use-after-free"?
> 
You are right this should not work (the lifetime of the default argument is limited to the body of the constructor -- I believe). I will submit a patch to fix this problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80285





More information about the llvm-commits mailing list