blob: 93474e0d7ff73dab36e03d33c9457914a45c83a7 [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
Lang Hames87e3bca2009-05-06 02:36:21 +000013namespace llvm {
Evan Cheng98116f92010-04-06 17:19:55 +000014 class LiveIntervals;
15 class MachineFunction;
16 class VirtRegMap;
Lang Hames87e3bca2009-05-06 02:36:21 +000017
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