[PATCH] D124490: [InstrProf] Minimal Block Coverage

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 12:43:10 PST 2023


ellis added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:137
+    BlockSet ReachableFromEntry, ReachableFromExit;
+    getReachableAvoiding(&EntryBlock, &BB, /*IsForward=*/true,
+                         ReachableFromEntry);
----------------
MaskRay wrote:
> ellis wrote:
> > 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.
> We have quadratic time algorithms like `O((V+E)(c+1))` used in gcov.
I haven't forgotten about this, I just wanted to resolve the other comments first.


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