1
//===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===//
3
// The LLVM Compiler Infrastructure
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
8
//===----------------------------------------------------------------------===//
10
#ifndef LLVM_CODEGEN_SPILLER_H
11
#define LLVM_CODEGEN_SPILLER_H
13
#include "llvm/ADT/SmallVector.h"
21
class MachineFunction;
23
class MachineLoopInfo;
28
/// Spiller interface.
30
/// Implementations are utility classes which insert spill or remat code on
34
virtual ~Spiller() = 0;
36
/// Spill the given live range. The method used will depend on the Spiller
37
/// implementation selected.
38
virtual std::vector<LiveInterval*> spill(LiveInterval *li,
39
SmallVectorImpl<LiveInterval*> &spillIs,
40
SlotIndex *earliestIndex = 0) = 0;
44
/// Create and return a spiller object, as specified on the command line.
45
Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li,
46
const MachineLoopInfo *loopInfo, VirtRegMap *vrm);