Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some -O3 optimization flags to improve performance from 20% ~ … #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChihMin
Copy link

@ChihMin ChihMin commented Aug 9, 2016

…60 speed up while decoding the most expensive frame

…60 speed up while decoding the most expensive frame
@DavidLvSinonet
Copy link

Hi @ChihMin ,
I have tested your branch in emscripten v1.35.0, there have some error:
Unknown command line argument '-demanded-bits'.
Unknown command line argument '-elim-avail-extern'
Unknown command line argument '-demanded-bits'.
Traceback (most recent call last):
File "/Users/david/Documents/DevTools/emsdk/emscripten/1.35.0/emcc", line 1283, in
final = shared.Building.llvm_opt(final, llvm_opts, DEFAULT_FINAL)
File "/Users/david/Documents/DevTools/emsdk/emscripten/1.35.0/tools/shared.py", line 1471, in llvm_opt
assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
AssertionError: Failed to run llvm optimizations:
Traceback (most recent call last):
File "make.py", line 134, in
emscripten.Building.emcc('avc.bc', link_args, os.path.join(JS_DIR, 'avc.js'))
File "/Users/david/Documents/DevTools/emsdk/emscripten/1.35.0/tools/shared.py", line 1548, in emcc
assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: js/avc.js

@ChihMin
Copy link
Author

ChihMin commented Aug 30, 2016

Hi @DavidLvSinonet,

I faced the same problem while building this project with emscripten 1.36.
Maybe there are some bugs in emscripten python building wrapper script, and optimization parameters passed to shared.py will cause errors while calling LLVM optimizer(opt).
So currently my solution is wrapping the opt executable file. For instance:

  • Backup origin LLVM opt executable file and touch new opt shell script
mv ${YOUR_PATH}/opt ${YOUR_PATH}/opt.bak
touch ${YOUR_PATH}/opt
chmod +x ${YOUR_PATH}/opt
  • Edit new opt shell script
#!/bin/bash
${ABSOLUTE_PATH}/opt.bak $@

@DavidLvSinonet
Copy link

Hi @ChihMin ,

There have the some problems.

opt.bak: Unknown command line argument '-demanded-bits'.  Try: '/Users/david/Documents/DevTools/emsdk/clang/e1.35.0_64bit/opt.bak -help'
opt.bak: Did you mean '-delinearize'?

@ChihMin
Copy link
Author

ChihMin commented Aug 30, 2016

Hi @DavidLvSinonet,
Oh, maybe our LLVM version is not the same, so some flags are NOT supported in your LLVM optimizer.
My emscripten version is 1.36.0, and LLVM version is 3.9.0.
Maybe you should try to build emscripten & emscripten-fastcom 1.36.0?

@soliton4
Copy link
Collaborator

i was running my tests with emscripten 1.36.9

@DavidLvSinonet
Copy link

OK, I will update my emscripten.
Thanks @ChihMin , @soliton4 .

@luopingkklp
Copy link

Thank you for this project,it is very good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants