RegAllocCommon.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- RegAllocCommon.h - Utilities shared between allocators ---*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_CODEGEN_REGALLOCCOMMON_H
  14. #define LLVM_CODEGEN_REGALLOCCOMMON_H
  15. #include <functional>
  16. namespace llvm {
  17. class TargetRegisterClass;
  18. class TargetRegisterInfo;
  19. typedef std::function<bool(const TargetRegisterInfo &TRI,
  20. const TargetRegisterClass &RC)> RegClassFilterFunc;
  21. /// Default register class filter function for register allocation. All virtual
  22. /// registers should be allocated.
  23. static inline bool allocateAllRegClasses(const TargetRegisterInfo &,
  24. const TargetRegisterClass &) {
  25. return true;
  26. }
  27. }
  28. #endif // LLVM_CODEGEN_REGALLOCCOMMON_H
  29. #ifdef __GNUC__
  30. #pragma GCC diagnostic pop
  31. #endif