LLVM API Documentation
00001 //===-- llvm/CodeGen/Spiller.h - Spiller -*- 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_LIB_CODEGEN_SPILLER_H 00011 #define LLVM_LIB_CODEGEN_SPILLER_H 00012 00013 namespace llvm { 00014 00015 class LiveRangeEdit; 00016 class MachineFunction; 00017 class MachineFunctionPass; 00018 class VirtRegMap; 00019 00020 /// Spiller interface. 00021 /// 00022 /// Implementations are utility classes which insert spill or remat code on 00023 /// demand. 00024 class Spiller { 00025 virtual void anchor(); 00026 public: 00027 virtual ~Spiller() = 0; 00028 00029 /// spill - Spill the LRE.getParent() live interval. 00030 virtual void spill(LiveRangeEdit &LRE) = 0; 00031 00032 }; 00033 00034 /// Create and return a spiller object, as specified on the command line. 00035 Spiller* createSpiller(MachineFunctionPass &pass, 00036 MachineFunction &mf, 00037 VirtRegMap &vrm); 00038 00039 /// Create and return a spiller that will insert spill code directly instead 00040 /// of deferring though VirtRegMap. 00041 Spiller *createInlineSpiller(MachineFunctionPass &pass, 00042 MachineFunction &mf, 00043 VirtRegMap &vrm); 00044 00045 } 00046 00047 #endif