LLVM 22.0.0git
LanaiInstrInfo.cpp File Reference
#include "LanaiInstrInfo.h"
#include "LanaiAluCode.h"
#include "LanaiCondCode.h"
#include "LanaiSubtarget.h"
#include "MCTargetDesc/LanaiBaseInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/ErrorHandling.h"
#include "LanaiGenInstrInfo.inc"

Go to the source code of this file.

Macros

#define GET_INSTRINFO_CTOR_DTOR

Functions

static LPCC::CondCode getOppositeCondition (LPCC::CondCode CC)
static bool isRedundantFlagInstr (MachineInstr *CmpI, unsigned SrcReg, unsigned SrcReg2, int64_t ImmValue, MachineInstr *OI)
static unsigned flagSettingOpcodeVariant (unsigned OldOpcode)
static MachineInstrcanFoldIntoSelect (Register Reg, const MachineRegisterInfo &MRI)

Macro Definition Documentation

◆ GET_INSTRINFO_CTOR_DTOR

#define GET_INSTRINFO_CTOR_DTOR

Definition at line 26 of file LanaiInstrInfo.cpp.

Function Documentation

◆ canFoldIntoSelect()

MachineInstr * canFoldIntoSelect ( Register Reg,
const MachineRegisterInfo & MRI )
static

Definition at line 459 of file LanaiInstrInfo.cpp.

References llvm::drop_begin(), MI, MRI, and Reg.

Referenced by llvm::LanaiInstrInfo::optimizeSelect().

◆ flagSettingOpcodeVariant()

unsigned flagSettingOpcodeVariant ( unsigned OldOpcode)
inlinestatic

Definition at line 229 of file LanaiInstrInfo.cpp.

Referenced by llvm::LanaiInstrInfo::optimizeCompareInstr().

◆ getOppositeCondition()

◆ isRedundantFlagInstr()

bool isRedundantFlagInstr ( MachineInstr * CmpI,
unsigned SrcReg,
unsigned SrcReg2,
int64_t ImmValue,
MachineInstr * OI )
inlinestatic