2009-06-02 13:52:33 -04:00
|
|
|
//===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===//
|
|
|
|
|
//
|
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
|
//
|
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2015-01-18 11:17:27 -05:00
|
|
|
#ifndef LLVM_LIB_CODEGEN_SPILLER_H
|
|
|
|
|
#define LLVM_LIB_CODEGEN_SPILLER_H
|
2009-06-02 13:52:33 -04:00
|
|
|
|
|
|
|
|
namespace llvm {
|
2009-06-22 04:08:12 -04:00
|
|
|
|
2011-05-02 15:34:44 -04:00
|
|
|
class LiveRangeEdit;
|
2009-06-02 13:52:33 -04:00
|
|
|
class MachineFunction;
|
2010-09-17 11:48:55 -04:00
|
|
|
class MachineFunctionPass;
|
2009-06-02 13:52:33 -04:00
|
|
|
class VirtRegMap;
|
2016-07-23 16:41:05 -04:00
|
|
|
class LiveIntervals;
|
2009-06-02 13:52:33 -04:00
|
|
|
|
|
|
|
|
/// Spiller interface.
|
|
|
|
|
///
|
|
|
|
|
/// Implementations are utility classes which insert spill or remat code on
|
|
|
|
|
/// demand.
|
|
|
|
|
class Spiller {
|
2012-04-14 09:54:10 -04:00
|
|
|
virtual void anchor();
|
2009-06-02 13:52:33 -04:00
|
|
|
public:
|
|
|
|
|
virtual ~Spiller() = 0;
|
2009-06-22 04:08:12 -04:00
|
|
|
|
2011-05-02 15:34:44 -04:00
|
|
|
/// spill - Spill the LRE.getParent() live interval.
|
|
|
|
|
virtual void spill(LiveRangeEdit &LRE) = 0;
|
2016-07-23 16:41:05 -04:00
|
|
|
virtual void postOptimization(){};
|
2009-06-02 13:52:33 -04:00
|
|
|
};
|
|
|
|
|
|
2011-02-20 07:57:14 -05:00
|
|
|
/// Create and return a spiller that will insert spill code directly instead
|
|
|
|
|
/// of deferring though VirtRegMap.
|
|
|
|
|
Spiller *createInlineSpiller(MachineFunctionPass &pass,
|
|
|
|
|
MachineFunction &mf,
|
|
|
|
|
VirtRegMap &vrm);
|
2015-07-05 10:21:36 -04:00
|
|
|
}
|
2009-06-02 13:52:33 -04:00
|
|
|
|
|
|
|
|
#endif
|