This is an archive of the discontinued LLVM Phabricator instance.

[X86][LMT] Restrict nop length to one
ClosedPublic

Authored by AsafBadouh on Nov 20 2016, 4:43 AM.

Details

Summary

not all lakemont MCU support long nop.
we can't assume we can generate long nop by default for MCU.

Diff Detail

Repository
rL LLVM

Event Timeline

AsafBadouh updated this revision to Diff 78657.Nov 20 2016, 4:43 AM
AsafBadouh retitled this revision from to [X86][LMT] Restrict nop length to one.
AsafBadouh updated this object.
AsafBadouh added reviewers: zansari, zvi, aturetsk, bruno.
AsafBadouh set the repository for this revision to rL LLVM.
AsafBadouh added a subscriber: llvm-commits.
aaboud edited edge metadata.Nov 27 2016, 4:28 AM

Look good to me

lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
84 ↗(On Diff #78657)

Maybe it worth adding a comment here explaining why you are preventing generating long nops for lakemont.

test/MC/X86/x86_long_nop.s
19–20 ↗(On Diff #78657)

You may fit the comment in one line now, it will be still less than 80 characters.

zvi added inline comments.Nov 27 2016, 7:20 AM
lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
80 ↗(On Diff #78657)

Not related to this patch, but as a follow-up work, consider replacing this big condition with string compares with a new subtarget feature (in X86.td).

zansari accepted this revision.Nov 28 2016, 11:55 AM
zansari edited edge metadata.

lgmt.. At some point, we'll need to add support for the different "lakemont" processors so that we don't affect them all with changes like this.

This revision is now accepted and ready to land.Nov 28 2016, 11:55 AM
This revision was automatically updated to reflect the committed changes.