1 //===- llvm/CodeGen/Spiller.h - Spiller -------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_CODEGEN_SPILLER_H
10 #define LLVM_LIB_CODEGEN_SPILLER_H
15 class MachineFunction
;
16 class MachineFunctionPass
;
19 /// Spiller interface.
21 /// Implementations are utility classes which insert spill or remat code on
24 virtual void anchor();
27 virtual ~Spiller() = 0;
29 /// spill - Spill the LRE.getParent() live interval.
30 virtual void spill(LiveRangeEdit
&LRE
) = 0;
32 virtual void postOptimization() {}
35 /// Create and return a spiller that will insert spill code directly instead
36 /// of deferring though VirtRegMap.
37 Spiller
*createInlineSpiller(MachineFunctionPass
&pass
,
41 } // end namespace llvm
43 #endif // LLVM_LIB_CODEGEN_SPILLER_H