[PATCH] D70688: [PGO] Add Value Profiling for Loop Trip Count (WIP)

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 12:17:14 PDT 2022


wenlei added a comment.
Herald added a subscriber: Enna1.

Indeed this looks interesting.

How do you maintain the new profile metadata? Trip count can change as you unroll/reroll/vectorize a loop.

The new profile metadata seems disconnected with existing branch weights, which can also derive total trip count. However branch weights are adjusted for optimizations (i.e. scaling for inlining etc), so chances are branch weights derived total trip count can be more accurate in some cases. Do you consider using branch weights derived total trip count to scale trip count value profile (based on histogram's total)?

I'm also curious if you have any perf evaluation done based on this work, i.e. what target and on what workload/benchmark did you see perf improvement through versioning, by how much?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70688/new/

https://reviews.llvm.org/D70688



More information about the llvm-commits mailing list