[all-commits] [llvm/llvm-project] 339eba: [mlir] do not emit bitcasts between structs in Sta...

ftynse via All-commits all-commits at lists.llvm.org
Fri Aug 14 02:33:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 339eba0805fb73da5cc3d29eb7cd1085306db54e
      https://github.com/llvm/llvm-project/commit/339eba0805fb73da5cc3d29eb7cd1085306db54e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-08-14 (Fri, 14 Aug 2020)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir

  Log Message:
  -----------
  [mlir] do not emit bitcasts between structs in StandardToLLVM

The convresion of memref cast operaitons from the Standard dialect to the LLVM
dialect has been emitting bitcasts from a struct type to itself. Beyond being
useless, such casts are invalid as bitcast does not operate on aggregate types.
This kept working by accident because LLVM IR bitcast construction API skips
the construction if types are equal before it verifies that the types are
acceptable in a bitcast. Do not emit such bitcasts, the memref cast that only
adds/erases size information is in fact a noop on the current descriptor as it
always contains dynamic values for all sizes.

Reviewed By: pifon2a

Differential Revision: https://reviews.llvm.org/D85899




More information about the All-commits mailing list