summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/InstPrinter
diff options
context:
space:
mode:
authorGadi Haber <gadi.haber@intel.com>2016-12-28 10:12:48 +0000
committerGadi Haber <gadi.haber@intel.com>2016-12-28 10:12:48 +0000
commit19c4fc5e62905006dfcee26ade7dbada2c90fae9 (patch)
tree049e45129d9006aec0e1c1f7943316abcbc9092a /llvm/lib/Target/X86/InstPrinter
parentb9565705bdc917800a4298473be4a69273abe514 (diff)
downloadbcm5719-llvm-19c4fc5e62905006dfcee26ade7dbada2c90fae9.tar.gz
bcm5719-llvm-19c4fc5e62905006dfcee26ade7dbada2c90fae9.zip
This is a large patch for X86 AVX-512 of an optimization for reducing code size by encoding EVEX AVX-512 instructions using the shorter VEX encoding when possible.
There are cases of AVX-512 instructions that have two possible encodings. This is the case with instructions that use vector registers with low indexes of 0 - 15 and do not use the zmm registers or the mask k registers. The EVEX encoding prefix requires 4 bytes whereas the VEX prefix can take only up to 3 bytes. Consequently, using the VEX encoding for these instructions results in a code size reduction of ~2 bytes even though it is compiled with the AVX-512 features enabled. Reviewers: Craig Topper, Zvi Rackoover, Elena Demikhovsky Differential Revision: https://reviews.llvm.org/D27901 llvm-svn: 290663
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter')
-rw-r--r--llvm/lib/Target/X86/InstPrinter/X86InstComments.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86InstComments.h b/llvm/lib/Target/X86/InstPrinter/X86InstComments.h
index 687581b10ae..c6d0d85a7d3 100644
--- a/llvm/lib/Target/X86/InstPrinter/X86InstComments.h
+++ b/llvm/lib/Target/X86/InstPrinter/X86InstComments.h
@@ -16,6 +16,11 @@
#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTCOMMENTS_H
namespace llvm {
+
+ enum AsmComments {
+ AC_EVEX_2_VEX = 0x2 // For instr that was compressed from EVEX to VEX.
+ };
+
class MCInst;
class raw_ostream;
bool EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
OpenPOWER on IntegriCloud