Fixes issue 49961
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
8073 | It would be more in keeping with the original design to just exclude PHI instructions here. The assumption is that all the uses counted in NumUse will necessarily come after DefMI in the same BB, so the second loop below will always terminate before hitting the end of the BB. |
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
8073 | That's a bit too clever for me. I'd rather just have normal looking end iterator checks |
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
8073 | One argument in favour of the clever version is that you never have to run all the way to end(), which could be a long way away in a pathologically large basic block. |
Check if phi
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
8073 | This already has a MaxInstScan to avoid pathological blocks |
It would be more in keeping with the original design to just exclude PHI instructions here. The assumption is that all the uses counted in NumUse will necessarily come after DefMI in the same BB, so the second loop below will always terminate before hitting the end of the BB.