This reduces the optimization remarks for unrolling to only include the unroll count, and whether it is a complete unroll, partial unroll or runtime unroll. The information about ULO.TripMultiple and BreakoutTrip is removed, as it is not compatible with multiple exits. The alternative would be to instead add information about all exits to the optimization remarks, but this doesn't seem particularly useful to me.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think I would prefer to see the information for each exit as opposed to removing it entirely. When understanding why unrolling happened in a particular way, having the detailed information is often very helpful. Not a strong preference, I'm willing to LGTM this if you really object.
I'm not particularly familiar with how optimization remarks work -- if we wanted to go the other way around, we need to be able to identify specific exits in some way. For debug output, we can just print the block label, but I assume that wouldn't be suitable for optimization remarks, as the block label wouldn't really be meaningful in that context, it's an IR detail. Do you know how one would go about that?
Hm, good point I was thinking in terms of debug output, and hadn't recognized the ORE complication.
Let's give it a day or so for someone more ORE familiar to chime in. If no one responds, you can consider this an LGTM of the current patch.
What do you think about this variant? It prints information for all exits as debug output, but keeps optimization remarks basic.