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

Investigate use of LLVM optimizations #21

Closed
kripken opened this issue Jun 12, 2011 · 5 comments
Closed

Investigate use of LLVM optimizations #21

kripken opened this issue Jun 12, 2011 · 5 comments

Comments

@kripken
Copy link
Member

kripken commented Jun 12, 2011

pick_llvm_opts in tests/runner.py currently selects a subset of the LLVM optimizations, that appears to be safe and not generate nonportable code.

We might be missing some LLVM optimizations though. Also, in some cases LLVM optimizations help, in others they hurt. We should find out why.

Also, with typed arrays == 2, our memory model is much closer to the native one, and we should be able to use even nonportable optimizations.

@ehsan
Copy link
Collaborator

ehsan commented Sep 14, 2011

Can you please give me an example of LLVM optimizations which provide non-portable bytecode? Thanks!

@kripken
Copy link
Member Author

kripken commented Sep 18, 2011

For example, an optimization could replace writing 4 separate characters with a single write of a 32-bit value (which is nonportable because of endianness, and will break non TA2 builds of Emscripten because of lack of load-store consistency).

@CAFxX
Copy link

CAFxX commented Sep 27, 2011

I had a peek at the function you mentioned but can't figure out (I've never used python seriously) which flags are currently passed to LLVM (the only thing is that -O3 that's commented out?).

@kripken
Copy link
Member Author

kripken commented Oct 5, 2011

Basically all the opts that appear in something like opts.append(X) are added (where X is an option). So, assuming allow_nonportable is false, the options are

-globalopt
-issccp
-deadargelim

and so forth.

@kripken
Copy link
Member Author

kripken commented Jul 12, 2012

We now use all LLVM optimizations in TA2.

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

No branches or pull requests

3 participants