[PATCH] D148947: [MemRefToLLVM] Add a method in MemRefDescriptor to get the buffer addr

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 01:59:11 PDT 2023


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


================
Comment at: mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp:211
+  // Skip if offset is zero.
+  if (offsetCst != 0) {
+    Type indexType = converter.getIndexType();
----------------
nicolasvasilache wrote:
> nit: can we turn this into an early exit?
> 
> ```
> if (offsetCst == 0)
>   return ptr;
> 
> ...
> ```
Sure!
Done at bba9209f1d198efc7e492f0e273fff0b0a5ef060


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148947



More information about the llvm-commits mailing list