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 #include "llvm/IR/PatternMatch.h" 19 20 namespace llvm { 21 22 class Function; 23 class TargetMachine; 24 25 struct ComplexDeinterleavingPass 26 : public PassInfoMixin<ComplexDeinterleavingPass> { 27 private: 28 TargetMachine *TM; 29 30 public: ComplexDeinterleavingPassComplexDeinterleavingPass31 ComplexDeinterleavingPass(TargetMachine *TM) : TM(TM) {} 32 33 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); 34 }; 35 36 enum class ComplexDeinterleavingOperation { 37 CAdd, 38 CMulPartial, 39 // The following 'operations' are used to represent internal states. Backends 40 // are not expected to try and support these in any capacity. 41 Shuffle 42 }; 43 44 enum class ComplexDeinterleavingRotation { 45 Rotation_0 = 0, 46 Rotation_90 = 1, 47 Rotation_180 = 2, 48 Rotation_270 = 3, 49 }; 50 51 } // namespace llvm 52 53 #endif // LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H 54