Lines Matching refs:inst

93     for (auto inst : instList)  in splice()  local
95 inst->setCISAOff(CISAOff); in splice()
176 …auto iter = std::find_if(entryBB->begin(), entryBB->end(), [](G4_INST* inst) { return !inst->isLab… in SpillManagerGRF() argument
232 …auto iter = std::find_if(entryBB->begin(), entryBB->end(), [](G4_INST* inst) { return !inst->isLab… in SpillManagerGRF() argument
883 bool SpillManagerGRF::isComprInst(G4_INST * inst) const in isComprInst()
885 return inst->isComprInst(); in isComprInst()
892 G4_INST * inst) const in isMultiRegComprSource()
894 if (!inst->isComprInst ()) { in isMultiRegComprSource()
900 else if (inst->getExecSize() <= 8) { in isMultiRegComprSource()
907 else if (inst->getExecSize() == 16 && in isMultiRegComprSource()
908 inst->getDst() && in isMultiRegComprSource()
909 inst->getDst()->getTypeSize() == 4 && in isMultiRegComprSource()
910 inst->getDst()->getHorzStride() == 1) in isMultiRegComprSource()
1118 G4_INST * inst) in createTransientGRFRangeDeclare() argument
1165 static unsigned short getSpillRowSizeForSendDst(G4_INST * inst) in getSpillRowSizeForSendDst() argument
1169 auto dst = inst->getDst(); in getSpillRowSizeForSendDst()
1171 if (inst->isSend()) in getSpillRowSizeForSendDst()
1173 G4_SendDesc* msgDesc = inst->getMsgDesc(); in getSpillRowSizeForSendDst()
1242 G4_INST * inst in createSpillRangeDeclare() argument
1249 execSize, inst); in createSpillRangeDeclare()
1257 G4_INST * inst in createGRFFillRangeDeclare() argument
1264 execSize, inst); in createGRFFillRangeDeclare()
1269 G4_INST * inst, in getSpillRowSizeForSendSrc() argument
1274 if (inst->isSend()) in getSpillRowSizeForSendSrc()
1276 G4_SendDesc* msgDesc = inst->getMsgDesc(); in getSpillRowSizeForSendSrc()
1277 if (inst->isSplitSend() && in getSpillRowSizeForSendSrc()
1278 (inst->getSrc(1)->asSrcRegRegion() == filledRegion)) in getSpillRowSizeForSendSrc()
3151 for (auto inst : bb->getInstList()) in updateRMWNeeded() local
3153 inst->setLexicalId(lexId++); in updateRMWNeeded()
3159 for (auto inst : bb->getInstList()) in updateRMWNeeded() local
3161 if (inst->isPseudoKill()) in updateRMWNeeded()
3164 auto dst = inst->getDst(); in updateRMWNeeded()
3199 G4_INST* inst = *spilledInstIter; in insertSpillRangeCode() local
3201 auto spilledRegion = inst->getDst(); in insertSpillRangeCode()
3227 if (inst->mayExceedTwoGRF()) in insertSpillRangeCode()
3241 bool needRMW = inst->isPartialWriteForSpill(!bb->isAllLaneActive()) && in insertSpillRangeCode()
3355 G4_SrcRegRegion* srcRegion = inst->getSrc(0)->asSrcRegRegion(); in insertSpillRangeCode()
3434 if (inst->isRawMov()) in insertSpillRangeCode()
3437 auto it = gra.splitResults.find(inst->getSrc(0)->getTopDcl()); in insertSpillRangeCode()
3469 spillSendInst->setSrc(inst->getSrc(0), pos); in insertSpillRangeCode()
3491 G4_INST* inst = *filledInstIter; in insertFillGRFRangeCode() local
3492 auto dstRegion = inst->getDst(); in insertFillGRFRangeCode()
3524 for (; i < inst->getNumSrc(); ++i) in insertFillGRFRangeCode()
3526 if (inst->getSrc(i) == filledRegion) in insertFillGRFRangeCode()
3531 inst->setSrc(newSrc, i); in insertFillGRFRangeCode()
3569 if (inst->isRawMov()) in insertFillGRFRangeCode()
3836 G4_INST* inst; in insertAddrTakenSpillAndFillCode() local
3847inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenSpillAndFillCode()
3849 bb->insertBefore(inst_it, inst); in insertAddrTakenSpillAndFillCode()
3858inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenSpillAndFillCode()
3860 bb->insertBefore(next_inst_it, inst); in insertAddrTakenSpillAndFillCode()
3889 G4_INST* inst; in insertAddrTakenSpillAndFillCode() local
3917inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenSpillAndFillCode()
3919 bb->insertBefore(inst_it, inst); in insertAddrTakenSpillAndFillCode()
3928inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenSpillAndFillCode()
3930 bb->insertBefore(next_inst_it, inst); in insertAddrTakenSpillAndFillCode()
4035 G4_INST* inst; in insertAddrTakenLSSpillAndFillCode() local
4046inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenLSSpillAndFillCode()
4048 bb->insertBefore(inst_it, inst); in insertAddrTakenLSSpillAndFillCode()
4057inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenLSSpillAndFillCode()
4059 bb->insertBefore(next_inst_it, inst); in insertAddrTakenLSSpillAndFillCode()
4088 G4_INST* inst; in insertAddrTakenLSSpillAndFillCode() local
4116inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenLSSpillAndFillCode()
4118 bb->insertBefore(inst_it, inst); in insertAddrTakenLSSpillAndFillCode()
4127inst = kernel->fg.builder->createMov(curExSize, dstRex, srcRex, InstOpt_WriteEnable, false); in insertAddrTakenLSSpillAndFillCode()
4129 bb->insertBefore(next_inst_it, inst); in insertAddrTakenLSSpillAndFillCode()
4391 for (auto inst : *bb) in runSpillAnalysis()
4393 auto dst = inst->getDst(); in runSpillAnalysis()
4407 …if (inst->opcode() == G4_mov && inst->getExecSize() == g4::SIMD1 && inst->getSrc(0)->isImm() && !i… in runSpillAnalysis()
4409 scalarImmSpill[dcl] = inst->getSrc(0)->asImm(); in runSpillAnalysis()
4468 G4_INST* inst = *jt; in insertSpillFillCode() local
4470 curInst = inst; in insertSpillFillCode()
4480 if (inst->getDst()) in insertSpillFillCode()
4483 if (inst->getDst()->getBase()->isRegVar()) in insertSpillFillCode()
4485 regVar = getRegVar(inst->getDst()); in insertSpillFillCode()
4492 if (inst->isPseudoKill()) in insertSpillFillCode()
4513 if (inst->getSrc(i) && in insertSpillFillCode()
4514 inst->getSrc(i)->isSrcRegRegion ()) in insertSpillFillCode()
4516 auto srcRR = inst->getSrc(i)->asSrcRegRegion(); in insertSpillFillCode()
4525 if (inst->isLifeTimeEnd()) in insertSpillFillCode()
4530 bool mayExceedTwoGRF = (inst->isSend() && i == 0) || in insertSpillFillCode()
4531 inst->isDpas() || in insertSpillFillCode()
4532 (inst->isSplitSend() && i == 1); in insertSpillFillCode()
4683 G4_INST* inst = *jt; in spillLiveRanges() local
4684 unsigned int instID = inst->getLexicalId(); in spillLiveRanges()
4685 curInst = inst; in spillLiveRanges()
4697 if (inst->getDst()) in spillLiveRanges()
4700 if (inst->getDst()->getBase()->isRegVar()) in spillLiveRanges()
4702 regVar = getRegVar(inst->getDst()); in spillLiveRanges()
4721 if (inst->isPseudoKill()) in spillLiveRanges()
4740 if (inst->getSrc(i) && in spillLiveRanges()
4741 inst->getSrc(i)->isSrcRegRegion ()) in spillLiveRanges()
4743 auto srcRR = inst->getSrc(i)->asSrcRegRegion(); in spillLiveRanges()
4764 if (inst->isLifeTimeEnd()) in spillLiveRanges()
4769 bool mayExceedTwoGRF = (inst->isSend() && i == 0) || in spillLiveRanges()
4770 inst->isDpas() || in spillLiveRanges()
4771 (inst->isSplitSend() && i == 1); in spillLiveRanges()
4834 auto usesAddr = [](G4_INST* inst) in saveRestoreA0()
4837 if (inst->isSpillIntrinsic() || inst->isFillIntrinsic()) in saveRestoreA0()
4841 if (inst->getDst() && inst->getDst()->isAddress()) in saveRestoreA0()
4845 for (int i = 0, numSrc = inst->getNumSrc(); i < numSrc; ++i) in saveRestoreA0()
4847 …if (inst->getSrc(i)->isAddress() || (inst->getSrc(i)->isSrcRegRegion() && inst->getSrc(i)->asSrcRe… in saveRestoreA0()
4884 auto isPrologOrEpilog = [this](G4_INST* inst) in saveRestoreA0()
4888 if (inst == kernel.fg.builder->getFDSpillInst()) in saveRestoreA0()
4891 if (calleeSaveInsts.find(inst) != calleeSaveInsts.end() || in saveRestoreA0()
4892 calleeRestoreInsts.find(inst) != calleeRestoreInsts.end()) in saveRestoreA0()
4902 auto inst = (*instIt); in saveRestoreA0() local
4904 if (inst->isSpillIntrinsic() || inst->isFillIntrinsic()) in saveRestoreA0()
4909 if (isPrologOrEpilog(inst)) in saveRestoreA0()
4919 else if (hasActiveSpillFill && usesAddr(inst)) in saveRestoreA0()
5062 auto inst = (*instIt)->asSpillIntrinsic(); in expandSpillLSC() local
5064 auto spillOffset = inst->getOffsetInBytes(); in expandSpillLSC()
5065 uint32_t numRows = inst->getNumRows(); in expandSpillLSC()
5066 auto payload = inst->getSrc(1)->asSrcRegRegion(); in expandSpillLSC()
5084 … G4_Declare* spillAddr = inst->getFP() ? kernel.fg.scratchRegDcl : inst->getHeader()->getTopDcl(); in expandSpillLSC()
5087 createSpillFillAddr(*builder, spillAddr, inst->getFP(), spillOffset); in expandSpillLSC()
5120 inst->getOption(), in expandSpillLSC()
5126 inst->getFP() ? "FP" : "offset", in expandSpillLSC()
5135 if (getEUFusionWAInsts().count(inst) > 0) in expandSpillLSC()
5137 removeEUFusionWAInst(inst); in expandSpillLSC()
5138 for (auto inst : builder->instList) in expandSpillLSC() local
5139 addEUFusionWAInsts(inst); in expandSpillLSC()
5142 splice(bb, instIt, builder->instList, inst->getCISAOff()); in expandSpillLSC()
5148 auto inst = (*instIt)->asFillIntrinsic(); in expandFillLSC() local
5150 auto fillOffset = inst->getOffsetInBytes(); in expandFillLSC()
5151 uint32_t numRows = inst->getNumRows(); in expandFillLSC()
5152 auto rowOffset = inst->getDst()->getRegOff(); in expandFillLSC()
5174 … G4_Declare* fillAddr = inst->getFP() ? kernel.fg.scratchRegDcl : inst->getHeader()->getTopDcl(); in expandFillLSC()
5177 createSpillFillAddr(*builder, fillAddr, inst->getFP(), fillOffset); in expandFillLSC()
5179 auto dstRead = builder->createDst(inst->getDst()->getTopDcl()->getRegVar(), in expandFillLSC()
5203 inst->getOption(), in expandFillLSC()
5209 inst->getFP() ? "FP" : "offset", in expandFillLSC()
5218 if (getEUFusionWAInsts().count(inst) > 0) in expandFillLSC()
5220 removeEUFusionWAInst(inst); in expandFillLSC()
5221 for (auto inst : builder->instList) in expandFillLSC() local
5222 addEUFusionWAInsts(inst); in expandFillLSC()
5225 splice(bb, instIt, builder->instList, inst->getCISAOff()); in expandFillLSC()
5234 auto inst = (*instIt); in expandSpillNonStackcall() local
5256 sendInst = builder->createInternalSplitSendInst(execSize, inst->getDst(), in expandSpillNonStackcall()
5257 header, payloadToUse, msgDescImm, inst->getOption(), msgDesc, a0Src); in expandSpillNonStackcall()
5267 inst->getDst(), header, payloadToUse, msgDescImm, inst->getOption(), in expandSpillNonStackcall()
5289 inst->getDst(), headerOpnd, payloadToUse, msgDescImm, in expandSpillNonStackcall()
5290 inst->getOption(), msgDesc, extDesc); in expandSpillNonStackcall()
5310 auto inst = (*instIt); in expandSpillStackcall() local
5320 G4_Declare* framePtr = inst->asSpillIntrinsic()->getFP(); in expandSpillStackcall()
5351 sendInst = builder->createInternalSplitSendInst(execSize, inst->getDst(), in expandSpillStackcall()
5352 sendSrc0, payloadToUse, msgDescImm, inst->getOption(), msgDesc, a0Src); in expandSpillStackcall()
5360 msgDescImm, inst->getOption() | InstOpt_WriteEnable, msgDesc, extDesc); in expandSpillStackcall()
5372 if (inst->asSpillIntrinsic()->isOffsetValid()) in expandSpillStackcall()
5392 …comments << "stack spill: " << payload->getTopDcl()->getName() << " to FP[" << inst->asSpillIntri… in expandSpillStackcall()
5397 if (getEUFusionWAInsts().count(inst) > 0) in expandSpillStackcall()
5399 removeEUFusionWAInst(inst); in expandSpillStackcall()
5407 … kernel.getKernelDebugInfo()->updateExpandedIntrinsic(inst->asSpillIntrinsic(), hdrSetInst); in expandSpillStackcall()
5408 … kernel.getKernelDebugInfo()->updateExpandedIntrinsic(inst->asSpillIntrinsic(), spillSends); in expandSpillStackcall()
5430 auto inst = (*instIt); in expandSpillIntrinsic() local
5431 if (inst->isSpillIntrinsic()) in expandSpillIntrinsic()
5433 bool isOffBP = inst->asSpillIntrinsic()->isOffBP(); in expandSpillIntrinsic()
5434 uint32_t numRows = inst->asSpillIntrinsic()->getNumRows(); in expandSpillIntrinsic()
5435 uint32_t offset = inst->asSpillIntrinsic()->getOffset() * in expandSpillIntrinsic()
5437 auto header = inst->getSrc(0)->asSrcRegRegion(); in expandSpillIntrinsic()
5438 auto payload = inst->getSrc(1)->asSrcRegRegion(); in expandSpillIntrinsic()
5442 if (useLscForNonStackCallSpillFill || spillFillIntrinUsesLSC(inst)) { in expandSpillIntrinsic()
5467 auto inst = (*instIt); in expandFillNonStackcall() local
5527 G4_send, g4::SIMD16, fillDst, headerOpnd, msgDescImm, inst->getOption(), in expandFillNonStackcall()
5531 …comments << "scratch space fill: " << inst->getDst()->getTopDcl()->getName() << " from offset[" <<… in expandFillNonStackcall()
5546 auto inst = (*instIt); in expandFillStackcall() local
5555 G4_Declare* framePtr = inst->asFillIntrinsic()->getFP(); in expandFillStackcall()
5610 if (inst->asFillIntrinsic()->isOffsetValid()) in expandFillStackcall()
5630 if (getEUFusionWAInsts().count(inst) > 0) in expandFillStackcall()
5632 removeEUFusionWAInst(inst); in expandFillStackcall()
5639 …comments << "stack fill: " << resultRgn->getTopDcl()->getName() << " from FP[" << inst->asFillIntr… in expandFillStackcall()
5646 … kernel.getKernelDebugInfo()->updateExpandedIntrinsic(inst->asFillIntrinsic(), hdrSetInst); in expandFillStackcall()
5647 … kernel.getKernelDebugInfo()->updateExpandedIntrinsic(inst->asFillIntrinsic(), fillSends); in expandFillStackcall()
5679 auto inst = (*instIt); in expandFillIntrinsic() local
5680 if (inst->isFillIntrinsic()) in expandFillIntrinsic()
5682 bool isOffBP = inst->asFillIntrinsic()->isOffBP(); in expandFillIntrinsic()
5683 uint32_t numRows = inst->asFillIntrinsic()->getNumRows(); in expandFillIntrinsic()
5684 uint32_t offset = inst->asFillIntrinsic()->getOffset() * in expandFillIntrinsic()
5686 auto header = inst->getSrc(0)->asSrcRegRegion(); in expandFillIntrinsic()
5687 auto resultRgn = inst->getDst(); in expandFillIntrinsic()
5691 if (useLscForNonStackCallSpillFill || spillFillIntrinUsesLSC(inst)) { in expandFillIntrinsic()