ComplexDeinterleavingPass.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ComplexDeinterleavingPass.h - Complex Deinterleaving 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 pass implements generation of target-specific intrinsics to support
  15. // handling of complex number arithmetic and deinterleaving.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H
  19. #define LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H
  20. #include "llvm/IR/PassManager.h"
  21. #include "llvm/IR/PatternMatch.h"
  22. namespace llvm {
  23. class Function;
  24. class TargetMachine;
  25. struct ComplexDeinterleavingPass
  26. : public PassInfoMixin<ComplexDeinterleavingPass> {
  27. private:
  28. TargetMachine *TM;
  29. public:
  30. ComplexDeinterleavingPass(TargetMachine *TM) : TM(TM) {}
  31. PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
  32. };
  33. enum class ComplexDeinterleavingOperation {
  34. CAdd,
  35. CMulPartial,
  36. // The following 'operations' are used to represent internal states. Backends
  37. // are not expected to try and support these in any capacity.
  38. Shuffle
  39. };
  40. enum class ComplexDeinterleavingRotation {
  41. Rotation_0 = 0,
  42. Rotation_90 = 1,
  43. Rotation_180 = 2,
  44. Rotation_270 = 3,
  45. };
  46. } // namespace llvm
  47. #endif // LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H
  48. #ifdef __GNUC__
  49. #pragma GCC diagnostic pop
  50. #endif