1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2020-2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 #ifndef _INSTSPLIT_H_ 10 #define _INSTSPLIT_H_ 11 12 #include "BuildIR.h" 13 #include "FlowGraph.h" 14 15 namespace vISA 16 { 17 class InstSplitPass 18 { 19 public: 20 InstSplitPass(IR_Builder* builder); 21 void run(); 22 void runOnBB(G4_BB* bb); 23 INST_LIST_ITER splitInstruction(INST_LIST_ITER it, INST_LIST& instList); 24 25 private: 26 bool needSplitByExecSize(G4_ExecSize ExecSize) const; 27 G4_CmpRelation compareSrcDstRegRegion(G4_DstRegRegion* dstRegRegion, G4_Operand* opnd); 28 void computeDstBounds(G4_DstRegRegion* dstRegion, uint32_t& leftBound, uint32_t& rightBound); 29 void computeSrcBounds(G4_SrcRegRegion* srcRegion, uint32_t& leftBound, uint32_t& rightBound); 30 void generateBitMask(G4_Operand* opnd, BitSet& footprint); 31 32 IR_Builder* m_builder; 33 }; 34 } 35 36 #endif 37