This is an archive of the discontinued LLVM Phabricator instance.

[MC] Delete MCCodePadder
ClosedPublic

Authored by MaskRay on Dec 5 2019, 11:12 PM.

Details

Summary

D34393 added MCCodePadder as an infrastructure for padding code with
NOP instructions. It lacked tests and was not being worked on since
then.

Intel has now worked on an assembler patch to mitigate performance loss
after applying microcode update for the Jump Conditional Code Erratum.

https://www.intel.com/content/www/us/en/support/articles/000055650/processors.html

This new patch shares similarity with MCCodePadder, but has a concrete
use case in mind and is being actively developed. The infrastructure it
introduces can potentially be used for general performance improvement
via alignment. Delete the unused MCCodePadder so that people can develop
the new feature from a clean state.

Event Timeline

MaskRay created this revision.Dec 5 2019, 11:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2019, 11:12 PM
MaskRay updated this revision to Diff 232499.Dec 5 2019, 11:17 PM

Delete code that is only compiled in !NDEBUG builds

Harbormaster completed remote builds in B41999: Diff 232499.

LGTM w/minor comment addressed before submit.

llvm/lib/Target/Mips/MipsAsmPrinter.cpp
469 ↗(On Diff #232499)

The base class method still exists, so please leave this line.

llvm/lib/Target/X86/X86AsmPrinter.h
133 ↗(On Diff #232499)

Same.

MaskRay updated this revision to Diff 232614.Dec 6 2019, 11:08 AM
MaskRay marked 2 inline comments as done.

Restore base EmitBasicBlockEnd (no-op) calls in MipsAsmPrinter::EmitBasicBlockEnd and X86AsmPrinter::EmitBasicBlockEnd.

jyknight accepted this revision.Dec 9 2019, 6:47 AM
This revision is now accepted and ready to land.Dec 9 2019, 6:47 AM

@skan Do you think we can commit this patch? It will resolve the question that the JCC mitigation will conflict with the existing functionality.

skan accepted this revision.Dec 9 2019, 6:50 PM

LGTM

This revision was automatically updated to reflect the committed changes.
llvm/lib/MC/MCAssembler.cpp