Lines Matching refs:Wait
165 void addWait(AMDGPU::Waitcnt &Wait, InstCounterType T, unsigned Count) { in addWait() argument
168 Wait.VmCnt = std::min(Wait.VmCnt, Count); in addWait()
171 Wait.ExpCnt = std::min(Wait.ExpCnt, Count); in addWait()
174 Wait.LgkmCnt = std::min(Wait.LgkmCnt, Count); in addWait()
177 Wait.VsCnt = std::min(Wait.VsCnt, Count); in addWait()
249 void simplifyWaitcnt(AMDGPU::Waitcnt &Wait) const;
252 AMDGPU::Waitcnt &Wait) const;
253 void applyWaitcnt(const AMDGPU::Waitcnt &Wait);
448 AMDGPU::Waitcnt &Wait, const MachineInstr *MI);
715 void WaitcntBrackets::simplifyWaitcnt(AMDGPU::Waitcnt &Wait) const { in simplifyWaitcnt()
716 simplifyWaitcnt(VM_CNT, Wait.VmCnt); in simplifyWaitcnt()
717 simplifyWaitcnt(EXP_CNT, Wait.ExpCnt); in simplifyWaitcnt()
718 simplifyWaitcnt(LGKM_CNT, Wait.LgkmCnt); in simplifyWaitcnt()
719 simplifyWaitcnt(VS_CNT, Wait.VsCnt); in simplifyWaitcnt()
735 AMDGPU::Waitcnt &Wait) const { in determineWait()
747 addWait(Wait, T, 0); in determineWait()
752 addWait(Wait, T, 0); in determineWait()
757 addWait(Wait, T, NeededWait); in determineWait()
762 void WaitcntBrackets::applyWaitcnt(const AMDGPU::Waitcnt &Wait) { in applyWaitcnt() argument
763 applyWaitcnt(VM_CNT, Wait.VmCnt); in applyWaitcnt()
764 applyWaitcnt(EXP_CNT, Wait.ExpCnt); in applyWaitcnt()
765 applyWaitcnt(LGKM_CNT, Wait.LgkmCnt); in applyWaitcnt()
766 applyWaitcnt(VS_CNT, Wait.VsCnt); in applyWaitcnt()
812 AMDGPU::Waitcnt &Wait, in applyPreexistingWaitcnt() argument
829 Wait = Wait.combined(OldWait); in applyPreexistingWaitcnt()
846 Wait.VsCnt = std::min(Wait.VsCnt, OldVSCnt); in applyPreexistingWaitcnt()
860 if (Wait.hasWaitExceptVsCnt()) { in applyPreexistingWaitcnt()
861 unsigned NewEnc = AMDGPU::encodeWaitcnt(IV, Wait); in applyPreexistingWaitcnt()
867 ScoreBrackets.applyWaitcnt(Wait); in applyPreexistingWaitcnt()
868 Wait.VmCnt = ~0u; in applyPreexistingWaitcnt()
869 Wait.LgkmCnt = ~0u; in applyPreexistingWaitcnt()
870 Wait.ExpCnt = ~0u; in applyPreexistingWaitcnt()
882 if (Wait.hasWaitVsCnt()) { in applyPreexistingWaitcnt()
887 if (Wait.VsCnt != OldVSCnt) { in applyPreexistingWaitcnt()
889 ->setImm(Wait.VsCnt); in applyPreexistingWaitcnt()
892 ScoreBrackets.applyWaitcnt(Wait); in applyPreexistingWaitcnt()
893 Wait.VsCnt = ~0u; in applyPreexistingWaitcnt()
946 AMDGPU::Waitcnt Wait; in generateWaitcntInstBefore() local
958 Wait.VmCnt = 0; in generateWaitcntInstBefore()
967 Wait = Wait.combined(AMDGPU::Waitcnt::allZero(ST->hasVscnt())); in generateWaitcntInstBefore()
974 Wait.VmCnt = 0; in generateWaitcntInstBefore()
1042 Wait.ExpCnt = 0; in generateWaitcntInstBefore()
1050 Wait = AMDGPU::Waitcnt(); in generateWaitcntInstBefore()
1062 LGKM_CNT, ScoreBrackets.getRegScore(RegNo, LGKM_CNT), Wait); in generateWaitcntInstBefore()
1073 LGKM_CNT, ScoreBrackets.getRegScore(RegNo, LGKM_CNT), Wait); in generateWaitcntInstBefore()
1093 addWait(Wait, LGKM_CNT, 0); in generateWaitcntInstBefore()
1103 VM_CNT, ScoreBrackets.getRegScore(RegNo, VM_CNT), Wait); in generateWaitcntInstBefore()
1106 EXP_CNT, ScoreBrackets.getRegScore(RegNo, EXP_CNT), Wait); in generateWaitcntInstBefore()
1129 VM_CNT, ScoreBrackets.getRegScore(RegNo, VM_CNT), Wait); in generateWaitcntInstBefore()
1134 EXP_CNT, ScoreBrackets.getRegScore(RegNo, EXP_CNT), Wait); in generateWaitcntInstBefore()
1138 LGKM_CNT, ScoreBrackets.getRegScore(RegNo, LGKM_CNT), Wait); in generateWaitcntInstBefore()
1150 Wait = Wait.combined(AMDGPU::Waitcnt::allZero(ST->hasVscnt())); in generateWaitcntInstBefore()
1160 Wait.LgkmCnt = 0; in generateWaitcntInstBefore()
1165 ScoreBrackets.simplifyWaitcnt(Wait); in generateWaitcntInstBefore()
1168 Wait = AMDGPU::Waitcnt::allZero(ST->hasVscnt()); in generateWaitcntInstBefore()
1171 Wait.VmCnt = 0; in generateWaitcntInstBefore()
1173 Wait.ExpCnt = 0; in generateWaitcntInstBefore()
1175 Wait.LgkmCnt = 0; in generateWaitcntInstBefore()
1177 Wait.VsCnt = 0; in generateWaitcntInstBefore()
1183 applyPreexistingWaitcnt(ScoreBrackets, *OldWaitcntInstr, Wait, &MI); in generateWaitcntInstBefore()
1186 ScoreBrackets.applyWaitcnt(Wait); in generateWaitcntInstBefore()
1191 if (Wait.hasWaitExceptVsCnt()) { in generateWaitcntInstBefore()
1192 unsigned Enc = AMDGPU::encodeWaitcnt(IV, Wait); in generateWaitcntInstBefore()
1204 if (Wait.hasWaitVsCnt()) { in generateWaitcntInstBefore()
1211 .addImm(Wait.VsCnt); in generateWaitcntInstBefore()