-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed as not planned
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-macosOperating system: macOSOperating system: macOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I first posted this in Cargo at rust-lang/cargo#5312
I'm benchmarking some code and often get hangs with $ RUSTFLAGS='-C target-cpu=native' cargo bench
.
My Cargo.toml
:
[package]
name = "test_hang"
version = "0.1.0"
[profile.bench]
lto = true
It only happens when both LTO and target-cpu=native are enabled.
A typical output looks like this, where it hangs for as long as I've left it:
$ RUST_BACKTRACE=1 RUSTFLAGS='-C target-cpu=native' cargo bench -vv
Fresh <crates>
Finished release [optimized] target(s) in 0.0 secs
Running `<path to crate>target/release/deps/<crate name>-86f63a8b1891302e --bench`
running 19 tests
<ignored tests>
test result: ok. 0 passed; 0 failed; 19 ignored; 0 measured; 0 filtered out
Running `<path to crate>/target/release/deps/bench-3dd5f8be084d72c9 --bench`
I'm using cargo 1.26.0-nightly (b70ab13b3 2018-04-04)
. The code requires nightly so I can't test whether this happens on stable.
$ rustc --print target-cpus says my processor is sandybridge.
Meta
$ rustc --version --verbose
rustc 1.27.0-nightly (eeea94c11 2018-04-06)
binary: rustc
commit-hash: eeea94c11d02ff62fb011d1afdda9301fdf9726b
commit-date: 2018-04-06
host: x86_64-apple-darwin
release: 1.27.0-nightly
LLVM version: 6.0
bluejekyll
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-macosOperating system: macOSOperating system: macOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.