[llvm] [FuncSpec] Update function specialization to handle phi-chains (PR #71442)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 10:29:49 PST 2023
================
@@ -262,30 +267,86 @@ Cost InstCostVisitor::estimateBranchInst(BranchInst &I) {
return estimateBasicBlocks(WorkList);
}
+void InstCostVisitor::discoverStronglyConnectedComponent(PHINode *PN,
+ unsigned Depth) {
+ if (Depth > MaxDiscoveryDepth)
----------------
momchil-velikov wrote:
Even assuming the "SCC" algorithm itself works, exceeding the time/depth limit would mean that we bail - because we cannot say anything useful about PHIs that are in `StronglyConnectedPHIs` or about PHIs that are **not** in `StronglyConnectedPHIs. Yet, this case is indistinguishable from normal termination.
https://github.com/llvm/llvm-project/pull/71442
More information about the llvm-commits
mailing list