Spiller.h revision 193323
1//===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LLVM_CODEGEN_SPILLER_H 11#define LLVM_CODEGEN_SPILLER_H 12 13#include <vector> 14 15namespace llvm { 16 class LiveInterval; 17 class LiveIntervals; 18 class LiveStacks; 19 class MachineFunction; 20 class VirtRegMap; 21 22 /// Spiller interface. 23 /// 24 /// Implementations are utility classes which insert spill or remat code on 25 /// demand. 26 class Spiller { 27 public: 28 virtual ~Spiller() = 0; 29 virtual std::vector<LiveInterval*> spill(LiveInterval *li) = 0; 30 }; 31 32 /// Create and return a spiller object, as specified on the command line. 33 Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, 34 LiveStacks *ls, VirtRegMap *vrm); 35} 36 37#endif 38