LLVM API Documentation

VirtRegRewriter.h

Go to the documentation of this file.
00001 //===-- llvm/CodeGen/VirtRegRewriter.h - VirtRegRewriter -*- C++ -*--------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_CODEGEN_VIRTREGREWRITER_H
00011 #define LLVM_CODEGEN_VIRTREGREWRITER_H
00012 
00013 #include "llvm/Target/TargetRegisterInfo.h"
00014 #include "llvm/ADT/BitVector.h"
00015 #include "llvm/ADT/IndexedMap.h"
00016 #include "llvm/ADT/SmallPtrSet.h"
00017 #include "llvm/ADT/SmallVector.h"
00018 #include "llvm/Support/Streams.h"
00019 #include "llvm/Function.h"
00020 #include "llvm/CodeGen/LiveIntervalAnalysis.h"
00021 #include "llvm/CodeGen/MachineFrameInfo.h"
00022 #include "llvm/CodeGen/MachineFunction.h"
00023 #include "llvm/CodeGen/MachineInstrBuilder.h"
00024 #include "llvm/CodeGen/MachineRegisterInfo.h"
00025 #include "llvm/Target/TargetMachine.h"
00026 #include "llvm/Target/TargetInstrInfo.h"
00027 #include "llvm/Support/CommandLine.h"
00028 #include "llvm/Support/Debug.h"
00029 #include "llvm/ADT/BitVector.h"
00030 #include "llvm/ADT/DenseMap.h"
00031 #include "llvm/ADT/SmallSet.h"
00032 #include "VirtRegMap.h"
00033 #include <map>
00034 
00035 namespace llvm {
00036   
00037   /// VirtRegRewriter interface: Implementations of this interface assign
00038   /// spilled virtual registers to stack slots, rewriting the code.
00039   struct VirtRegRewriter {
00040     virtual ~VirtRegRewriter();
00041     virtual bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM,
00042                                       LiveIntervals* LIs) = 0;
00043   };
00044 
00045   /// createVirtRegRewriter - Create an return a rewriter object, as specified
00046   /// on the command line.
00047   VirtRegRewriter* createVirtRegRewriter();
00048 
00049 }
00050 
00051 #endif