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
15 class MachineFunction
;
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;
26 /// createVirtRegRewriter - Create an return a rewriter object, as specified
27 /// on the command line.
28 VirtRegRewriter
* createVirtRegRewriter();