[llvm] [LoopUnroll] Allow expensive trip count emitting which is estimated to be infinite (PR #79869)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 08:41:39 PST 2024


https://github.com/mtrofin commented:

I'm curious what motivated this change - I've seen "infinite" trip counts in message pump type of code, like:

```
while (true) {
  auto msg = queue.dequeue(); // blocking
  msg->doYourThing();
}
```

This appears on server side. The loop is actually cold, and not really worth optimizing, so I'm curious to learn what other real-world cases of "infinite loops" are there.

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


More information about the llvm-commits mailing list