[PATCH] D54207: [ELF] Make TrapInstr and Filler byte arrays. NFC.

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 17:29:41 PST 2018


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


================
Comment at: ELF/OutputSections.cpp:242
+  bool NonZeroFiller =
+      llvm::support::endian::read32<endianness::native>(Filler.data()) != 0;
+  if (NonZeroFiller)
----------------
ruiu wrote:
> Do you need to use read32 if you only want to know whether a value is zero or not?
We need to know whether all four elements are zero. We could check each element individually (either in a loop or unrolled), but this seemed nicer, and I'm assuming it'll be optimised to a single 32-bit load on architectures with unaligned loads.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54207





More information about the llvm-commits mailing list