From ae330b75e4706b9f418f3f8f12abb553ebd21336 Mon Sep 17 00:00:00 2001 From: jumormt Date: Wed, 25 Dec 2024 12:46:43 +1100 Subject: [PATCH] add process unreachable bbs --- svf-llvm/lib/ICFGBuilder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svf-llvm/lib/ICFGBuilder.cpp b/svf-llvm/lib/ICFGBuilder.cpp index e1bd3a9b1..c6b26949d 100644 --- a/svf-llvm/lib/ICFGBuilder.cpp +++ b/svf-llvm/lib/ICFGBuilder.cpp @@ -126,10 +126,10 @@ void ICFGBuilder::processFunEntry(const Function* fun, WorkList& worklist) */ void ICFGBuilder::processUnreachableFromEntry(const Function* fun, WorkList& worklist) { - for (const auto& bb: *fun) + DominatorTree dt; + dt.recalculate(const_cast(*fun)); + for (const auto& bb : *fun) { - DominatorTree dt; - dt.recalculate(const_cast(*fun)); if (!dt.isReachableFromEntry(&bb) && !visited.count(&bb.front())) { visited.insert(&bb.front());