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 13193323Sednamespace llvm { 14194612Sed 15221345Sdim class LiveRangeEdit; 16193323Sed class MachineFunction; 17212904Sdim class MachineFunctionPass; 18193323Sed class VirtRegMap; 19193323Sed 20193323Sed /// Spiller interface. 21193323Sed /// 22193323Sed /// Implementations are utility classes which insert spill or remat code on 23193323Sed /// demand. 24193323Sed class Spiller { 25234353Sdim virtual void anchor(); 26193323Sed public: 27193323Sed virtual ~Spiller() = 0; 28194612Sed 29221345Sdim /// spill - Spill the LRE.getParent() live interval. 30221345Sdim virtual void spill(LiveRangeEdit &LRE) = 0; 31194612Sed 32193323Sed }; 33193323Sed 34193323Sed /// Create and return a spiller object, as specified on the command line. 35212904Sdim Spiller* createSpiller(MachineFunctionPass &pass, 36212904Sdim MachineFunction &mf, 37212904Sdim VirtRegMap &vrm); 38218893Sdim 39218893Sdim /// Create and return a spiller that will insert spill code directly instead 40218893Sdim /// of deferring though VirtRegMap. 41218893Sdim Spiller *createInlineSpiller(MachineFunctionPass &pass, 42218893Sdim MachineFunction &mf, 43218893Sdim VirtRegMap &vrm); 44218893Sdim 45193323Sed} 46193323Sed 47193323Sed#endif 48