1 | //===- ComplexDeinterleavingPass.h - Complex Deinterleaving Pass *- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This pass implements generation of target-specific intrinsics to support |
10 | // handling of complex number arithmetic and deinterleaving. |
11 | // |
12 | //===----------------------------------------------------------------------===// |
13 | |
14 | #ifndef LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H |
15 | #define LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H |
16 | |
17 | #include "llvm/IR/PassManager.h" |
18 | |
19 | namespace llvm { |
20 | |
21 | class Function; |
22 | class TargetMachine; |
23 | |
24 | struct ComplexDeinterleavingPass |
25 | : public PassInfoMixin<ComplexDeinterleavingPass> { |
26 | private: |
27 | TargetMachine *TM; |
28 | |
29 | public: |
30 | ComplexDeinterleavingPass(TargetMachine *TM) : TM(TM) {} |
31 | |
32 | PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); |
33 | }; |
34 | |
35 | enum class ComplexDeinterleavingOperation { |
36 | CAdd, |
37 | CMulPartial, |
38 | // The following 'operations' are used to represent internal states. Backends |
39 | // are not expected to try and support these in any capacity. |
40 | Deinterleave, |
41 | Splat, |
42 | Symmetric, |
43 | ReductionPHI, |
44 | ReductionOperation, |
45 | ReductionSelect, |
46 | }; |
47 | |
48 | enum class ComplexDeinterleavingRotation { |
49 | Rotation_0 = 0, |
50 | Rotation_90 = 1, |
51 | Rotation_180 = 2, |
52 | Rotation_270 = 3, |
53 | }; |
54 | |
55 | } // namespace llvm |
56 | |
57 | #endif // LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H |
58 | |