aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/JSBackend.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-04-29 17:07:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-04-29 17:07:55 -0700
commite37e658f1c6891a19edf8c93ec0eef940291f18b (patch)
treebdfdc39376d6cf24d69b4ab4a432fb411da91bd6 /lib/Target/JSBackend/JSBackend.cpp
parentcf3c2370c8c87d5183fd76e58bfed7c4ce8b9944 (diff)
do not emit a branch to the relooper if the target is the default destination anyhow; fixes #32
Diffstat (limited to 'lib/Target/JSBackend/JSBackend.cpp')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index 1a08ed1738..5a817e608b 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -1791,6 +1791,7 @@ void JSWriter::printFunctionBody(const Function *F) {
}
for (BlockCondMap::const_iterator I = BlocksToConditions.begin(), E = BlocksToConditions.end(); I != E; ++I) {
const BasicBlock *BB = I->first;
+ if (BB == DD) continue; // ok to eliminate this, default dest will get there anyhow
std::string P = getPhiCode(&*BI, BB);
LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*BB], I->second.c_str(), P.size() > 0 ? P.c_str() : NULL);
}