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 the size of `hir::Expr`. #58258

Merged
merged 1 commit into from Feb 14, 2019

Conversation

Projects
None yet
5 participants
@nnethercote
Copy link
Contributor

nnethercote commented Feb 7, 2019

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 7, 2019

r? @michaelwoerister

(rust_highfive has picked a reviewer for you, use r? to override)

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 7, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

⌛️ Trying commit fc75a4d with merge 387a2a5...

bors added a commit that referenced this pull request Feb 7, 2019

Auto merge of #58258 - nnethercote:shrink-hir-Expr, r=<try>
Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

☀️ Test successful - checks-travis
State: approved= try=True

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

michaelwoerister commented Feb 7, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 7, 2019

Success: Queued 387a2a5 with parent 825f355, comparison URL.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 7, 2019

Finished benchmarking try commit 387a2a5

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 7, 2019

Changes to instruction counts are negligible. Looks like the extra allocations required are balanced by whatever reductions in memory copying.

However, the max-rss reductions are real -- e.g. I used DHAT on a "Check CleanIncr" build of tuple-stress, and peak heap usage dropped from 271.1MB to 258.6MB.

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

michaelwoerister commented Feb 8, 2019

Looks good. Thanks, @nnethercote!

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

📌 Commit fc75a4d has been approved by michaelwoerister

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Feb 10, 2019

Rollup merge of rust-lang#58258 - nnethercote:shrink-hir-Expr, r=mich…
…aelwoerister

Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

bors added a commit that referenced this pull request Feb 10, 2019

Auto merge of #58338 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 17 pull requests

Successful merges:

 - #57259 (Update reference of rlibc crate to compiler-builtins crate)
 - #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets)
 - #58085 (Implement more detailed self profiling)
 - #58103 (Make -Zdump-mir dump shims)
 - #58129 (MaybeUninit: some docs, rename into_inner -> into_initialized, return &mut from set)
 - #58151 (Partially HirId-ify rustc)
 - #58152 (Partially HirIdify mir)
 - #58153 (Partially Hiridify typeck)
 - #58203 (rustdoc: display sugared return types for async functions)
 - #58258 (Reduce the size of `hir::Expr`.)
 - #58262 (Add #[must_use] message to Fn* traits)
 - #58272 (Cut down on number formating code size)
 - #58276 (Improve the error messages for missing stability attributes)
 - #58295 (std::sys::unix::stdio: explain why we do into_raw)
 - #58297 (Cleanup JS a bit)
 - #58300 (librustc_typeck => 2018)
 - #58332 (operand-to-place copies should never be overlapping)

Failed merges:

 - #58167 (HirId-ify hir::BodyId)

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

☔️ The latest upstream changes (presumably #58341) made this pull request unmergeable. Please resolve the merge conflicts.

@nnethercote nnethercote force-pushed the nnethercote:shrink-hir-Expr branch from fc75a4d to b94ffe7 Feb 14, 2019

Reduce the size of `hir::Expr`.
From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

@nnethercote nnethercote force-pushed the nnethercote:shrink-hir-Expr branch from b94ffe7 to 5d65e8c Feb 14, 2019

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 14, 2019

@bors r=michaelwoerister

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 14, 2019

📌 Commit 5d65e8c has been approved by michaelwoerister

Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019

Rollup merge of rust-lang#58258 - nnethercote:shrink-hir-Expr, r=mich…
…aelwoerister

Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019

Rollup merge of rust-lang#58258 - nnethercote:shrink-hir-Expr, r=mich…
…aelwoerister

Reduce the size of `hir::Expr`.

From 104 bytes to 72 bytes on x86-64. This slightly reduces instruction
counts.

Also add an assertion about the size.

bors added a commit that referenced this pull request Feb 14, 2019

Auto merge of #58446 - Centril:rollup, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #57451 (suggestion-diagnostics: as_ref improve snippet)
 - #57856 (Convert old first edition links to current edition one)
 - #57992 (Update the future/task API)
 - #58258 (Reduce the size of `hir::Expr`.)
 - #58267 (Tweak "incompatible match arms" error)
 - #58296 (Hidden suggestion support)
 - #58301 (Enable comparing fat pointers)
 - #58308 (Extract block to insert an intrinsic into its own function)

Failed merges:

r? @ghost

@bors bors merged commit 5d65e8c into rust-lang:master Feb 14, 2019

@nnethercote nnethercote deleted the nnethercote:shrink-hir-Expr branch Feb 15, 2019

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