Delinearization.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===---- Delinearization.h - MultiDimensional Index Delinearization ------===//
  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 implements an analysis pass that tries to delinearize all GEP
  15. // instructions in all loops using the SCEV analysis functionality. This pass is
  16. // only used for testing purposes: if your pass needs delinearization, please
  17. // use the on-demand SCEVAddRecExpr::delinearize() function.
  18. //
  19. //===----------------------------------------------------------------------===//
  20. #ifndef LLVM_ANALYSIS_DELINEARIZATION_H
  21. #define LLVM_ANALYSIS_DELINEARIZATION_H
  22. #include "llvm/IR/PassManager.h"
  23. #include "llvm/Support/raw_ostream.h"
  24. namespace llvm {
  25. struct DelinearizationPrinterPass
  26. : public PassInfoMixin<DelinearizationPrinterPass> {
  27. explicit DelinearizationPrinterPass(raw_ostream &OS);
  28. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  29. private:
  30. raw_ostream &OS;
  31. };
  32. } // namespace llvm
  33. #endif // LLVM_ANALYSIS_DELINEARIZATION_H
  34. #ifdef __GNUC__
  35. #pragma GCC diagnostic pop
  36. #endif