[PATCH] D72291: Reimplement BoundaryAlign mechanism (mostly, but not quite NFC)

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 18:33:52 PST 2020


skan added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:513-514
+  // jumps, so avoid inserting a potentially unused fragment in that case.
+  if (!isa<MCRelaxableFragment>(CF))
+    OS.insert(new MCDataFragment());
+  
----------------
If 
a) the next instruction is a relaxable instruction (e.g. jump) and is emitted into a `RelaxableFragment`, or

b) the next instruction has no fixup and is emitted into a `CompactEncodedInstFragment`, or

c) the next fragment is a `AlignFragment`,

the data fragment will be unused.  From my perspective, an unused BoundaryAlignFragment is normal when it doesn't have a 'LastFragment' by design. However a unused data fragment is kind of strange.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72291





More information about the llvm-commits mailing list