[llvm] [FuncSpec] Query SCCPSolver in more places (PR #114964)

Alexandros Lamprineas via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 03:29:25 PST 2024


================
@@ -312,10 +317,10 @@ bool InstCostVisitor::discoverTransitivelyIncomingValues(
 
       // Disregard self-references and dead incoming values.
       if (auto *Inst = dyn_cast<Instruction>(V))
-        if (Inst == PN || DeadBlocks.contains(PN->getIncomingBlock(I)))
----------------
labrinea wrote:

> Would that suggest a bug then?

No it's not a bug.

>  Is there a way for the solver and InstCostVisitor to reuse the same code that finds a basic block dead?

I am not sure I understand the question. The InstCostVisitor is a simplified version of the Solver for the pursposes of estimating the profitability of specialization. If the specialization is performed the Solver will end up matching the findings of InstCostVisitor.

https://github.com/llvm/llvm-project/pull/114964


More information about the llvm-commits mailing list