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 CDot, 39 // The following 'operations' are used to represent internal states. Backends 40 // are not expected to try and support these in any capacity. 41 Deinterleave, 42 Splat, 43 Symmetric, 44 ReductionPHI, 45 ReductionOperation, 46 ReductionSelect, 47 ReductionSingle 48 }; 49 50 enum class ComplexDeinterleavingRotation { 51 Rotation_0 = 0, 52 Rotation_90 = 1, 53 Rotation_180 = 2, 54 Rotation_270 = 3, 55 }; 56 57 } // namespace llvm 58 59 #endif // LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H 60