LLVM 19.0.0git
Macros | Functions | Variables
MVETPAndVPTOptimisationsPass.cpp File Reference
#include "ARM.h"
#include "ARMSubtarget.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "MVETailPredUtils.h"
#include "Thumb2InstrInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
#include <cassert>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "arm-mve-vpt-opts"
 

Functions

 INITIALIZE_PASS_BEGIN (MVETPAndVPTOptimisations, DEBUG_TYPE, "ARM MVE TailPred and VPT Optimisations pass", false, false) INITIALIZE_PASS_END(MVETPAndVPTOptimisations
 
ARM MVE TailPred and VPT Optimisations static false MachineInstrLookThroughCOPY (MachineInstr *MI, MachineRegisterInfo *MRI)
 
static bool findLoopComponents (MachineLoop *ML, MachineRegisterInfo *MRI, MachineInstr *&LoopStart, MachineInstr *&LoopPhi, MachineInstr *&LoopDec, MachineInstr *&LoopEnd)
 
static void RevertWhileLoopSetup (MachineInstr *MI, const TargetInstrInfo *TII)
 
static bool IsInvalidTPInstruction (MachineInstr &MI)
 
static bool IsVCMP (unsigned Opcode)
 
static bool CanHaveSwappedOperands (unsigned Opcode)
 
static ARMCC::CondCodes GetCondCode (MachineInstr &Instr)
 
static bool IsVPNOTEquivalent (MachineInstr &Cond, MachineInstr &Prev)
 
static bool IsWritingToVCCR (MachineInstr &Instr)
 
static bool MoveVPNOTBeforeFirstUser (MachineBasicBlock &MBB, MachineBasicBlock::iterator Iter, Register Reg)
 

Variables

static cl::opt< boolMergeEndDec ("arm-enable-merge-loopenddec", cl::Hidden, cl::desc("Enable merging Loop End and Dec instructions."), cl::init(true))
 
static cl::opt< boolSetLRPredicate ("arm-set-lr-predicate", cl::Hidden, cl::desc("Enable setting lr as a predicate in tail predication regions."), cl::init(true))
 
 DEBUG_TYPE
 
ARM MVE TailPred and VPT Optimisations pass
 
ARM MVE TailPred and VPT Optimisations false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "arm-mve-vpt-opts"

Definition at line 36 of file MVETPAndVPTOptimisationsPass.cpp.

Function Documentation

◆ CanHaveSwappedOperands()

static bool CanHaveSwappedOperands ( unsigned  Opcode)
static

Definition at line 552 of file MVETPAndVPTOptimisationsPass.cpp.

Referenced by IsVPNOTEquivalent().

◆ findLoopComponents()

static bool findLoopComponents ( MachineLoop ML,
MachineRegisterInfo MRI,
MachineInstr *&  LoopStart,
MachineInstr *&  LoopPhi,
MachineInstr *&  LoopDec,
MachineInstr *&  LoopEnd 
)
static

◆ GetCondCode()

static ARMCC::CondCodes GetCondCode ( MachineInstr Instr)
static

Definition at line 574 of file MVETPAndVPTOptimisationsPass.cpp.

References assert(), and IsVCMP().

Referenced by IsVPNOTEquivalent().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( MVETPAndVPTOptimisations  ,
DEBUG_TYPE  ,
"ARM MVE TailPred and VPT Optimisations pass"  ,
false  ,
false   
)

◆ IsInvalidTPInstruction()

static bool IsInvalidTPInstruction ( MachineInstr MI)
static

Definition at line 265 of file MVETPAndVPTOptimisationsPass.cpp.

References llvm::isLoopStart(), and MI.

◆ IsVCMP()

static bool IsVCMP ( unsigned  Opcode)
static

Definition at line 547 of file MVETPAndVPTOptimisationsPass.cpp.

References llvm::VCMPOpcodeToVPT().

Referenced by GetCondCode(), and IsVPNOTEquivalent().

◆ IsVPNOTEquivalent()

static bool IsVPNOTEquivalent ( MachineInstr Cond,
MachineInstr Prev 
)
static

◆ IsWritingToVCCR()

static bool IsWritingToVCCR ( MachineInstr Instr)
static

◆ LookThroughCOPY()

ARM MVE TailPred and VPT Optimisations static false MachineInstr * LookThroughCOPY ( MachineInstr MI,
MachineRegisterInfo MRI 
)
static

Definition at line 100 of file MVETPAndVPTOptimisationsPass.cpp.

References MI, and MRI.

Referenced by findLoopComponents().

◆ MoveVPNOTBeforeFirstUser()

static bool MoveVPNOTBeforeFirstUser ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  Iter,
Register  Reg 
)
static

◆ RevertWhileLoopSetup()

static void RevertWhileLoopSetup ( MachineInstr MI,
const TargetInstrInfo TII 
)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 97 of file MVETPAndVPTOptimisationsPass.cpp.

◆ false

ARM MVE TailPred and VPT Optimisations false

Definition at line 98 of file MVETPAndVPTOptimisationsPass.cpp.

◆ MergeEndDec

cl::opt< bool > MergeEndDec("arm-enable-merge-loopenddec", cl::Hidden, cl::desc("Enable merging Loop End and Dec instructions."), cl::init(true)) ( "arm-enable-merge-loopenddec"  ,
cl::Hidden  ,
cl::desc("Enable merging Loop End and Dec instructions.")  ,
cl::init(true  
)
static

◆ pass

ARM MVE TailPred and VPT Optimisations pass

Definition at line 98 of file MVETPAndVPTOptimisationsPass.cpp.

◆ SetLRPredicate

cl::opt< bool > SetLRPredicate("arm-set-lr-predicate", cl::Hidden, cl::desc("Enable setting lr as a predicate in tail predication regions."), cl::init(true)) ( "arm-set-lr-predicate"  ,
cl::Hidden  ,
cl::desc("Enable setting lr as a predicate in tail predication regions.")  ,
cl::init(true  
)
static