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_CODEGEN_SPILLER_H 00011 #define LLVM_CODEGEN_SPILLER_H 00012 00013 #include <vector> 00014 00015 namespace llvm { 00016 00017 class LiveInterval; 00018 class LiveIntervals; 00019 class LiveStacks; 00020 class MachineFunction; 00021 class MachineInstr; 00022 class VirtRegMap; 00023 class VNInfo; 00024 00025 /// Spiller interface. 00026 /// 00027 /// Implementations are utility classes which insert spill or remat code on 00028 /// demand. 00029 class Spiller { 00030 public: 00031 virtual ~Spiller() = 0; 00032 00033 /// Spill the given live range. The method used will depend on the Spiller 00034 /// implementation selected. 00035 virtual std::vector<LiveInterval*> spill(LiveInterval *li) = 0; 00036 00037 /// Intra-block split. 00038 virtual std::vector<LiveInterval*> intraBlockSplit(LiveInterval *li, 00039 VNInfo *valno) = 0; 00040 00041 }; 00042 00043 /// Create and return a spiller object, as specified on the command line. 00044 Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, 00045 LiveStacks *ls, VirtRegMap *vrm); 00046 } 00047 00048 #endif