Spiller.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #ifndef LLVM_LIB_CODEGEN_SPILLER_H
  10. #define LLVM_LIB_CODEGEN_SPILLER_H
  11. namespace llvm {
  12. class LiveRangeEdit;
  13. class MachineFunction;
  14. class MachineFunctionPass;
  15. class VirtRegMap;
  16. /// Spiller interface.
  17. ///
  18. /// Implementations are utility classes which insert spill or remat code on
  19. /// demand.
  20. class Spiller {
  21. virtual void anchor();
  22. public:
  23. virtual ~Spiller() = 0;
  24. /// spill - Spill the LRE.getParent() live interval.
  25. virtual void spill(LiveRangeEdit &LRE) = 0;
  26. };
  27. /// Create and return a spiller that will insert spill code directly instead
  28. /// of deferring though VirtRegMap.
  29. Spiller *createInlineSpiller(MachineFunctionPass &pass,
  30. MachineFunction &mf,
  31. VirtRegMap &vrm);
  32. }
  33. #endif