Skip to content

Commit

Permalink
add process unreachable bbs
Browse files Browse the repository at this point in the history
  • Loading branch information
jumormt committed Dec 25, 2024
1 parent b06ef9c commit ae330b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions svf-llvm/lib/ICFGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Function&>(*fun));
for (const auto& bb : *fun)
{
DominatorTree dt;
dt.recalculate(const_cast<Function&>(*fun));
if (!dt.isReachableFromEntry(&bb) && !visited.count(&bb.front()))
{
visited.insert(&bb.front());
Expand Down

0 comments on commit ae330b7

Please sign in to comment.