llvm/llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp

//===- SMEPeepholeOpt.cpp - SME peephole optimization pass-----------------===//
//
// 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 tries to remove back-to-back (smstart, smstop) and
// (smstop, smstart) sequences. The pass is conservative when it cannot
// determine that it is safe to remove these sequences.
//===----------------------------------------------------------------------===//

#include "AArch64InstrInfo.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64Subtarget.h"
#include "Utils/AArch64SMEAttributes.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"

usingnamespacellvm;

#define DEBUG_TYPE

namespace {

struct SMEPeepholeOpt : public MachineFunctionPass {};

char SMEPeepholeOpt::ID =;

} // end anonymous namespace

static bool isConditionalStartStop(const MachineInstr *MI) {}

static bool isMatchingStartStopPair(const MachineInstr *MI1,
                                    const MachineInstr *MI2) {}

static bool ChangesStreamingMode(const MachineInstr *MI) {}

static bool isSVERegOp(const TargetRegisterInfo &TRI,
                       const MachineRegisterInfo &MRI,
                       const MachineOperand &MO) {}

bool SMEPeepholeOpt::optimizeStartStopPairs(
    MachineBasicBlock &MBB, bool &HasRemovedAllSMChanges) const {}

INITIALIZE_PASS()

bool SMEPeepholeOpt::runOnMachineFunction(MachineFunction &MF) {}

FunctionPass *llvm::createSMEPeepholeOptPass() {}