DCE.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- DCE.h - Dead code elimination ----------------------------*- 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 the interface for the Dead Code Elimination pass.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_TRANSFORMS_SCALAR_DCE_H
  18. #define LLVM_TRANSFORMS_SCALAR_DCE_H
  19. #include "llvm/IR/PassManager.h"
  20. namespace llvm {
  21. class Function;
  22. /// Basic Dead Code Elimination pass.
  23. class DCEPass : public PassInfoMixin<DCEPass> {
  24. public:
  25. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  26. };
  27. class RedundantDbgInstEliminationPass
  28. : public PassInfoMixin<RedundantDbgInstEliminationPass> {
  29. public:
  30. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  31. };
  32. }
  33. #endif // LLVM_TRANSFORMS_SCALAR_DCE_H
  34. #ifdef __GNUC__
  35. #pragma GCC diagnostic pop
  36. #endif