Skip to content

Refactor optimization pass handling. - #6778

Merged
bors merged 6 commits into
rust-lang:incomingfrom
Aatch:pass-refactor
May 29, 2013
Merged

Refactor optimization pass handling.#6778
bors merged 6 commits into
rust-lang:incomingfrom
Aatch:pass-refactor

Conversation

@Aatch

@Aatch Aatch commented May 28, 2013

Copy link
Copy Markdown
Contributor

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

Aatch commented May 28, 2013

Copy link
Copy Markdown
Contributor Author

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

Aatch commented May 28, 2013

Copy link
Copy Markdown
Contributor Author

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

graydon commented May 29, 2013

Copy link
Copy Markdown
Contributor

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