llvm/llvm/lib/Target/Hexagon/HexagonGenMemAbsolute.cpp

//===--- HexagonGenMemAbsolute.cpp - Generate Load/Store Set Absolute ---===//
//
// 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 pass traverses through all the basic blocks in a function and converts
// an indexed load/store with offset "0" to a absolute-set load/store
// instruction as long as the use of the register in the new instruction
// dominates the rest of the uses and there are more than 2 uses.

#include "HexagonTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"

#define DEBUG_TYPE

usingnamespacellvm;

STATISTIC(HexagonNumLoadAbsConversions,
          "Number of Load instructions converted to absolute-set form");
STATISTIC(HexagonNumStoreAbsConversions,
          "Number of Store instructions converted to absolute-set form");

namespace llvm {
FunctionPass *createHexagonGenMemAbsolute();
void initializeHexagonGenMemAbsolutePass(PassRegistry &Registry);
} // namespace llvm

namespace {

class HexagonGenMemAbsolute : public MachineFunctionPass {};
} // namespace

char HexagonGenMemAbsolute::ID =;

INITIALIZE_PASS()

bool HexagonGenMemAbsolute::runOnMachineFunction(MachineFunction &Fn) {}

bool HexagonGenMemAbsolute::isValidIndexedLoad(int &Opc, int &NewOpc) {}

bool HexagonGenMemAbsolute::isValidIndexedStore(int &Opc, int &NewOpc) {}

//===----------------------------------------------------------------------===//
//                         Public Constructor Functions
//===----------------------------------------------------------------------===//

FunctionPass *llvm::createHexagonGenMemAbsolute() {}