1 //===-- llvm/CodeGen/VirtRegRewriter.h - VirtRegRewriter -*- C++ -*--------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CODEGEN_VIRTREGREWRITER_H
11 #define LLVM_CODEGEN_VIRTREGREWRITER_H
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"
37 /// VirtRegRewriter interface: Implementations of this interface assign
38 /// spilled virtual registers to stack slots, rewriting the code.
39 struct VirtRegRewriter
{
40 virtual ~VirtRegRewriter();
41 virtual bool runOnMachineFunction(MachineFunction
&MF
, VirtRegMap
&VRM
,
42 LiveIntervals
* LIs
) = 0;
45 /// createVirtRegRewriter - Create an return a rewriter object, as specified
46 /// on the command line.
47 VirtRegRewriter
* createVirtRegRewriter();