LLVM  16.0.0git
Macros | Functions
RISCVMakeCompressible.cpp File Reference
#include "RISCV.h"
#include "RISCVSubtarget.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
Include dependency graph for RISCVMakeCompressible.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "riscv-make-compressible"
 
#define RISCV_COMPRESS_INSTRS_NAME   "RISCV Make Compressible"
 

Functions

 INITIALIZE_PASS (RISCVMakeCompressibleOpt, "riscv-make-compressible", RISCV_COMPRESS_INSTRS_NAME, false, false) static unsigned log2LdstWidth(unsigned Opcode)
 
static uint8_t compressedLDSTOffsetMask (unsigned Opcode)
 
static bool compressibleSPOffset (int64_t Offset, unsigned Opcode)
 
static int64_t getBaseAdjustForCompression (int64_t Offset, unsigned Opcode)
 
static bool isCompressedReg (Register Reg)
 
static bool isCompressibleLoad (const MachineInstr &MI)
 
static bool isCompressibleStore (const MachineInstr &MI)
 
static RegImmPair getRegImmPairPreventingCompression (const MachineInstr &MI)
 
static Register analyzeCompressibleUses (MachineInstr &FirstMI, RegImmPair RegImm, SmallVectorImpl< MachineInstr * > &MIs)
 
static void updateOperands (MachineInstr &MI, RegImmPair OldRegImm, Register NewReg)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-make-compressible"

Definition at line 77 of file RISCVMakeCompressible.cpp.

◆ RISCV_COMPRESS_INSTRS_NAME

#define RISCV_COMPRESS_INSTRS_NAME   "RISCV Make Compressible"

Definition at line 78 of file RISCVMakeCompressible.cpp.

Function Documentation

◆ analyzeCompressibleUses()

static Register analyzeCompressibleUses ( MachineInstr FirstMI,
RegImmPair  RegImm,
SmallVectorImpl< MachineInstr * > &  MIs 
)
static

◆ compressedLDSTOffsetMask()

static uint8_t compressedLDSTOffsetMask ( unsigned  Opcode)
static

Definition at line 119 of file RISCVMakeCompressible.cpp.

Referenced by getBaseAdjustForCompression(), and updateOperands().

◆ compressibleSPOffset()

static bool compressibleSPOffset ( int64_t  Offset,
unsigned  Opcode 
)
static

Definition at line 125 of file RISCVMakeCompressible.cpp.

Referenced by getRegImmPairPreventingCompression().

◆ getBaseAdjustForCompression()

static int64_t getBaseAdjustForCompression ( int64_t  Offset,
unsigned  Opcode 
)
static

Definition at line 133 of file RISCVMakeCompressible.cpp.

References compressedLDSTOffsetMask().

Referenced by getRegImmPairPreventingCompression().

◆ getRegImmPairPreventingCompression()

static RegImmPair getRegImmPairPreventingCompression ( const MachineInstr MI)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( RISCVMakeCompressibleOpt  ,
"riscv-make-compressible"  ,
RISCV_COMPRESS_INSTRS_NAME  ,
false  ,
false   
)

Definition at line 96 of file RISCVMakeCompressible.cpp.

References llvm::X86ISD::FLD, llvm::ARM_MB::LD, and llvm_unreachable.

◆ isCompressedReg()

static bool isCompressedReg ( Register  Reg)
static

Definition at line 139 of file RISCVMakeCompressible.cpp.

Referenced by getRegImmPairPreventingCompression().

◆ isCompressibleLoad()

static bool isCompressibleLoad ( const MachineInstr MI)
static

◆ isCompressibleStore()

static bool isCompressibleStore ( const MachineInstr MI)
static

◆ updateOperands()

static void updateOperands ( MachineInstr MI,
RegImmPair  OldRegImm,
Register  NewReg 
)
static