LLVM 23.0.0git
X86CompressEVEX.cpp File Reference
#include "MCTargetDesc/X86BaseInfo.h"
#include "X86.h"
#include "X86InstrInfo.h"
#include "X86Subtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachinePassManager.h"
#include "llvm/IR/Analysis.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Pass.h"
#include <atomic>
#include <cassert>
#include <cstdint>
#include "X86GenInstrMapping.inc"

Go to the source code of this file.

Macros

#define COMP_EVEX_DESC   "Compressing EVEX instrs when possible"
#define COMP_EVEX_NAME   "x86-compress-evex"
#define DEBUG_TYPE   COMP_EVEX_NAME
#define GET_X86_COMPRESS_EVEX_TABLE

Functions

static bool usesExtendedRegister (const MachineInstr &MI)
static bool performCustomAdjustments (MachineInstr &MI, unsigned NewOpc)
static bool isKMovNarrowing (unsigned VPMOVOpc, unsigned KMOVOpc)
static bool tryCompressVPMOVPattern (MachineInstr &MI, MachineBasicBlock &MBB, const X86Subtarget &ST, SmallVectorImpl< MachineInstr * > &ToErase)
static bool CompressEVEXImpl (MachineInstr &MI, MachineBasicBlock &MBB, const X86Subtarget &ST, SmallVectorImpl< MachineInstr * > &ToErase)
static bool runOnMF (MachineFunction &MF)
 INITIALIZE_PASS (CompressEVEXLegacy, COMP_EVEX_NAME, COMP_EVEX_DESC, false, false) FunctionPass *llvm

Variables

cl::opt< boolX86EnableAPXForRelocation

Macro Definition Documentation

◆ COMP_EVEX_DESC

#define COMP_EVEX_DESC   "Compressing EVEX instrs when possible"

Definition at line 62 of file X86CompressEVEX.cpp.

Referenced by INITIALIZE_PASS().

◆ COMP_EVEX_NAME

#define COMP_EVEX_NAME   "x86-compress-evex"

Definition at line 63 of file X86CompressEVEX.cpp.

Referenced by INITIALIZE_PASS().

◆ DEBUG_TYPE

#define DEBUG_TYPE   COMP_EVEX_NAME

Definition at line 65 of file X86CompressEVEX.cpp.

◆ GET_X86_COMPRESS_EVEX_TABLE

#define GET_X86_COMPRESS_EVEX_TABLE

Definition at line 71 of file X86CompressEVEX.cpp.

Function Documentation

◆ CompressEVEXImpl()

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( CompressEVEXLegacy ,
COMP_EVEX_NAME ,
COMP_EVEX_DESC ,
false ,
false  )

◆ isKMovNarrowing()

bool isKMovNarrowing ( unsigned VPMOVOpc,
unsigned KMOVOpc )
static

Definition at line 183 of file X86CompressEVEX.cpp.

References llvm_unreachable.

Referenced by tryCompressVPMOVPattern().

◆ performCustomAdjustments()

bool performCustomAdjustments ( MachineInstr & MI,
unsigned NewOpc )
static

Definition at line 123 of file X86CompressEVEX.cpp.

References assert(), MI, and Opc.

Referenced by CompressEVEXImpl().

◆ runOnMF()

◆ tryCompressVPMOVPattern()

◆ usesExtendedRegister()

bool usesExtendedRegister ( const MachineInstr & MI)
static

Definition at line 92 of file X86CompressEVEX.cpp.

References assert(), llvm::X86II::isApxExtendedReg(), llvm::X86II::isZMMReg(), MI, and Reg.

Referenced by CompressEVEXImpl().

Variable Documentation

◆ X86EnableAPXForRelocation