Skip to content

Enhance interface with LLVM optimizations #2396

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

Closed
catamorphism opened this issue May 17, 2012 · 1 comment
Closed

Enhance interface with LLVM optimizations #2396

catamorphism opened this issue May 17, 2012 · 1 comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@catamorphism
Copy link
Contributor

Three related FIXMEs in back::link suggest adding back-end optimization levels other than -O2, exposing and using lists of specific LLVM optimizations, or at least not duplicating the LLVM optimizer's list of -O2 optimizations.

@ghost ghost assigned pcwalton May 17, 2012
@catamorphism
Copy link
Contributor Author

I think this should be done, but it seems like a "far future" thing.

bors added a commit that referenced this issue May 29, 2013
Refactor the optimization passes to explicitly use the passes. This commit just re-implements the same passes as were already being run.

It also adds an option (behind `-Z`) to run the LLVM lint pass on the unoptimized IR.

This should close #2812. It is also the first step towards #2396

----------------

This is pretty much just an initial "get it out there" PR. With finer control over the optimization passes coming later. I also just blindly copied the passes we were already doing, so there could almost certainly be some more work in paring it down.

The other thing is the addition of the `mergefunctions` pass, which is currently enabled at `--opt-level=3` and does have a small impact on the code size. However the fact that it is at the end of the optimization pipeline is probably not ideal, so some more experimentation is in order.
bors added a commit that referenced this issue May 29, 2013
This refactors pass handling to use the argument names, so it can be used
in a similar manner to `opt`. This may be slightly less efficient than the
previous version, but it is much easier to maintain.

It also adds in the ability to specify a custom pipeline on the command
line, this overrides the normal passes, however. This should completely
close #2396.
@Aatch Aatch closed this as completed in faf1afe Jun 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants