[PATCH] D76286: [X86][MC] Support enhanced relaxation for branch align

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 07:57:55 PDT 2020


skan created this revision.
skan added reviewers: reames, MaskRay, craig.topper, LuoYuanke, jyknight.
Herald added a project: LLVM.

Since D75300 <https://reviews.llvm.org/D75300> has been landed, I want to support enhanced relaxation when we need
to align branches and allow prefix padding. "Enhanced Relaxtion" means we allow
an instruction that could not be traditionally relaxed to be emitted into
RelaxableFragment so that we increase its length by adding prefixes for
optimization. The motivation is straightforward, RelaxFragment is mostly
for relative jumps and we can not increase the length of jumps when we need to
align them, so if we need to achieve D75300 <https://reviews.llvm.org/D75300>'s purpose (reducing the
bytes of nops) when need to align jumps, we have to make more
instructions "relaxable".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76286

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76286.250775.patch
Type: text/x-patch
Size: 8246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200317/45b2df7e/attachment.bin>


More information about the llvm-commits mailing list