[MC] Adding code padding for performance stability - infrastructure. NFC.
authorOmer Paparo Bivas <omer.paparo.bivas@intel.com>
Tue, 24 Oct 2017 06:16:03 +0000 (06:16 +0000)
committerOmer Paparo Bivas <omer.paparo.bivas@intel.com>
Tue, 24 Oct 2017 06:16:03 +0000 (06:16 +0000)
commit2251c79aba5af528e7f8fc40e6b4e116230672b8
tree5998d83161718a06c275aeb1dabbdff5d3a563b6
parentc6d0b6c1032716082b2ea1814322abb81947ebdc
[MC] Adding code padding for performance stability - infrastructure. NFC.

Infrastructure designed for padding code with nop instructions in key places such that preformance improvement will be achieved.
The infrastructure is implemented such that the padding is done in the Assembler after the layout is done and all IPs and alignments are known.
This patch by itself in a NFC. Future patches will make use of this infrastructure to implement required policies for code padding.

Reviewers:
aaboud
zvi
craig.topper
gadi.haber

Differential revision: https://reviews.llvm.org/D34393

Change-Id: I92110d0c0a757080a8405636914a93ef6f8ad00e
llvm-svn: 316413
17 files changed:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/MC/MCAsmBackend.h
llvm/include/llvm/MC/MCAssembler.h
llvm/include/llvm/MC/MCCodePadder.h [new file with mode: 0644]
llvm/include/llvm/MC/MCFragment.h
llvm/include/llvm/MC/MCObjectStreamer.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/MC/CMakeLists.txt
llvm/lib/MC/MCAsmBackend.cpp
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCCodePadder.cpp [new file with mode: 0644]
llvm/lib/MC/MCFragment.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/lib/Target/X86/X86AsmPrinter.h
llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll