LoopSimplifyCFG.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- LoopSimplifyCFG.cpp - Loop CFG Simplification Pass -------*- 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 implements the Loop SimplifyCFG Pass. This pass is responsible for
  15. // basic loop CFG cleanup, primarily to assist other loop passes. If you
  16. // encounter a noncanonical CFG construct that causes another loop pass to
  17. // perform suboptimally, this is the place to fix it up.
  18. //
  19. //===----------------------------------------------------------------------===//
  20. #ifndef LLVM_TRANSFORMS_SCALAR_LOOPSIMPLIFYCFG_H
  21. #define LLVM_TRANSFORMS_SCALAR_LOOPSIMPLIFYCFG_H
  22. #include "llvm/Analysis/LoopAnalysisManager.h"
  23. #include "llvm/IR/PassManager.h"
  24. namespace llvm {
  25. class LPMUpdater;
  26. class Loop;
  27. /// Performs basic CFG simplifications to assist other loop passes.
  28. class LoopSimplifyCFGPass : public PassInfoMixin<LoopSimplifyCFGPass> {
  29. public:
  30. PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
  31. LoopStandardAnalysisResults &AR, LPMUpdater &U);
  32. };
  33. } // end namespace llvm
  34. #endif // LLVM_TRANSFORMS_SCALAR_LOOPSIMPLIFYCFG_H
  35. #ifdef __GNUC__
  36. #pragma GCC diagnostic pop
  37. #endif