[PATCH] D71238: Align non-fused branches within 32-Byte boundary (basic case)

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 17:16:28 PST 2019


reames created this revision.
reames added reviewers: xiangzhangllvm, LuoYuanke, pengfei, craig.topper, MaskRay, jyknight, chandlerc, annita.zhang, ruiu, fedor.sergeev.
Herald added subscribers: bollu, hiraditya, mcrosier.
Herald added a project: LLVM.

This patch is derived from D70157 <https://reviews.llvm.org/D70157>.  Changes from that one:

- Remove prefix padding and simply pad with variable lengths nops.  This reduces the complexity sharply.  We can and should return to prefix padding in a follow up patch.
- Remove fused instruction handling.  Needs to be reimplemented, but not having it makes the mechanics of the basic padding requirements more straight-forward.
- Rename MCMachineDependentFragment to MCBoundaryAlignFragment and try to clarify (in comments and asserts) associated invariants and expectations.
  - Remove master flag as user expectations (which are set by our patch and the corresponding gcc patch) would not be met by only aligning a subset of branches.

The intent here is to create something straight forward and easy to review.  If others agree with the incremental approach, the original patch can be incrementally reimplemented on top of this one.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71238

Files:
  llvm/include/llvm/MC/MCAsmBackend.h
  llvm/include/llvm/MC/MCAssembler.h
  llvm/include/llvm/MC/MCFragment.h
  llvm/lib/MC/MCAssembler.cpp
  llvm/lib/MC/MCFragment.cpp
  llvm/lib/MC/MCObjectStreamer.cpp
  llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
  llvm/test/MC/X86/align-branch-64.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71238.232971.patch
Type: text/x-patch
Size: 18087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/2450e1f2/attachment.bin>


More information about the llvm-commits mailing list