Scalarizer.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- Scalarizer.h --- Scalarize vector operations -----------------------===//
  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 pass converts vector operations into scalar operations, in order
  16. /// to expose optimization opportunities on the individual scalar operations.
  17. /// It is mainly intended for targets that do not have vector units, but it
  18. /// may also be useful for revectorizing code to different vector widths.
  19. //
  20. //===----------------------------------------------------------------------===//
  21. #ifndef LLVM_TRANSFORMS_SCALAR_SCALARIZER_H
  22. #define LLVM_TRANSFORMS_SCALAR_SCALARIZER_H
  23. #include "llvm/IR/PassManager.h"
  24. #include "llvm/Pass.h"
  25. namespace llvm {
  26. class ScalarizerPass : public PassInfoMixin<ScalarizerPass> {
  27. public:
  28. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  29. };
  30. /// Create a legacy pass manager instance of the Scalarizer pass
  31. FunctionPass *createScalarizerPass();
  32. }
  33. #endif /* LLVM_TRANSFORMS_SCALAR_SCALARIZER_H */
  34. #ifdef __GNUC__
  35. #pragma GCC diagnostic pop
  36. #endif