diff options
author | Fangrui Song <maskray@google.com> | 2019-12-05 18:18:55 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-12-09 19:21:31 -0800 |
commit | 9574757dba9d520a90252ba63b3d178e7d9ef00e (patch) | |
tree | 08127142ba2f4620b76137ea28b41d62e32aaa23 /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | 52b1c94a5fe47c8bb5e189bc40bfd50255ce5795 (diff) | |
download | bcm5719-llvm-9574757dba9d520a90252ba63b3d178e7d9ef00e.tar.gz bcm5719-llvm-9574757dba9d520a90252ba63b3d178e7d9ef00e.zip |
[MC] Delete MCCodePadder
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.
Reviewed By: jyknight, skan
Differential Revision: https://reviews.llvm.org/D71106
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index cc33810c7ec..6c85f2296cf 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -167,16 +167,6 @@ MCObjectStreamer::getOrCreateDataFragment(const MCSubtargetInfo *STI) { return F; } -MCPaddingFragment *MCObjectStreamer::getOrCreatePaddingFragment() { - MCPaddingFragment *F = - dyn_cast_or_null<MCPaddingFragment>(getCurrentFragment()); - if (!F) { - F = new MCPaddingFragment(); - insert(F); - } - return F; -} - void MCObjectStreamer::visitUsedSymbol(const MCSymbol &Sym) { Assembler->registerSymbol(Sym); } @@ -329,13 +319,6 @@ bool MCObjectStreamer::mayHaveInstructions(MCSection &Sec) const { void MCObjectStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) { - getAssembler().getBackend().handleCodePaddingInstructionBegin(Inst); - EmitInstructionImpl(Inst, STI); - getAssembler().getBackend().handleCodePaddingInstructionEnd(Inst); -} - -void MCObjectStreamer::EmitInstructionImpl(const MCInst &Inst, - const MCSubtargetInfo &STI) { MCStreamer::EmitInstruction(Inst, STI); MCSection *Sec = getCurrentSectionOnly(); @@ -568,16 +551,6 @@ void MCObjectStreamer::emitValueToOffset(const MCExpr *Offset, insert(new MCOrgFragment(*Offset, Value, Loc)); } -void MCObjectStreamer::EmitCodePaddingBasicBlockStart( - const MCCodePaddingContext &Context) { - getAssembler().getBackend().handleCodePaddingBasicBlockStart(this, Context); -} - -void MCObjectStreamer::EmitCodePaddingBasicBlockEnd( - const MCCodePaddingContext &Context) { - getAssembler().getBackend().handleCodePaddingBasicBlockEnd(Context); -} - // Associate DTPRel32 fixup with data and resize data area void MCObjectStreamer::EmitDTPRel32Value(const MCExpr *Value) { MCDataFragment *DF = getOrCreateDataFragment(); |