LLVM 20.0.0git
Macros | Enumerations | Functions | Variables
HexagonMCCompound.cpp File Reference
#include "MCTargetDesc/HexagonBaseInfo.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "MCTargetDesc/HexagonMCShuffler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "hexagon-mccompound"
 

Enumerations

enum  OpcodeIndex {
  fp0_jump_nt = 0 , fp0_jump_t , fp1_jump_nt , fp1_jump_t ,
  tp0_jump_nt , tp0_jump_t , tp1_jump_nt , tp1_jump_t
}
 

Functions

static unsigned getCompoundCandidateGroup (MCInst const &MI, bool IsExtended)
 
static unsigned getCompoundOp (MCInst const &HMCI)
 getCompoundOp - Return the index from 0-7 into the above opcode lists.
 
static MCInstgetCompoundInsn (MCContext &Context, MCInst const &L, MCInst const &R)
 
static bool isOrderedCompoundPair (MCInst const &MIa, bool IsExtendedA, MCInst const &MIb, bool IsExtendedB)
 Non-Symmetrical. See if these two instructions are fit for compound pair.
 
static bool lookForCompound (MCInstrInfo const &MCII, MCContext &Context, MCInst &MCI)
 

Variables

static const unsigned tstBitOpcode [8]
 
static const unsigned cmpeqBitOpcode [8]
 
static const unsigned cmpgtBitOpcode [8]
 
static const unsigned cmpgtuBitOpcode [8]
 
static const unsigned cmpeqiBitOpcode [8]
 
static const unsigned cmpgtiBitOpcode [8]
 
static const unsigned cmpgtuiBitOpcode [8]
 
static const unsigned cmpeqn1BitOpcode [8]
 
static const unsigned cmpgtn1BitOpcode [8]
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "hexagon-mccompound"

Definition at line 28 of file HexagonMCCompound.cpp.

Enumeration Type Documentation

◆ OpcodeIndex

Enumerator
fp0_jump_nt 
fp0_jump_t 
fp1_jump_nt 
fp1_jump_t 
tp0_jump_nt 
tp0_jump_t 
tp1_jump_nt 
tp1_jump_t 

Definition at line 30 of file HexagonMCCompound.cpp.

Function Documentation

◆ getCompoundCandidateGroup()

static unsigned getCompoundCandidateGroup ( MCInst const MI,
bool  IsExtended 
)
static

◆ getCompoundInsn()

static MCInst * getCompoundInsn ( MCContext Context,
MCInst const L,
MCInst const R 
)
static

◆ getCompoundOp()

static unsigned getCompoundOp ( MCInst const HMCI)
static

getCompoundOp - Return the index from 0-7 into the above opcode lists.

Definition at line 175 of file HexagonMCCompound.cpp.

References assert(), fp0_jump_nt, fp0_jump_t, fp1_jump_nt, fp1_jump_t, llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm_unreachable, tp0_jump_nt, tp0_jump_t, tp1_jump_nt, and tp1_jump_t.

Referenced by getCompoundInsn().

◆ isOrderedCompoundPair()

static bool isOrderedCompoundPair ( MCInst const MIa,
bool  IsExtendedA,
MCInst const MIb,
bool  IsExtendedB 
)
static

Non-Symmetrical. See if these two instructions are fit for compound pair.

Definition at line 335 of file HexagonMCCompound.cpp.

References getCompoundCandidateGroup(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), llvm::HexagonII::HCG_A, llvm::HexagonII::HCG_B, and llvm::HexagonII::HCG_C.

Referenced by lookForCompound().

◆ lookForCompound()

static bool lookForCompound ( MCInstrInfo const MCII,
MCContext Context,
MCInst MCI 
)
static

Variable Documentation

◆ cmpeqBitOpcode

const unsigned cmpeqBitOpcode[8]
static
Initial value:
= {
J4_cmpeq_fp0_jump_nt, J4_cmpeq_fp0_jump_t, J4_cmpeq_fp1_jump_nt,
J4_cmpeq_fp1_jump_t, J4_cmpeq_tp0_jump_nt, J4_cmpeq_tp0_jump_t,
J4_cmpeq_tp1_jump_nt, J4_cmpeq_tp1_jump_t}

Definition at line 45 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpeqiBitOpcode

const unsigned cmpeqiBitOpcode[8]
static
Initial value:
= {
J4_cmpeqi_fp0_jump_nt, J4_cmpeqi_fp0_jump_t, J4_cmpeqi_fp1_jump_nt,
J4_cmpeqi_fp1_jump_t, J4_cmpeqi_tp0_jump_nt, J4_cmpeqi_tp0_jump_t,
J4_cmpeqi_tp1_jump_nt, J4_cmpeqi_tp1_jump_t}

Definition at line 57 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpeqn1BitOpcode

const unsigned cmpeqn1BitOpcode[8]
static
Initial value:
= {
J4_cmpeqn1_fp0_jump_nt, J4_cmpeqn1_fp0_jump_t, J4_cmpeqn1_fp1_jump_nt,
J4_cmpeqn1_fp1_jump_t, J4_cmpeqn1_tp0_jump_nt, J4_cmpeqn1_tp0_jump_t,
J4_cmpeqn1_tp1_jump_nt, J4_cmpeqn1_tp1_jump_t}

Definition at line 69 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpgtBitOpcode

const unsigned cmpgtBitOpcode[8]
static
Initial value:
= {
J4_cmpgt_fp0_jump_nt, J4_cmpgt_fp0_jump_t, J4_cmpgt_fp1_jump_nt,
J4_cmpgt_fp1_jump_t, J4_cmpgt_tp0_jump_nt, J4_cmpgt_tp0_jump_t,
J4_cmpgt_tp1_jump_nt, J4_cmpgt_tp1_jump_t}

Definition at line 49 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpgtiBitOpcode

const unsigned cmpgtiBitOpcode[8]
static
Initial value:
= {
J4_cmpgti_fp0_jump_nt, J4_cmpgti_fp0_jump_t, J4_cmpgti_fp1_jump_nt,
J4_cmpgti_fp1_jump_t, J4_cmpgti_tp0_jump_nt, J4_cmpgti_tp0_jump_t,
J4_cmpgti_tp1_jump_nt, J4_cmpgti_tp1_jump_t}

Definition at line 61 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpgtn1BitOpcode

const unsigned cmpgtn1BitOpcode[8]
static
Initial value:
= {
J4_cmpgtn1_fp0_jump_nt, J4_cmpgtn1_fp0_jump_t, J4_cmpgtn1_fp1_jump_nt,
J4_cmpgtn1_fp1_jump_t, J4_cmpgtn1_tp0_jump_nt, J4_cmpgtn1_tp0_jump_t,
J4_cmpgtn1_tp1_jump_nt, J4_cmpgtn1_tp1_jump_t,
}

Definition at line 73 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpgtuBitOpcode

const unsigned cmpgtuBitOpcode[8]
static
Initial value:
= {
J4_cmpgtu_fp0_jump_nt, J4_cmpgtu_fp0_jump_t, J4_cmpgtu_fp1_jump_nt,
J4_cmpgtu_fp1_jump_t, J4_cmpgtu_tp0_jump_nt, J4_cmpgtu_tp0_jump_t,
J4_cmpgtu_tp1_jump_nt, J4_cmpgtu_tp1_jump_t}

Definition at line 53 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ cmpgtuiBitOpcode

const unsigned cmpgtuiBitOpcode[8]
static
Initial value:
= {
J4_cmpgtui_fp0_jump_nt, J4_cmpgtui_fp0_jump_t, J4_cmpgtui_fp1_jump_nt,
J4_cmpgtui_fp1_jump_t, J4_cmpgtui_tp0_jump_nt, J4_cmpgtui_tp0_jump_t,
J4_cmpgtui_tp1_jump_nt, J4_cmpgtui_tp1_jump_t}

Definition at line 65 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().

◆ tstBitOpcode

const unsigned tstBitOpcode[8]
static
Initial value:
= {
J4_tstbit0_fp0_jump_nt, J4_tstbit0_fp0_jump_t, J4_tstbit0_fp1_jump_nt,
J4_tstbit0_fp1_jump_t, J4_tstbit0_tp0_jump_nt, J4_tstbit0_tp0_jump_t,
J4_tstbit0_tp1_jump_nt, J4_tstbit0_tp1_jump_t}

Definition at line 41 of file HexagonMCCompound.cpp.

Referenced by getCompoundInsn().