llvm/llvm/include/llvm/MCA/SourceMgr.h

//===--------------------- SourceMgr.h --------------------------*- 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 contains abstract class SourceMgr and the default implementation,
/// CircularSourceMgr.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_MCA_SOURCEMGR_H
#define LLVM_MCA_SOURCEMGR_H

#include "llvm/ADT/ArrayRef.h"
#include "llvm/MCA/Instruction.h"

namespace llvm {
namespace mca {

// MSVC >= 19.15, < 19.20 need to see the definition of class Instruction to
// prevent compiler error C2139 about intrinsic type trait '__is_assignable'.
SourceRef;

/// Abstracting the input code sequence (a sequence of MCInst) and assigning
/// unique identifiers to every instruction in the sequence.
struct SourceMgr {};

/// The default implementation of \a SourceMgr. It always takes a fixed number
/// of instructions and provides an option to loop the given sequence for a
/// certain iterations.
class CircularSourceMgr : public SourceMgr {};

} // namespace mca
} // namespace llvm

#endif // LLVM_MCA_SOURCEMGR_H