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

Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm` #66515

Merged
merged 1 commit into from Nov 21, 2019

Conversation

@Centril
Copy link
Member

Centril commented Nov 18, 2019

r? @oli-obk

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Nov 18, 2019

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Nov 18, 2019

Awaiting bors try build completion

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

⌛️ Trying commit 9b7bed0 with merge 03d05b2...

bors added a commit that referenced this pull request Nov 18, 2019
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

☀️ Try build successful - checks-azure
Build commit: 03d05b2 (03d05b28688feb26964e046893ba71f5bf7fd69b)

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Nov 18, 2019

Queued 03d05b2 with parent a0d40f8, future comparison URL.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Nov 18, 2019

Finished benchmarking try commit 03d05b2, comparison URL.

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Nov 19, 2019

Unsure if this has had an effect on max-rss, but if it has, it's an improvement (loads of green in https://perf.rust-lang.org/compare.html?start=a0d40f8bdfcc3c28355467973f97fd4c45ac5876&end=03d05b28688feb26964e046893ba71f5bf7fd69b&stat=max-rss)

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Nov 19, 2019

Yeah that's my thinking also; cc @nnethercote

@@ -2074,6 +2072,13 @@ pub struct InlineAsm {
pub dialect: AsmDialect,
}

#[derive(RustcEncodable, RustcDecodable, Debug, HashStable)]
pub struct InlineAsm {
pub inner: InlineAsmInner,

This comment has been minimized.

Copy link
@nnethercote

nnethercote Nov 19, 2019

Contributor

Is there any need to have InlineAsmInner? Could we just have asm, asm_str_style, outputs, and dialect fields directly in InlineAsm?

This comment has been minimized.

Copy link
@Centril

Centril Nov 19, 2019

Author Member

I tried but wasn't able to do that; Expr is not Clone and InlineAsmInner needs to be Clone.

@nnethercote

This comment has been minimized.

Copy link
Contributor

nnethercote commented Nov 19, 2019

max-rss is very noisy so it's hard to know if this effect is real. The change certainly can't hurt, though, especially given that the InlineAsm variant is so rarely used.

@Centril Centril force-pushed the Centril:cheaper-inline-asm branch from 9b7bed0 to 44cebe5 Nov 21, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Nov 21, 2019

@bors r=oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 21, 2019

📌 Commit 44cebe5 has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 21, 2019

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

Centril added a commit to Centril/rust that referenced this pull request Nov 21, 2019
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
bors added a commit that referenced this pull request Nov 21, 2019
Rollup of 6 pull requests

Successful merges:

 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66460 (Add a proc-macro to derive HashStable in librustc dependencies)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66520 (Disable gdb pretty printer global section on wasm targets)
 - #66539 (Point at type in `let` assignment on type errors)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Nov 21, 2019
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
bors added a commit that referenced this pull request Nov 21, 2019
Rollup of 6 pull requests

Successful merges:

 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66460 (Add a proc-macro to derive HashStable in librustc dependencies)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66520 (Disable gdb pretty printer global section on wasm targets)
 - #66602 (Revert "Update Source Code Pro and include italics")

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Nov 21, 2019
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
bors added a commit that referenced this pull request Nov 21, 2019
Rollup of 5 pull requests

Successful merges:

 - #65355 (Stabilize `!` in Rust 1.41.0)
 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66602 (Revert "Update Source Code Pro and include italics")

Failed merges:

r? @ghost
@bors bors merged commit 44cebe5 into rust-lang:master Nov 21, 2019
4 checks passed
4 checks passed
pr #20191121.1 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@Centril Centril deleted the Centril:cheaper-inline-asm branch Nov 21, 2019
flip1995 added a commit to Manishearth/rust-clippy that referenced this pull request Nov 22, 2019
flip1995 added a commit to Manishearth/rust-clippy that referenced this pull request Nov 22, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Nov 23, 2019
Rustup to rustc 1.41.0-nightly (35ef33a8 2019-11-21)

I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3

List of rustups:
- rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
- rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0)
- rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
- rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types)
- rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default)

changelog: none
bors added a commit to rust-lang/rust-clippy that referenced this pull request Nov 23, 2019
Rustup to rustc 1.41.0-nightly (35ef33a8 2019-11-21)

I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3

List of rustups:
- rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
- rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0)
- rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
- rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types)
- rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default)

changelog: none
bors added a commit to rust-lang/rust-clippy that referenced this pull request Nov 23, 2019
Rustup to rustc 1.41.0-nightly (35ef33a8 2019-11-21)

I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3

List of rustups:
- rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
- rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0)
- rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
- rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types)
- rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default)

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.