~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/CodeGen/Spiller.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
15
 
namespace llvm {
16
 
 
17
 
  class LiveInterval;
18
 
  class MachineFunction;
19
 
  class MachineFunctionPass;
20
 
  class SlotIndex;
21
 
  class VirtRegMap;
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.
38
 
    virtual void spill(LiveInterval *li,
39
 
                       SmallVectorImpl<LiveInterval*> &newIntervals,
40
 
                       SmallVectorImpl<LiveInterval*> &spillIs) = 0;
41
 
 
42
 
  };
43
 
 
44
 
  /// Create and return a spiller object, as specified on the command line.
45
 
  Spiller* createSpiller(MachineFunctionPass &pass,
46
 
                         MachineFunction &mf,
47
 
                         VirtRegMap &vrm);
48
 
}
49
 
 
50
 
#endif