[llvm] [AMDGPU] Save/Restore SCC bit across waterfall loop. (PR #68363)

Sirish Pande via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 08:18:11 PDT 2023


srpande wrote:

> I have no comments on this patch, but I do think we should plan to improve waterfall formation in the future in a way that will make this patch obsolete.
> 
> Fundamentally we should not be forming waterfall loops in `moveToVALU`. That decision should be made during instruction selection, where we have accurate divergence information for buffer descriptors. ISel could either emit different opcodes for "buffer load with/without waterfall loop", or it could emit some extra pseudos marking the start/end of a required waterfall loop. In either case the emitted instructions can accurately say whether they will clobber SCC, and they can be expanded to real control flow in EmitInstrWithCustomInserter.

I agree Waterfall should be generated in ISel. I will open a draft to reimplement Waterfalll loop in ISel.

https://github.com/llvm/llvm-project/pull/68363


More information about the llvm-commits mailing list