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 | #include "llvm/CodeGen/LiveIntervalAnalysis.h" |
Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 14 | #include "llvm/CodeGen/MachineFunction.h" |
Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 15 | #include "VirtRegMap.h" |
Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 16 | |
Lang Hames | 87e3bca | 2009-05-06 02:36:21 +0000 | [diff] [blame] | 17 | namespace llvm { |
| 18 | |
| 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; |
| 25 | }; |
| 26 | |
| 27 | /// createVirtRegRewriter - Create an return a rewriter object, as specified |
| 28 | /// on the command line. |
| 29 | VirtRegRewriter* createVirtRegRewriter(); |
| 30 | |
| 31 | } |
| 32 | |
| 33 | #endif |