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/CodeGen/LiveIntervalAnalysis.h"
14 #include "llvm/CodeGen/MachineFunction.h"
15 #include "VirtRegMap.h"
19 /// VirtRegRewriter interface: Implementations of this interface assign
20 /// spilled virtual registers to stack slots, rewriting the code.
21 struct VirtRegRewriter
{
22 virtual ~VirtRegRewriter();
23 virtual bool runOnMachineFunction(MachineFunction
&MF
, VirtRegMap
&VRM
,
24 LiveIntervals
* LIs
) = 0;
27 /// createVirtRegRewriter - Create an return a rewriter object, as specified
28 /// on the command line.
29 VirtRegRewriter
* createVirtRegRewriter();