|
LLVM
8.0.1
|
This file defines the pass that goes over all AVX-512 instructions which are encoded using the EVEX prefix and if possible replaces them by their corresponding VEX encoding which is usually shorter by 2 bytes. More...
#include "InstPrinter/X86InstComments.h"#include "MCTargetDesc/X86BaseInfo.h"#include "X86.h"#include "X86InstrInfo.h"#include "X86Subtarget.h"#include "llvm/ADT/StringRef.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/MC/MCInstrDesc.h"#include "llvm/Pass.h"#include <cassert>#include <cstdint>#include "X86GenEVEX2VEXTables.inc"
Go to the source code of this file.
Classes | |
| struct | X86EvexToVexCompressTableEntry |
Macros | |
| #define | EVEX2VEX_DESC "Compressing EVEX instrs to VEX encoding when possible" |
| #define | EVEX2VEX_NAME "x86-evex-to-vex-compress" |
| #define | DEBUG_TYPE EVEX2VEX_NAME |
Functions | |
| static bool | usesExtendedRegister (const MachineInstr &MI) |
| static bool | performCustomAdjustments (MachineInstr &MI, unsigned NewOpc) |
This file defines the pass that goes over all AVX-512 instructions which are encoded using the EVEX prefix and if possible replaces them by their corresponding VEX encoding which is usually shorter by 2 bytes.
EVEX instructions may be encoded via the VEX prefix when the AVX-512 instruction has a corresponding AVX/AVX2 opcode and when it does not use the xmm or the mask registers or xmm/ymm registers with indexes higher than 15. The pass applies code reduction on the generated code for AVX-512 instrs.
Definition in file X86EvexToVex.cpp.
| #define DEBUG_TYPE EVEX2VEX_NAME |
Definition at line 59 of file X86EvexToVex.cpp.
| #define EVEX2VEX_DESC "Compressing EVEX instrs to VEX encoding when possible" |
Definition at line 56 of file X86EvexToVex.cpp.
Referenced by performCustomAdjustments().
| #define EVEX2VEX_NAME "x86-evex-to-vex-compress" |
Definition at line 57 of file X86EvexToVex.cpp.
Referenced by performCustomAdjustments().
|
static |
Definition at line 150 of file X86EvexToVex.cpp.
References llvm::X86::AC_EVEX_2_VEX, assert(), llvm::sys::path::begin(), llvm::ArrayRef< T >::begin(), llvm::X86II::EncodingMask, llvm::sys::path::end(), llvm::ArrayRef< T >::end(), llvm::X86II::EVEX, EVEX2VEX_DESC, EVEX2VEX_NAME, llvm::X86II::EVEX_B, llvm::X86II::EVEX_K, llvm::X86II::EVEX_L2, llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), I, INITIALIZE_PASS, llvm::lower_bound(), llvm::makeArrayRef(), MI, llvm::MachineInstr::setAsmPrinterFlag(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setImm(), TII, llvm::MCInstrDesc::TSFlags, usesExtendedRegister(), and llvm::X86II::VEX_L.
|
static |
Definition at line 118 of file X86EvexToVex.cpp.
References assert(), llvm::MachineInstr::explicit_operands(), and Reg.
Referenced by performCustomAdjustments().
1.8.13