RewriteStatepointsForGC.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- RewriteStatepointsForGC.h - ------------------------------*- 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. //
  14. // This file provides interface to "Rewrite Statepoints for GC" pass.
  15. //
  16. // This passe rewrites call/invoke instructions so as to make potential
  17. // relocations performed by the garbage collector explicit in the IR.
  18. //
  19. //===----------------------------------------------------------------------===//
  20. #ifndef LLVM_TRANSFORMS_SCALAR_REWRITESTATEPOINTSFORGC_H
  21. #define LLVM_TRANSFORMS_SCALAR_REWRITESTATEPOINTSFORGC_H
  22. #include "llvm/IR/PassManager.h"
  23. namespace llvm {
  24. class DominatorTree;
  25. class Function;
  26. class Module;
  27. class TargetTransformInfo;
  28. class TargetLibraryInfo;
  29. struct RewriteStatepointsForGC : public PassInfoMixin<RewriteStatepointsForGC> {
  30. PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
  31. bool runOnFunction(Function &F, DominatorTree &, TargetTransformInfo &,
  32. const TargetLibraryInfo &);
  33. };
  34. } // namespace llvm
  35. #endif // LLVM_TRANSFORMS_SCALAR_REWRITESTATEPOINTSFORGC_H
  36. #ifdef __GNUC__
  37. #pragma GCC diagnostic pop
  38. #endif