llvm/llvm/lib/MCA/Stages/ExecuteStage.cpp

//===---------------------- ExecuteStage.cpp --------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
/// \file
///
/// This file defines the execution stage of an instruction pipeline.
///
/// The ExecuteStage is responsible for managing the hardware scheduler
/// and issuing notifications that an instruction has been executed.
///
//===----------------------------------------------------------------------===//

#include "llvm/MCA/Stages/ExecuteStage.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Debug.h"

#define DEBUG_TYPE

namespace llvm {
namespace mca {

HWStallEvent::GenericEventType toHWStallEventType(Scheduler::Status Status) {}

bool ExecuteStage::isAvailable(const InstRef &IR) const {}

Error ExecuteStage::issueInstruction(InstRef &IR) {}

Error ExecuteStage::issueReadyInstructions() {}

Error ExecuteStage::cycleStart() {}

Error ExecuteStage::cycleEnd() {}

#ifndef NDEBUG
static void verifyInstructionEliminated(const InstRef &IR) {
  const Instruction &Inst = *IR.getInstruction();
  assert(Inst.isEliminated() && "Instruction was not eliminated!");
  assert(Inst.isReady() && "Instruction in an inconsistent state!");

  // Ensure that instructions eliminated at register renaming stage are in a
  // consistent state.
  assert(!Inst.getMayLoad() && !Inst.getMayStore() &&
         "Cannot eliminate a memory op!");
}
#endif

Error ExecuteStage::handleInstructionEliminated(InstRef &IR) {}

// Schedule the instruction for execution on the hardware.
Error ExecuteStage::execute(InstRef &IR) {}

void ExecuteStage::notifyInstructionExecuted(const InstRef &IR) const {}

void ExecuteStage::notifyInstructionPending(const InstRef &IR) const {}

void ExecuteStage::notifyInstructionReady(const InstRef &IR) const {}

void ExecuteStage::notifyResourceAvailable(const ResourceRef &RR) const {}

void ExecuteStage::notifyInstructionIssued(
    const InstRef &IR, MutableArrayRef<ResourceUse> Used) const {}

void ExecuteStage::notifyReservedOrReleasedBuffers(const InstRef &IR,
                                                   bool Reserved) const {}

} // namespace mca
} // namespace llvm