LoopLoadElimination.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- LoopLoadElimination.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. /// \file
  15. /// This header defines the LoopLoadEliminationPass object. This pass forwards
  16. /// loaded values around loop backedges to allow their use in subsequent
  17. /// iterations.
  18. //
  19. //===----------------------------------------------------------------------===//
  20. #ifndef LLVM_TRANSFORMS_SCALAR_LOOPLOADELIMINATION_H
  21. #define LLVM_TRANSFORMS_SCALAR_LOOPLOADELIMINATION_H
  22. #include "llvm/IR/PassManager.h"
  23. namespace llvm {
  24. class Function;
  25. /// Pass to forward loads in a loop around the backedge to subsequent
  26. /// iterations.
  27. struct LoopLoadEliminationPass : public PassInfoMixin<LoopLoadEliminationPass> {
  28. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  29. };
  30. } // end namespace llvm
  31. #endif // LLVM_TRANSFORMS_SCALAR_LOOPLOADELIMINATION_H
  32. #ifdef __GNUC__
  33. #pragma GCC diagnostic pop
  34. #endif