Eliminate more special cases for opcodes.
[oota-llvm.git] / lib / CodeGen / VirtRegRewriter.h
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 #include "llvm/Target/TargetRegisterInfo.h"
14 #include "llvm/ADT/BitVector.h"
15 #include "llvm/ADT/IndexedMap.h"
16 #include "llvm/ADT/SmallPtrSet.h"
17 #include "llvm/ADT/SmallVector.h"
18 #include "llvm/Support/Streams.h"
19 #include "llvm/Function.h"
20 #include "llvm/CodeGen/LiveIntervalAnalysis.h"
21 #include "llvm/CodeGen/MachineFrameInfo.h"
22 #include "llvm/CodeGen/MachineFunction.h"
23 #include "llvm/CodeGen/MachineInstrBuilder.h"
24 #include "llvm/CodeGen/MachineRegisterInfo.h"
25 #include "llvm/Target/TargetMachine.h"
26 #include "llvm/Target/TargetInstrInfo.h"
27 #include "llvm/Support/CommandLine.h"
28 #include "llvm/Support/Debug.h"
29 #include "llvm/ADT/BitVector.h"
30 #include "llvm/ADT/DenseMap.h"
31 #include "llvm/ADT/SmallSet.h"
32 #include "VirtRegMap.h"
33 #include <map>
34
35 // TODO:
36 //       - Finish renaming Spiller -> Rewriter
37 //         - SimpleSpiller
38 //         - LocalSpiller
39
40 namespace llvm {
41   
42   /// VirtRegRewriter interface: Implementations of this interface assign
43   /// spilled virtual registers to stack slots, rewriting the code.
44   struct VirtRegRewriter {
45     virtual ~VirtRegRewriter();
46     virtual bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM,
47                                       LiveIntervals* LIs) = 0;
48   };
49
50   /// createVirtRegRewriter - Create an return a rewriter object, as specified
51   /// on the command line.
52   VirtRegRewriter* createVirtRegRewriter();
53
54 }
55
56 #endif