[PATCH] D120096: PGOInstrumentation, GCOVProfiling: Split indirectbr critical edges regardless of PHIs

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 16:19:44 PST 2022


MatzeB added a comment.

> Even this fix, there are still chance that we cannot split the edge.
> Maybe we should emit a warning in this case.

Yes I'm aware that it's not always possible to split critical edges; I think it should be possible in those case to just instrument the source and destination of the critical edge with a counter to get valid data?

Admittedly I did not try to fix that either as this fix here seems to be all we need for our software... I think the remaining cases should only effect exception handling code which is not perf critical anyway? For cases with two `indirectbr` predecessors I always saw LLVM normalizing control flow to a single one in earlier passes, so that was never a problem for instrumentation in my experiments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120096



More information about the llvm-commits mailing list