diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-26 16:47:53 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-26 16:47:53 -0800 |
commit | 9ba323593ff655d9c6175a409048fd46747def6a (patch) | |
tree | cc7b159a37bc5a267d002c3e509ad300f46d44e4 /lib/Target/CppBackend/CPPBackend.cpp | |
parent | a88710f333b8c391bdded73733fb1f07472b4568 (diff) |
update relooper and prepare to use emulation in it when necessary
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 11 |
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) { |