[PATCH] D97982: [MC] Introduce NeverAlign fragment type

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 13:02:37 PDT 2021


lebedev.ri added a comment.

Ignorant thinking out loud, just because i've been thinking about kinda-similar issue:

1. Where is this fragment going to be added? The alignment will differ per CPU.
2. Do fragments only have the start point, or can they specify a range of instructions? If they can, then `NeverAlign` seems contrived to me. Perhaps this should instead be generalized into something like "ensure that this group of instructions doesn't cross ?-byte alignment"?



================
Comment at: llvm/include/llvm/MC/MCStreamer.h:838
+  /// If the end of the following fragment ever gets aligned to
+  /// \p ByteAlignment, emit a single nop to break this alignment.
+  virtual void emitNeverAlignCodeAtEnd(unsigned ByteAlignment);
----------------
emit *where*?


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

https://reviews.llvm.org/D97982



More information about the llvm-commits mailing list