[PATCH] D72227: Add options for clang to align branches within 32B boundary

Kan Shengchen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 5 05:43:52 PST 2020


skan created this revision.
skan added reviewers: craig.topper, LuoYuanke, annita.zhang, jyknight, reames, MaskRay.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

  Add an option -mbranches-within-32B-boundaries to align branches within a
  32-Byte boundary to reduce the potential performance loss of the microcode
  update. The option is equivalent to the combination of three options:
  
  -malign-branch-boundary=32
  -malign-branch=fused+jcc+jmp
  -malign-branch-prefix-size=4
  
  More fine options added for clang:
  1. -malign-branch-boundary=NUM aligns branches within NUM byte boundary.
  2. -malign-branch=TYPE[+TYPE...] specifies types of branches to align.
  3. -malign-branch-prefix-size=NUM limits the prefix size by NUM
  per instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72227

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/intel-align-branch.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72227.236240.patch
Type: text/x-patch
Size: 8444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200105/ec642e8b/attachment.bin>


More information about the cfe-commits mailing list