Deleted Added
sdiff udiff text old ( 194612 ) new ( 199511 )
full compact
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 "llvm/ADT/SmallVector.h"
14#include <vector>
15
16namespace llvm {
17
18 class LiveInterval;
19 class LiveIntervals;
20 class LiveStacks;
21 class MachineFunction;
22 class MachineInstr;
23 class MachineLoopInfo;
24 class VirtRegMap;
25 class VNInfo;
26
27 /// Spiller interface.
28 ///
29 /// Implementations are utility classes which insert spill or remat code on
30 /// demand.
31 class Spiller {
32 public:
33 virtual ~Spiller() = 0;
34
35 /// Spill the given live range. The method used will depend on the Spiller
36 /// implementation selected.
37 virtual std::vector<LiveInterval*> spill(LiveInterval *li,
38 SmallVectorImpl<LiveInterval*> &spillIs) = 0;
39
40 };
41
42 /// Create and return a spiller object, as specified on the command line.
43 Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li,
44 LiveStacks *ls, const MachineLoopInfo *loopInfo,
45 VirtRegMap *vrm);
46}
47
48#endif