LLVM  14.0.0git
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_CODEGEN_SPILLER_H
10 #define LLVM_CODEGEN_SPILLER_H
11 
12 namespace llvm {
13 
14 class LiveRangeEdit;
15 class MachineFunction;
16 class MachineFunctionPass;
17 class VirtRegMap;
18 class VirtRegAuxInfo;
19 
20 /// Spiller interface.
21 ///
22 /// Implementations are utility classes which insert spill or remat code on
23 /// demand.
24 class Spiller {
25  virtual void anchor();
26 
27 public:
28  virtual ~Spiller() = 0;
29 
30  /// spill - Spill the LRE.getParent() live interval.
31  virtual void spill(LiveRangeEdit &LRE) = 0;
32 
33  virtual void postOptimization() {}
34 };
35 
36 /// Create and return a spiller that will insert spill code directly instead
37 /// of deferring though VirtRegMap.
38 Spiller *createInlineSpiller(MachineFunctionPass &Pass, MachineFunction &MF,
39  VirtRegMap &VRM, VirtRegAuxInfo &VRAI);
40 
41 } // end namespace llvm
42 
43 #endif // LLVM_CODEGEN_SPILLER_H
llvm::Spiller
Spiller interface.
Definition: Spiller.h:24
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
Pass
print lazy value Lazy Value Info Printer Pass
Definition: LazyValueInfo.cpp:1966
llvm::createInlineSpiller
Spiller * createInlineSpiller(MachineFunctionPass &Pass, MachineFunction &MF, VirtRegMap &VRM, VirtRegAuxInfo &VRAI)
Create and return a spiller that will insert spill code directly instead of deferring though VirtRegM...
Definition: InlineSpiller.cpp:246
llvm::Spiller::spill
virtual void spill(LiveRangeEdit &LRE)=0
spill - Spill the LRE.getParent() live interval.
llvm::LiveRangeEdit
Definition: LiveRangeEdit.h:46
llvm::Spiller::~Spiller
virtual ~Spiller()=0
llvm::Spiller::postOptimization
virtual void postOptimization()
Definition: Spiller.h:33