[PATCH] D70157: Align branches within 32-Byte boundary(NOP padding)

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 00:09:32 PST 2019


MaskRay added inline comments.


================
Comment at: llvm/lib/MC/MCAssembler.cpp:1003
+  // exists) also marks the end of the branch.
+  for (auto i = 0U, N = BF.isFused() ? 2U : 1U;
+       i != N && !isa<MCBoundaryAlignFragment>(F); ++i, F = F->getNextNode()) {
----------------
skan wrote:
> MaskRay wrote:
> > unsigned -> int
> Why use `int` here?
The loop variable can only be 0 or 1. 0U 1U 2U the unsigned suffix are just redundant. `int` suffices.  It also improves readability a bit by avoiding `auto`.


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

https://reviews.llvm.org/D70157





More information about the cfe-commits mailing list