ssahasra wrote:

> I suspect there's an infinite loop due to how `mergeAsyncMarkers` works when 
> the IR contains a loop that has an `asyncmark` intrinsic but no 
> `wait.asyncmark`. What prevents the AsyncMarkers array from just growing 
> indefinitely?

Nice catch! I discovered that they won't grow indefinitely in real life, 
because each visit of a backedge immediately computes the local fixed point. 
But with nested loops, it can grow large in pathological cases. So added a 
maximum limit; if there are more marks than the maximum, then the oldest marks 
are discarded. If marks were discarded (because the size is exactly at the 
limit), then we conservatively wait for the oldest mark remaining.

> It would generally be nice to have some additional tests where the 
> asyncmarkers in control flow aren't balanced.

Done.

> BTW, I think it'd be fine to have tests that are a bit more bare-bone, e.g. 
> always using the same pointer arguments for the load.lds. That would result 
> in less "noise" in the assembly.

Done.

https://github.com/llvm/llvm-project/pull/173259
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to