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/MCAsmBackend.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/MCAsmBackend.cpp')
| -rw-r--r-- | llvm/lib/MC/MCAsmBackend.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/llvm/lib/MC/MCAsmBackend.cpp b/llvm/lib/MC/MCAsmBackend.cpp index b800e9caee2..cf110345df3 100644 --- a/llvm/lib/MC/MCAsmBackend.cpp +++ b/llvm/lib/MC/MCAsmBackend.cpp @@ -9,7 +9,6 @@ #include "llvm/MC/MCAsmBackend.h" #include "llvm/ADT/None.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/MC/MCCodePadder.h" #include "llvm/MC/MCELFObjectWriter.h" #include "llvm/MC/MCFixupKindInfo.h" #include "llvm/MC/MCMachObjectWriter.h" @@ -23,8 +22,7 @@ using namespace llvm; -MCAsmBackend::MCAsmBackend(support::endianness Endian) - : CodePadder(new MCCodePadder()), Endian(Endian) {} +MCAsmBackend::MCAsmBackend(support::endianness Endian) : Endian(Endian) {} MCAsmBackend::~MCAsmBackend() = default; @@ -113,25 +111,3 @@ bool MCAsmBackend::fixupNeedsRelaxationAdvanced( return true; return fixupNeedsRelaxation(Fixup, Value, DF, Layout); } - -void MCAsmBackend::handleCodePaddingBasicBlockStart( - MCObjectStreamer *OS, const MCCodePaddingContext &Context) { - CodePadder->handleBasicBlockStart(OS, Context); -} - -void MCAsmBackend::handleCodePaddingBasicBlockEnd( - const MCCodePaddingContext &Context) { - CodePadder->handleBasicBlockEnd(Context); -} - -void MCAsmBackend::handleCodePaddingInstructionBegin(const MCInst &Inst) { - CodePadder->handleInstructionBegin(Inst); -} - -void MCAsmBackend::handleCodePaddingInstructionEnd(const MCInst &Inst) { - CodePadder->handleInstructionEnd(Inst); -} - -bool MCAsmBackend::relaxFragment(MCPaddingFragment *PF, MCAsmLayout &Layout) { - return CodePadder->relaxFragment(PF, Layout); -} |

