• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- llvm/CodeGen/VirtRegRewriter.h - VirtRegRewriter -*- C++ -*--------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CODEGEN_VIRTREGREWRITER_H
11 #define LLVM_CODEGEN_VIRTREGREWRITER_H
12 
13 namespace llvm {
14   class LiveIntervals;
15   class MachineFunction;
16   class VirtRegMap;
17 
18   /// VirtRegRewriter interface: Implementations of this interface assign
19   /// spilled virtual registers to stack slots, rewriting the code.
20   struct VirtRegRewriter {
21     virtual ~VirtRegRewriter();
22     virtual bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM,
23                                       LiveIntervals* LIs) = 0;
24   };
25 
26   /// createVirtRegRewriter - Create an return a rewriter object, as specified
27   /// on the command line.
28   VirtRegRewriter* createVirtRegRewriter();
29 
30 }
31 
32 #endif
33