llvm/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp

//===- HexagonMCDuplexInfo.cpp - Instruction bundle checking --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This implements duplexing of instructions to reduce code size
//
//===----------------------------------------------------------------------===//

#include "HexagonMCExpr.h"
#include "MCTargetDesc/HexagonBaseInfo.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "MCTargetDesc/HexagonMCTargetDesc.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <iterator>
#include <map>
#include <utility>

usingnamespacellvm;
usingnamespaceHexagon;

#define DEBUG_TYPE

// pair table of subInstructions with opcodes
static const std::pair<unsigned, unsigned> opcodeData[] =;

bool HexagonMCInstrInfo::isDuplexPairMatch(unsigned Ga, unsigned Gb) {}

unsigned HexagonMCInstrInfo::iClassOfDuplexPair(unsigned Ga, unsigned Gb) {}

unsigned HexagonMCInstrInfo::getDuplexCandidateGroup(MCInst const &MCI) {}

bool HexagonMCInstrInfo::subInstWouldBeExtended(MCInst const &potentialDuplex) {}

/// non-Symmetrical. See if these two instructions are fit for duplex pair.
bool HexagonMCInstrInfo::isOrderedDuplexPair(MCInstrInfo const &MCII,
                                             MCInst const &MIa, bool ExtendedA,
                                             MCInst const &MIb, bool ExtendedB,
                                             bool bisReversable,
                                             MCSubtargetInfo const &STI) {}

/// Symmetrical. See if these two instructions are fit for duplex pair.
bool HexagonMCInstrInfo::isDuplexPair(MCInst const &MIa, MCInst const &MIb) {}

inline static void addOps(MCInst &subInstPtr, MCInst const &Inst,
                          unsigned opNum) {}

MCInst HexagonMCInstrInfo::deriveSubInst(MCInst const &Inst) {}

static bool isStoreInst(unsigned opCode) {}

SmallVector<DuplexCandidate, 8>
HexagonMCInstrInfo::getDuplexPossibilties(MCInstrInfo const &MCII,
                                          MCSubtargetInfo const &STI,
                                          MCInst const &MCB) {}