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

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 15:11:03 PDT 2020


rriddle added a comment.

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.


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