Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 1 | //===-- 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 Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 13 | namespace llvm { |
Evan Cheng | 98116f9 | 2010-04-06 17:19:55 +0000 | [diff] [blame] | 14 | class LiveIntervals; |
| 15 | class MachineFunction; |
| 16 | class VirtRegMap; |
Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 17 | |
| 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 |