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
16 class MachineFunction
;
17 class MachineFunctionPass
;
19 template <typename T
> class SmallVectorImpl
;
22 /// Spiller interface.
24 /// Implementations are utility classes which insert spill or remat code on
28 virtual ~Spiller() = 0;
30 /// spill - Spill the given live interval. The method used will depend on
31 /// the Spiller implementation selected.
33 /// @param li The live interval to be spilled.
34 /// @param spillIs A list of intervals that are about to be spilled,
35 /// and so cannot be used for remat etc.
36 /// @param newIntervals The newly created intervals will be appended here.
37 virtual void spill(LiveInterval
*li
,
38 SmallVectorImpl
<LiveInterval
*> &newIntervals
,
39 SmallVectorImpl
<LiveInterval
*> &spillIs
) = 0;
43 /// Create and return a spiller object, as specified on the command line.
44 Spiller
* createSpiller(MachineFunctionPass
&pass
,