[PATCH] D80272: [mlir] Support big-endian systems in DenseElementsAttr (multiple word)

Haruki Imai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 19:57:36 PDT 2020


imaihal added a comment.

In D80272#2077654 <https://reviews.llvm.org/D80272#2077654>, @rriddle wrote:

> In D80272#2077637 <https://reviews.llvm.org/D80272#2077637>, @efriedma wrote:
>
> > In general, I'd like to strongly discourage directly checking endian::system_endianness(), in favor of using the endian-sensitive read/write helpers from llvm/Support/Endian.h.  For example, you can copy_n from an endian::ulittle64_t* to a uint64_t*.  Using a distinct codepath for big-endian means more code, and that code gets less testing.
>
>
> Thanks for the comments Eli! Didn't know about those. Will recommend the same in the future.


I didn't know that. I will check it and create another patch in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80272





More information about the llvm-commits mailing list