WarnMissedTransforms.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- WarnMissedTransforms.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. // Emit warnings if forced code transformations have not been performed.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_TRANSFORMS_SCALAR_WARNMISSEDTRANSFORMS_H
  18. #define LLVM_TRANSFORMS_SCALAR_WARNMISSEDTRANSFORMS_H
  19. #include "llvm/IR/PassManager.h"
  20. namespace llvm {
  21. class Function;
  22. class Pass;
  23. class PassRegistry;
  24. // New pass manager boilerplate.
  25. class WarnMissedTransformationsPass
  26. : public PassInfoMixin<WarnMissedTransformationsPass> {
  27. public:
  28. explicit WarnMissedTransformationsPass() = default;
  29. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  30. };
  31. // Legacy pass manager boilerplate.
  32. Pass *createWarnMissedTransformationsPass();
  33. void initializeWarnMissedTransformationsLegacyPass(PassRegistry &);
  34. } // end namespace llvm
  35. #endif // LLVM_TRANSFORMS_SCALAR_WARNMISSEDTRANSFORMS_H
  36. #ifdef __GNUC__
  37. #pragma GCC diagnostic pop
  38. #endif