IndVarSimplify.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- IndVarSimplify.h - Induction Variable Simplification -----*- 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 Induction Variable
  15. // Simplification pass.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H
  19. #define LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H
  20. #include "llvm/Analysis/LoopAnalysisManager.h"
  21. #include "llvm/IR/PassManager.h"
  22. namespace llvm {
  23. class Loop;
  24. class LPMUpdater;
  25. class IndVarSimplifyPass : public PassInfoMixin<IndVarSimplifyPass> {
  26. /// Perform IV widening during the pass.
  27. bool WidenIndVars;
  28. public:
  29. IndVarSimplifyPass(bool WidenIndVars = true) : WidenIndVars(WidenIndVars) {}
  30. PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
  31. LoopStandardAnalysisResults &AR, LPMUpdater &U);
  32. };
  33. } // end namespace llvm
  34. #endif // LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H
  35. #ifdef __GNUC__
  36. #pragma GCC diagnostic pop
  37. #endif