Spiller.h revision 193323
1193323Sed//===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed 10193323Sed#ifndef LLVM_CODEGEN_SPILLER_H 11193323Sed#define LLVM_CODEGEN_SPILLER_H 12193323Sed 13193323Sed#include <vector> 14193323Sed 15193323Sednamespace llvm { 16193323Sed class LiveInterval; 17193323Sed class LiveIntervals; 18193323Sed class LiveStacks; 19193323Sed class MachineFunction; 20193323Sed class VirtRegMap; 21193323Sed 22193323Sed /// Spiller interface. 23193323Sed /// 24193323Sed /// Implementations are utility classes which insert spill or remat code on 25193323Sed /// demand. 26193323Sed class Spiller { 27193323Sed public: 28193323Sed virtual ~Spiller() = 0; 29193323Sed virtual std::vector<LiveInterval*> spill(LiveInterval *li) = 0; 30193323Sed }; 31193323Sed 32193323Sed /// Create and return a spiller object, as specified on the command line. 33193323Sed Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, 34193323Sed LiveStacks *ls, VirtRegMap *vrm); 35193323Sed} 36193323Sed 37193323Sed#endif 38