LLVM  9.0.0svn
Spiller.h
Go to the documentation of this file.
1 //===- llvm/CodeGen/Spiller.h - Spiller -------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_CODEGEN_SPILLER_H
10 #define LLVM_LIB_CODEGEN_SPILLER_H
11 
12 namespace llvm {
13 
14 class LiveRangeEdit;
15 class MachineFunction;
16 class MachineFunctionPass;
17 class VirtRegMap;
18 
19  /// Spiller interface.
20  ///
21  /// Implementations are utility classes which insert spill or remat code on
22  /// demand.
23  class Spiller {
24  virtual void anchor();
25 
26  public:
27  virtual ~Spiller() = 0;
28 
29  /// spill - Spill the LRE.getParent() live interval.
30  virtual void spill(LiveRangeEdit &LRE) = 0;
31 
32  virtual void postOptimization() {}
33  };
34 
35  /// Create and return a spiller that will insert spill code directly instead
36  /// of deferring though VirtRegMap.
38  MachineFunction &mf,
39  VirtRegMap &vrm);
40 
41 } // end namespace llvm
42 
43 #endif // LLVM_LIB_CODEGEN_SPILLER_H
Safe Stack instrumentation pass
Definition: SafeStack.cpp:903
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Spiller interface.
Definition: Spiller.h:23
virtual void spill(LiveRangeEdit &LRE)=0
spill - Spill the LRE.getParent() live interval.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
virtual ~Spiller()=0
Spiller * createInlineSpiller(MachineFunctionPass &pass, MachineFunction &mf, VirtRegMap &vrm)
Create and return a spiller that will insert spill code directly instead of deferring though VirtRegM...
virtual void postOptimization()
Definition: Spiller.h:32