@@ -650,18 +650,18 @@ void VectorMessage::getInfo(Type* Ty, uint32_t Align, bool useA32,
650
650
{
651
651
VectorType* VTy = dyn_cast<VectorType>(Ty);
652
652
Type* eTy = VTy ? cast<VectorType>(VTy)->getElementType () : Ty;
653
- unsigned eltSize = m_emitter ->GetScalarTypeSizeInRegister (eTy);
653
+ unsigned eltSize = Shader ->GetScalarTypeSizeInRegister (eTy);
654
654
unsigned nElts = VTy ? (unsigned )cast<IGCLLVM::FixedVectorType>(VTy)->getNumElements () : 1 ;
655
655
// total bytes
656
656
const unsigned TBytes = nElts * eltSize;
657
657
658
658
// Per-channel Max Bytes (MB) that can be read/written by a single send inst
659
659
unsigned MB;
660
- SIMDMode SM = m_emitter-> m_currShader ->m_SIMDSize ;
660
+ SIMDMode SM = Shader ->m_SIMDSize ;
661
661
bool has_8B_A64_BS =
662
- m_emitter-> m_currShader ->m_Platform ->has8ByteA64ByteScatteredMessage ();
662
+ Shader ->m_Platform ->has8ByteA64ByteScatteredMessage ();
663
663
bool has_8DW_A64_SM =
664
- m_emitter-> m_currShader ->m_Platform ->has8DWA64ScatteredMessage ();
664
+ Shader ->m_Platform ->has8DWA64ScatteredMessage ();
665
665
666
666
//
667
667
// Set up default message and the data type of the message
@@ -770,12 +770,11 @@ void VectorMessage::getInfo(Type* Ty, uint32_t Align, bool useA32,
770
770
void VectorMessage::getLSCInfo (llvm::Type* Ty, uint32_t Align, CodeGenContext* ctx, bool useA32, bool transpose)
771
771
{
772
772
IGC_ASSERT (nullptr != ctx);
773
- IGC_ASSERT (nullptr != m_emitter);
774
- IGC_ASSERT (nullptr != m_emitter->m_currShader );
773
+ IGC_ASSERT (nullptr != Shader);
775
774
776
775
IGCLLVM::FixedVectorType* VTy = dyn_cast<IGCLLVM::FixedVectorType>(Ty);
777
776
Type* eTy = VTy ? VTy->getContainedType (0 ) : Ty;
778
- unsigned eltSize = m_emitter ->GetScalarTypeSizeInRegister (eTy);
777
+ unsigned eltSize = Shader ->GetScalarTypeSizeInRegister (eTy);
779
778
unsigned nElts = VTy ? (unsigned )VTy->getNumElements () : 1 ;
780
779
// total bytes
781
780
const unsigned TBytes = nElts * eltSize;
@@ -788,7 +787,7 @@ void VectorMessage::getLSCInfo(llvm::Type* Ty, uint32_t Align, CodeGenContext* c
788
787
uint16_t blkInBytes = (uint16_t )CEncoder::GetCISADataTypeSize (dataType);
789
788
790
789
// Per-channel Max Bytes (MB) that can be read/written by a single send inst
791
- const unsigned int numLanesForSIMDSize = numLanes (m_emitter-> m_currShader ->m_SIMDSize );
790
+ const unsigned int numLanesForSIMDSize = numLanes (Shader ->m_SIMDSize );
792
791
IGC_ASSERT (numLanesForSIMDSize);
793
792
unsigned int MB = (8 * ctx->platform .getGRFSize ()) / numLanesForSIMDSize;
794
793
if (Align < 4 || (eltSize == 8 && Align < 8 )) {
@@ -863,3 +862,4 @@ void VectorMessage::getLSCInfo(llvm::Type* Ty, uint32_t Align, CodeGenContext* c
863
862
IGC_ASSERT_MESSAGE (numInsts <= (sizeof (insts) / sizeof (*insts)), " Vector's size is too big, increase MAX_VECMESSAGEINFO_LEN to fix it!" );
864
863
}
865
864
865
+ VectorMessage::VectorMessage (EmitPass* emitter) : Shader(emitter->m_currShader) {}
0 commit comments