aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 35f679185d..2b39b59613 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -288,6 +288,10 @@ namespace {
void calculateNativizedVars(const Function *F);
+ // special analyses
+
+ bool canReloop(const Function *F);
+
// main entry point
void printModuleBody();
@@ -1143,6 +1147,7 @@ void JSWriter::printFunctionBody(const Function *F) {
static char *buffer = new char[RELOOPER_BUFFER];
Relooper::SetOutputBuffer(buffer, RELOOPER_BUFFER);
Relooper R;
+ //if (!canReloop(F)) R.SetEmulate(true);
R.SetAsmJSMode(1);
Block *Entry = NULL;
std::map<const BasicBlock*, Block*> LLVMToRelooper;
@@ -1688,6 +1693,12 @@ void JSWriter::calculateNativizedVars(const Function *F) {
}
}
+// special analyses
+
+bool JSWriter::canReloop(const Function *F) {
+ return true;
+}
+
// main entry
void JSWriter::printCommaSeparated(const HeapData data) {