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

Refactor optimization pass handling. #6778

Merged
merged 6 commits into from
May 29, 2013
Merged

Conversation

Aatch
Copy link
Contributor

@Aatch Aatch commented May 28, 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.

@Aatch
Copy link
Contributor Author

Aatch commented May 28, 2013

I've encountered an error that may-or-may not be caused by this. I'm trying to narrow it down, but it probably isn't worth approving until I get to the bottom of this.

@Aatch
Copy link
Contributor Author

Aatch commented May 28, 2013

So my copying of the passes wasn't great and I copied things that I probably shouldn't have, that is likely what is causing the error I encountered.

I'm fixing it up, so I'l push a commit to fix it when that's done.

@graydon
Copy link
Contributor

graydon commented May 29, 2013

Please do! assuming it's the same structure of a change as this one, r=me

Thanks!

Aatch added 5 commits May 29, 2013 14:16
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.
bors added a commit that referenced this pull request 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 bors closed this May 29, 2013
@bors bors merged commit 4ad0b8a into rust-lang:incoming May 29, 2013
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.

3 participants