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

always try inlining functions which do not call other functions #75495

Closed
wants to merge 1 commit into from

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Aug 13, 2020

This is still a bit broken.

r? @wesleywiser

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2020
@lcnr
Copy link
Contributor Author

lcnr commented Aug 13, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Aug 13, 2020

⌛ Trying commit bea062f with merge ad4a8ac0048cc0c83e82f277bfd16984c79b1c44...

@tmiasko
Copy link
Contributor

tmiasko commented Aug 13, 2020

FYI: If the intention is to enable this on mir-opt-level=1, it might be necessary to resolve #71793 first.

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
   Compiling ra_ide_db v0.1.0 (/checkout/src/tools/rust-analyzer/crates/ra_ide_db)
   Compiling ra_ssr v0.1.0 (/checkout/src/tools/rust-analyzer/crates/ra_ssr)
   Compiling ra_assists v0.1.0 (/checkout/src/tools/rust-analyzer/crates/ra_assists)
   Compiling ra_ide v0.1.0 (/checkout/src/tools/rust-analyzer/crates/ra_ide)
error: internal compiler error: src/librustc_trait_selection/traits/codegen/mod.rs:75:17: Encountered error `OutputTypeParameterMismatch(Binder(<[closure@crates/ra_ide/src/expand_macro.rs:86:27: 88:10 token_iter:&mut std::iter::Peekable<std::iter::FilterMap<std::iter::Map<std::iter::Successors<ra_syntax::WalkEvent<ra_syntax::NodeOrToken<rowan::cursor::SyntaxNode, rowan::cursor::SyntaxToken>>, [closure@rowan::cursor::SyntaxNode::preorder_with_tokens::{{closure}}#0 0:ra_syntax::NodeOrToken<rowan::cursor::SyntaxNode, rowan::cursor::SyntaxToken>]>, [closure@rowan::api::SyntaxNode::<L>::preorder_with_tokens::{{closure}}#0]>, [closure@crates/ra_ide/src/expand_macro.rs:73:21: 79:10]>>] as std::ops::FnMut<(fn(ra_syntax::SyntaxKind) -> bool, bool)>>), Binder(<[closure@crates/ra_ide/src/expand_macro.rs:86:27: 88:10 token_iter:&mut std::iter::Peekable<std::iter::FilterMap<impl std::iter::Iterator, [closure@crates/ra_ide/src/expand_macro.rs:73:21: 79:10]>>] as std::ops::FnMut<(fn(ra_syntax::SyntaxKind) -> bool, bool)>>), Sorts(ExpectedFound { expected: impl std::iter::Iterator, found: std::iter::Map<std::iter::Successors<ra_syntax::WalkEvent<ra_syntax::NodeOrToken<rowan::cursor::SyntaxNode, rowan::cursor::SyntaxToken>>, [closure@rowan::cursor::SyntaxNode::preorder_with_tokens::{{closure}}#0 0:ra_syntax::NodeOrToken<rowan::cursor::SyntaxNode, rowan::cursor::SyntaxToken>]>, [closure@rowan::api::SyntaxNode::<L>::preorder_with_tokens::{{closure}}#0]> }))` selecting `Binder(<[closure@crates/ra_ide/src/expand_macro.rs:86:27: 88:10 token_iter:&mut std::iter::Peekable<std::iter::FilterMap<impl std::iter::Iterator, [closure@crates/ra_ide/src/expand_macro.rs:73:21: 79:10]>>] as std::ops::FnMut<(fn(ra_syntax::SyntaxKind) -> bool, bool)>>)` during codegen
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:915:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.47.0-nightly (ad4a8ac00 2020-08-13) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C linker=clang -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type lib

note: some of the compiler flags provided by cargo are hidden


error: aborting due to previous error

error: could not compile `ra_ide`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml" "--message-format" "json-render-diagnostics"
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
thread 'main' panicked at 'rust-analyzer always builds', src/bootstrap/dist.rs:1402:14
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:33:39
== clock drift check ==
  local time: Thu Aug 13 20:35:50 UTC 2020
  local time: Thu Aug 13 20:35:50 UTC 2020
  network time: Thu, 13 Aug 2020 20:35:50 GMT
== end clock drift check ==
##[error]Process completed with exit code 1.
Terminate orphan process: pid (2744) (python)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Aug 13, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2020
@lcnr
Copy link
Contributor Author

lcnr commented Aug 13, 2020

looks like ra also breaks because of #68347

}
// Do wrapping math to allow e.g. `Step::forward(-128i8, 255)`.
start.wrapping_add(n as Self)
start + (n as Self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intention here was to inherit the user's setting for debug assertion, even when std is compiled in release mode (as it usually is).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, will have to rewrite this again before merging 👍

@leonardo-m
Copy link

I think "functions which do not call other function" used to be called leaf functions.

@bors
Copy link
Contributor

bors commented Aug 15, 2020

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

@lcnr
Copy link
Contributor Author

lcnr commented Sep 1, 2020

closing this for now as there are still some bugs with inlining we have to fix first

@lcnr
Copy link
Contributor Author

lcnr commented Sep 28, 2020

rebased on top of #77306 meaning that all inlining ICE I know of are fixed,

let's see if we can get a perf run going here

@lcnr
Copy link
Contributor Author

lcnr commented Sep 28, 2020

@bors try @rust-timer queue

looks like all test failures are expected

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@lcnr
Copy link
Contributor Author

lcnr commented Sep 28, 2020

I first rebased and then tried to open

let's open another PR

@lcnr
Copy link
Contributor Author

lcnr commented Sep 28, 2020

@Mark-Simulacrum should I do something to cancel rust-timer here?

@Mark-Simulacrum
Copy link
Member

Don't worry about it -- it'll just stick around but that's not a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants