LLVM  14.0.0git
Functions
AArch64MacroFusion.cpp File Reference
#include "AArch64MacroFusion.h"
#include "AArch64Subtarget.h"
#include "llvm/CodeGen/MacroFusion.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
Include dependency graph for AArch64MacroFusion.cpp:

Go to the source code of this file.

Functions

static bool isArithmeticBccPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI, bool CmpOnly)
 CMN, CMP, TST followed by Bcc. More...
 
static bool isArithmeticCbzPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 ALU operations followed by CBZ/CBNZ. More...
 
static bool isAESPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 AES crypto encoding or decoding. More...
 
static bool isCryptoEORPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 AESE/AESD/PMULL + EOR. More...
 
static bool isLiteralsPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 Literal generation. More...
 
static bool isAddressLdStPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 Fuse address generation and loads or stores. More...
 
static bool isCCSelectPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 Compare and conditional select. More...
 
static bool isArithmeticLogicPair (const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 
static bool shouldScheduleAdjacent (const TargetInstrInfo &TII, const TargetSubtargetInfo &TSI, const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 Check if the instr pair, FirstMI and SecondMI, should be fused together. More...
 

Function Documentation

◆ isAddressLdStPair()

static bool isAddressLdStPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

◆ isAESPair()

static bool isAESPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

AES crypto encoding or decoding.

Definition at line 120 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::getOpcode().

◆ isArithmeticBccPair()

static bool isArithmeticBccPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI,
bool  CmpOnly 
)
static

CMN, CMP, TST followed by Bcc.

Definition at line 22 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().

Referenced by shouldScheduleAdjacent().

◆ isArithmeticCbzPair()

static bool isArithmeticCbzPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

ALU operations followed by CBZ/CBNZ.

Definition at line 70 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by shouldScheduleAdjacent().

◆ isArithmeticLogicPair()

static bool isArithmeticLogicPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

Definition at line 279 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by shouldScheduleAdjacent().

◆ isCCSelectPair()

static bool isCCSelectPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

Compare and conditional select.

Definition at line 236 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::definesRegister(), and llvm::MachineInstr::getOpcode().

Referenced by shouldScheduleAdjacent().

◆ isCryptoEORPair()

static bool isCryptoEORPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

AESE/AESD/PMULL + EOR.

Definition at line 138 of file AArch64MacroFusion.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by shouldScheduleAdjacent().

◆ isLiteralsPair()

static bool isLiteralsPair ( const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

◆ shouldScheduleAdjacent()

static bool shouldScheduleAdjacent ( const TargetInstrInfo TII,
const TargetSubtargetInfo TSI,
const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

Check if the instr pair, FirstMI and SecondMI, should be fused together.

Given SecondMI, when FirstMI is unspecified, then check if SecondMI may be part of a fused pair at all.

Definition at line 381 of file AArch64MacroFusion.cpp.

References isAddressLdStPair(), llvm::isAESPair(), isArithmeticBccPair(), isArithmeticCbzPair(), isArithmeticLogicPair(), isCCSelectPair(), isCryptoEORPair(), llvm::isLiteralsPair(), and llvm::ARM_MB::ST.