blob: f9d7fbbfa1d3ca65179f65c93dc3f92ae6f4a635 [file] [log] [blame]
Lang Hames87e3bca2009-05-06 02:36:21 +00001//===-- 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
Lang Hames87e3bca2009-05-06 02:36:21 +000035namespace llvm {
36
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;
43 };
44
45 /// createVirtRegRewriter - Create an return a rewriter object, as specified
46 /// on the command line.
47 VirtRegRewriter* createVirtRegRewriter();
48
49}
50
51#endif