[PATCH] D42616: [X86] Emit 15-byte NOPs on recent AMD targets, else default to 10-byte NOPs (PR22965)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 27 13:42:33 PST 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, pcordes, zvi, spatel, andreadb.

We currently emit up to 15-byte NOPs on all targets (apart from Silvermont), which stalls performance on some targets with decoders that struggle with 2 or 3 more '66' prefixes.

This patch flags recent AMD targets (btver1/znver1) to still emit 15-byte NOPs but changes the default to 10 bytes for all other targets.

I'd like to add a 11-byte NOP feature as well for AMD bdver targets, but I'm not sure where we are with feature flag usage - although I could technically identify them with the FeatureXOP instead if that is OK?


Repository:
  rL LLVM

https://reviews.llvm.org/D42616

Files:
  lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
  lib/Target/X86/X86.td
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  test/MC/MachO/x86_32-optimal_nop.s
  test/MC/X86/AlignedBundling/long-nop-pad.s
  test/MC/X86/AlignedBundling/misaligned-bundle-group.s
  test/MC/X86/AlignedBundling/misaligned-bundle.s
  test/MC/X86/AlignedBundling/pad-bundle-groups.s
  test/MC/X86/x86_long_nop.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42616.131692.patch
Type: text/x-patch
Size: 11376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180127/9aef0699/attachment.bin>


More information about the llvm-commits mailing list