[PATCH] D124490: [InstrProf] Minimal Block Coverage
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 17:59:30 PDT 2022
ellis marked an inline comment as done.
ellis added a comment.
Can we get another review of this? CC @MaskRay
================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:137
+ BlockSet ReachableFromEntry, ReachableFromExit;
+ getReachableAvoiding(&EntryBlock, &BB, /*IsForward=*/true,
+ ReachableFromEntry);
----------------
MaskRay wrote:
> The time complexity is O(|BB|^2) and can be problematic.
I've added a comment discussing the runtime. We do know of a linear time algorithm that would compute the Dependencies maps, but it is significantly more complicated. We thought it would be best to first add this simpler implementation and in the future we can use the linear algorithm if we find that it gives a significant speedup in practice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124490/new/
https://reviews.llvm.org/D124490
More information about the llvm-commits
mailing list