blob: e838508810228b8b71a092037aeb90e88863c1dd [file] [log] [blame]
Lang Hamese2b201b2009-05-18 19:03:16 +00001//===-- 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 {
Bill Wendling76838062009-05-19 17:50:18 +000016 struct LiveInterval;
Lang Hamese2b201b2009-05-18 19:03:16 +000017
18 /// Spiller interface.
19 ///
20 /// Implementations are utility classes which insert spill or remat code on
21 /// demand.
22 class Spiller {
23 public:
24 virtual ~Spiller() = 0;
Bill Wendling0bde89e2009-05-19 17:51:26 +000025 virtual std::vector<LiveInterval*> spill(LiveInterval *li) = 0;
Lang Hamese2b201b2009-05-18 19:03:16 +000026 };
27
28 /// Create and return a spiller object, as specified on the command line.
Bill Wendling0bde89e2009-05-19 17:51:26 +000029 Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li,
30 VirtRegMap *vrm);
Lang Hamese2b201b2009-05-18 19:03:16 +000031}
32
33#endif