//===- llvm/CodeGen/SlotIndexes.h - Slot indexes representation -*- 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 // //===----------------------------------------------------------------------===// // // This file implements SlotIndex and related classes. The purpose of SlotIndex // is to describe a position at which a register can become live, or cease to // be live. // // SlotIndex is mostly a proxy for entries of the SlotIndexList, a class which // is held is LiveIntervals and provides the real numbering. This allows // LiveIntervals to perform largely transparent renumbering. //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_SLOTINDEXES_H #define LLVM_CODEGEN_SLOTINDEXES_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntervalMap.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/simple_ilist.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrBundle.h" #include "llvm/CodeGen/MachinePassManager.h" #include "llvm/Support/Allocator.h" #include <algorithm> #include <cassert> #include <iterator> #include <utility> namespace llvm { class raw_ostream; /// This class represents an entry in the slot index list held in the /// SlotIndexes pass. It should not be used directly. See the /// SlotIndex & SlotIndexes classes for the public interface to this /// information. class IndexListEntry : public ilist_node<IndexListEntry> { … }; /// SlotIndex - An opaque wrapper around machine indexes. class SlotIndex { … }; inline raw_ostream& operator<<(raw_ostream &os, SlotIndex li) { … } IdxMBBPair; /// SlotIndexes pass. /// /// This pass assigns indexes to each instruction. class SlotIndexes { … }; // Specialize IntervalMapInfo for half-open slot index intervals. template <> struct IntervalMapInfo<SlotIndex> : IntervalMapHalfOpenInfo<SlotIndex> { … }; class SlotIndexesAnalysis : public AnalysisInfoMixin<SlotIndexesAnalysis> { … }; class SlotIndexesPrinterPass : public PassInfoMixin<SlotIndexesPrinterPass> { … }; class SlotIndexesWrapperPass : public MachineFunctionPass { … }; } // end namespace llvm #endif // LLVM_CODEGEN_SLOTINDEXES_H