Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit e37e658

Browse files
committed
do not emit a branch to the relooper if the target is the default destination anyhow; fixes #32
1 parent cf3c237 commit e37e658

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Target/JSBackend/JSBackend.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,7 @@ void JSWriter::printFunctionBody(const Function *F) {
17911791
}
17921792
for (BlockCondMap::const_iterator I = BlocksToConditions.begin(), E = BlocksToConditions.end(); I != E; ++I) {
17931793
const BasicBlock *BB = I->first;
1794+
if (BB == DD) continue; // ok to eliminate this, default dest will get there anyhow
17941795
std::string P = getPhiCode(&*BI, BB);
17951796
LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*BB], I->second.c_str(), P.size() > 0 ? P.c_str() : NULL);
17961797
}

0 commit comments

Comments
 (0)