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"
| 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;
| 14 15namespace llvm { 16 17 class LiveInterval;
|
19 class LiveIntervals; 20 class LiveStacks;
| |
21 class MachineFunction;
| 18 class MachineFunction;
|
22 class MachineInstr; 23 class MachineLoopInfo;
| 19 class MachineFunctionPass;
|
24 class SlotIndex; 25 class VirtRegMap;
| 20 class SlotIndex; 21 class VirtRegMap;
|
26 class VNInfo;
| |
27 28 /// Spiller interface. 29 /// 30 /// Implementations are utility classes which insert spill or remat code on 31 /// demand. 32 class Spiller { 33 public: 34 virtual ~Spiller() = 0; 35 36 /// spill - Spill the given live interval. The method used will depend on 37 /// the Spiller implementation selected. 38 /// 39 /// @param li The live interval to be spilled. 40 /// @param spillIs A list of intervals that are about to be spilled, 41 /// and so cannot be used for remat etc. 42 /// @param newIntervals The newly created intervals will be appended here.
| 22 23 /// Spiller interface. 24 /// 25 /// Implementations are utility classes which insert spill or remat code on 26 /// demand. 27 class Spiller { 28 public: 29 virtual ~Spiller() = 0; 30 31 /// spill - Spill the given live interval. The method used will depend on 32 /// the Spiller implementation selected. 33 /// 34 /// @param li The live interval to be spilled. 35 /// @param spillIs A list of intervals that are about to be spilled, 36 /// and so cannot be used for remat etc. 37 /// @param newIntervals The newly created intervals will be appended here.
|
43 /// @param earliestIndex The earliest point for splitting. (OK, it's another 44 /// pointer to the allocator guts).
| |
45 virtual void spill(LiveInterval *li,
| 38 virtual void spill(LiveInterval *li,
|
46 std::vector<LiveInterval*> &newIntervals, 47 SmallVectorImpl<LiveInterval*> &spillIs, 48 SlotIndex *earliestIndex = 0) = 0;
| 39 SmallVectorImpl<LiveInterval*> &newIntervals, 40 SmallVectorImpl<LiveInterval*> &spillIs) = 0;
|
49 50 }; 51 52 /// Create and return a spiller object, as specified on the command line.
| 41 42 }; 43 44 /// Create and return a spiller object, as specified on the command line.
|
53 Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, 54 const MachineLoopInfo *loopInfo, VirtRegMap *vrm);
| 45 Spiller* createSpiller(MachineFunctionPass &pass, 46 MachineFunction &mf, 47 VirtRegMap &vrm);
|
55} 56 57#endif
| 48} 49 50#endif
|