-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 29 pull requests #33610
Rollup of 29 pull requests #33610
Commits on May 9, 2016
-
Long ago LLVM unfortunately didn't handle the 32-bit MSVC case of `frem` where it can't be lowered to `fmodf` because that symbol doesn't exist. That was since fixed in http://reviews.llvm.org/D12099 (landed as r246615) and was released in what appears to be LLVM 3.8. Now that we're using that branch of LLVM let's remove our own hacks and help LLVM optimize a little better by giving it knowledge about what we're doing.
Configuration menu - View commit details
-
Copy full SHA for 96b2288 - Browse repository at this point
Copy the full SHA 96b2288View commit details
Commits on May 10, 2016
-
Configuration menu - View commit details
-
Copy full SHA for df572fc - Browse repository at this point
Copy the full SHA df572fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 417fe6d - Browse repository at this point
Copy the full SHA 417fe6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for eed8d70 - Browse repository at this point
Copy the full SHA eed8d70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d5c578 - Browse repository at this point
Copy the full SHA 8d5c578View commit details -
Copy more libraries from local Rust to stage0
When bootstrapping Rust using a previously built toolchain, I noticed a number of libraries were not copied in. As a result the copied in rustc fails to execute because it can't find all its dependences. Add them into the local_stage0.sh script.
Configuration menu - View commit details
-
Copy full SHA for 0a38089 - Browse repository at this point
Copy the full SHA 0a38089View commit details -
Configuration menu - View commit details
-
Copy full SHA for 946efcd - Browse repository at this point
Copy the full SHA 946efcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3927ff4 - Browse repository at this point
Copy the full SHA 3927ff4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33978b0 - Browse repository at this point
Copy the full SHA 33978b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66404f3 - Browse repository at this point
Copy the full SHA 66404f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ac468b - Browse repository at this point
Copy the full SHA 9ac468bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d3531d - Browse repository at this point
Copy the full SHA 8d3531dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e919f25 - Browse repository at this point
Copy the full SHA e919f25View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5a91b7 - Browse repository at this point
Copy the full SHA e5a91b7View commit details -
Add error description for E0455
- Adding name attribute to the sample code - Fix description sentences
Configuration menu - View commit details
-
Copy full SHA for 85e0242 - Browse repository at this point
Copy the full SHA 85e0242View commit details
Commits on May 11, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 7a9f4c2 - Browse repository at this point
Copy the full SHA 7a9f4c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5511e65 - Browse repository at this point
Copy the full SHA 5511e65View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0e321a - Browse repository at this point
Copy the full SHA c0e321aView commit details -
Only break critical edges where actually needed
Currently, to prepare for MIR trans, we break _all_ critical edges, although we only actually need to do this for edges originating from a call that gets translated to an invoke instruction in LLVM. This has the unfortunate effect of undoing a bunch of the things that SimplifyCfg has done. A particularly bad case arises when you have a C-like enum with N variants and a derived PartialEq implementation. In that case, the match on the (&lhs, &rhs) tuple gets translated into nested matches with N arms each and a basic block each, resulting in N² basic blocks. SimplifyCfg reduces that to roughly 2*N basic blocks, but breaking the critical edges means that we go back to N². In nickel.rs, there is such an enum with roughly N=800. So we get about 640K basic blocks or 2.5M lines of LLVM IR. LLVM takes a while to reduce that to the final "disr_a == disr_b". So before this patch, we had 2.5M lines of IR with 640K basic blocks, which took about about 3.6s in LLVM to get optimized and translated. After this patch, we get about 650K lines with about 1.6K basic blocks and spent a little less than 0.2s in LLVM. cc rust-lang#33111
Configuration menu - View commit details
-
Copy full SHA for 00f6513 - Browse repository at this point
Copy the full SHA 00f6513View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5541fdf - Browse repository at this point
Copy the full SHA 5541fdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e5a2e0 - Browse repository at this point
Copy the full SHA 4e5a2e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c91b104 - Browse repository at this point
Copy the full SHA c91b104View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cbfa12 - Browse repository at this point
Copy the full SHA 5cbfa12View commit details -
[MIR trans] Optimize trans for biased switches
Currently, all switches in MIR are exhausitive, meaning that we can have a lot of arms that all go to the same basic block, the extreme case being an if-let expression which results in just 2 possible cases, be might end up with hundreds of arms for large enums. To improve this situation and give LLVM less code to chew on, we can detect whether there's a pre-dominant target basic block in a switch and then promote this to be the default target, not translating the corresponding arms at all. In combination with rust-lang#33544 this makes unoptimized MIR trans of nickel.rs as fast as using old trans and greatly improves the times for optimized builds, which are only 30-40% slower instead of ~300%. cc rust-lang#33111
Configuration menu - View commit details
-
Copy full SHA for 49b2cdf - Browse repository at this point
Copy the full SHA 49b2cdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd70788 - Browse repository at this point
Copy the full SHA fd70788View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5af829b - Browse repository at this point
Copy the full SHA 5af829bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8628cce - Browse repository at this point
Copy the full SHA 8628cceView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec7c483 - Browse repository at this point
Copy the full SHA ec7c483View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3218fa - Browse repository at this point
Copy the full SHA d3218faView commit details
Commits on May 12, 2016
-
Configuration menu - View commit details
-
Copy full SHA for f52b655 - Browse repository at this point
Copy the full SHA f52b655View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6458b04 - Browse repository at this point
Copy the full SHA 6458b04View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7902b1 - Browse repository at this point
Copy the full SHA a7902b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c2ec13 - Browse repository at this point
Copy the full SHA 3c2ec13View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc0872a - Browse repository at this point
Copy the full SHA fc0872aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 06e00c4 - Browse repository at this point
Copy the full SHA 06e00c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 073f289 - Browse repository at this point
Copy the full SHA 073f289View commit details -
typeck: if a private field exists, also check for a public method
For example, `Vec::len` is both a field and a method, and usually encountering `vec.len` just means that the parens were forgotten. Fixes: rust-lang#26472
Configuration menu - View commit details
-
Copy full SHA for 843b174 - Browse repository at this point
Copy the full SHA 843b174View commit details -
Configuration menu - View commit details
-
Copy full SHA for c331032 - Browse repository at this point
Copy the full SHA c331032View commit details -
update "reason" for fnbox feature gate
It isn't "newly introduced" anymore.
Configuration menu - View commit details
-
Copy full SHA for df4fe5f - Browse repository at this point
Copy the full SHA df4fe5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9fce76 - Browse repository at this point
Copy the full SHA b9fce76View commit details -
Don't use env::current_exe with libbacktrace
If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889
Configuration menu - View commit details
-
Copy full SHA for 9393e52 - Browse repository at this point
Copy the full SHA 9393e52View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7362ca - Browse repository at this point
Copy the full SHA f7362caView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff3a1ce - Browse repository at this point
Copy the full SHA ff3a1ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 749494e - Browse repository at this point
Copy the full SHA 749494eView commit details -
re-introduce a cache for ast-ty-to-ty
It turns out that `ast_ty_to_ty` is supposed to be updating the `def` after it finishes, but at some point in the past it stopped doing so. This was never noticed because of the `ast_ty_to_ty_cache`, but that cache was recently removed. This PR fixes the code to update the def properly, but apparently that is not quite enough to make the operation idempotent, so for now we reintroduce the cache too. Fixes rust-lang#33425.
Configuration menu - View commit details
-
Copy full SHA for aa00e3a - Browse repository at this point
Copy the full SHA aa00e3aView commit details -
Improve derived implementations for enums with lots of fieldless vari…
…ants A number of trait methods like PartialEq::eq or Hash::hash don't actually need a distinct arm for each variant, because the code within the arm only depends on the number and types of the fields in the variants. We can easily exploit this fact to create less and better code for enums with multiple variants that have no fields at all, the extreme case being C-like enums. For nickel.rs and its by now infamous 800 variant enum, this reduces optimized compile times by 25% and non-optimized compile times by 40%. Also peak memory usage is down by almost 40% (310MB down to 190MB). To be fair, most other crates don't benefit nearly as much, because they don't have as huge enums. The crates in the Rust distribution that I measured saw basically no change in compile times (I only tried optimized builds) and only 1-2% reduction in peak memory usage.
Configuration menu - View commit details
-
Copy full SHA for 0eeb14e - Browse repository at this point
Copy the full SHA 0eeb14eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 538de73 - Browse repository at this point
Copy the full SHA 538de73View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4bff0c - Browse repository at this point
Copy the full SHA d4bff0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for adee551 - Browse repository at this point
Copy the full SHA adee551View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ad6d27 - Browse repository at this point
Copy the full SHA 8ad6d27View commit details
Commits on May 13, 2016
-
Rollup merge of rust-lang#33342 - birkenfeld:issue-26472, r=jseyfried
typeck: if a private field exists, also check for a public method For example, `Vec::len` is both a field and a method, and usually encountering `vec.len` just means that the parens were forgotten. Fixes: rust-lang#26472 NOTE: I added the parameter `allow_private` to `method::exists` since I don't want to suggest inaccessible methods. For the second case, where only the method exists, I think it would make sense to set it to `false` as well, but I wanted to preserve compatibility for this case.
Configuration menu - View commit details
-
Copy full SHA for bb7d0ce - Browse repository at this point
Copy the full SHA bb7d0ceView commit details -
Rollup merge of rust-lang#33393 - cristianoliveira:docs-error-explana…
…tion, r=steveklabnik Add error description for E0455 r? @GuillaumeGomez. About this error there is no much thing to explain. The short description says enough to understand. Feel free to review.
Configuration menu - View commit details
-
Copy full SHA for be92e9b - Browse repository at this point
Copy the full SHA be92e9bView commit details -
Rollup merge of rust-lang#33508 - alexcrichton:always-lower-frem, r=n…
…ikomatsakis trans: Always lower to `frem` Long ago LLVM unfortunately didn't handle the 32-bit MSVC case of `frem` where it can't be lowered to `fmodf` because that symbol doesn't exist. That was since fixed in http://reviews.llvm.org/D12099 (landed as r246615) and was released in what appears to be LLVM 3.8. Now that we're using that branch of LLVM let's remove our own hacks and help LLVM optimize a little better by giving it knowledge about what we're doing.
Configuration menu - View commit details
-
Copy full SHA for 6859599 - Browse repository at this point
Copy the full SHA 6859599View commit details -
Rollup merge of rust-lang#33513 - sanxiyn:tab-in-error, r=nikomatsakis
Better handling of tab in error cc rust-lang#33240.
Configuration menu - View commit details
-
Copy full SHA for 82fd37c - Browse repository at this point
Copy the full SHA 82fd37cView commit details -
Rollup merge of rust-lang#33517 - sanxiyn:tight-span, r=nagisa
Tighten span for E0063
Configuration menu - View commit details
-
Copy full SHA for 5637db9 - Browse repository at this point
Copy the full SHA 5637db9View commit details -
Rollup merge of rust-lang#33531 - antonblanchard:local_stage0_fix, r=…
…alexcrichton Copy more libraries from local Rust to stage0 When bootstrapping Rust using a previously built toolchain, I noticed a number of libraries were not copied in. As a result the copied in rustc fails to execute because it can't find all its dependences. Add them into the local_stage0.sh script.
Configuration menu - View commit details
-
Copy full SHA for 673d686 - Browse repository at this point
Copy the full SHA 673d686View commit details -
Rollup merge of rust-lang#33532 - jseyfried:mutable_lowering_context,…
… r=nrc Clean up `hir::lowering` Clean up `hir::lowering`: - give lowering functions mutable access to the lowering context - refactor the `lower_*` functions and other functions that take a lowering context into methods - simplify the API that `hir::lowering` exposes to `driver` - other miscellaneous cleanups r? @nrc
Configuration menu - View commit details
-
Copy full SHA for 76794b6 - Browse repository at this point
Copy the full SHA 76794b6View commit details -
Rollup merge of rust-lang#33533 - GuillaumeGomez:add_E0500, r=stevekl…
…abnik Add E0500 error explanation r? @Manishearth Part of rust-lang#32777.
Configuration menu - View commit details
-
Copy full SHA for e141d95 - Browse repository at this point
Copy the full SHA e141d95View commit details -
Rollup merge of rust-lang#33534 - dns2utf8:atomic_docs, r=GuillaumeGomez
Simplify text This way it should be clear: Any number of other threads have this guaranty not just one other thread.
Configuration menu - View commit details
-
Copy full SHA for dbf812f - Browse repository at this point
Copy the full SHA dbf812fView commit details -
Rollup merge of rust-lang#33538 - Ms2ger:LocalCrateReader, r=arielb1
Refactor code around LocalCrateReader.
Configuration menu - View commit details
-
Copy full SHA for b3ecd27 - Browse repository at this point
Copy the full SHA b3ecd27View commit details -
Rollup merge of rust-lang#33541 - eddyb:promote-only-temps, r=arielb1
mir: don't attempt to promote Unpromotable constant temps. Fixes rust-lang#33537. This was a non-problem in regular functions, but we also promote in `const fn`s. There we always qualify temps so you can't depend on `Unpromotable` temps being `NOT_CONST`.
Configuration menu - View commit details
-
Copy full SHA for 5a48beb - Browse repository at this point
Copy the full SHA 5a48bebView commit details -
Rollup merge of rust-lang#33544 - dotdash:baby_dont_break_me_no_more,…
… r=Aatch Only break critical edges where actually needed Currently, to prepare for MIR trans, we break _all_ critical edges, although we only actually need to do this for edges originating from a call that gets translated to an invoke instruction in LLVM. This has the unfortunate effect of undoing a bunch of the things that SimplifyCfg has done. A particularly bad case arises when you have a C-like enum with N variants and a derived PartialEq implementation. In that case, the match on the (&lhs, &rhs) tuple gets translated into nested matches with N arms each and a basic block each, resulting in N² basic blocks. SimplifyCfg reduces that to roughly 2*N basic blocks, but breaking the critical edges means that we go back to N². In nickel.rs, there is such an enum with roughly N=800. So we get about 640K basic blocks or 2.5M lines of LLVM IR. LLVM takes a while to reduce that to the final "disr_a == disr_b". So before this patch, we had 2.5M lines of IR with 640K basic blocks, which took about about 3.6s in LLVM to get optimized and translated. After this patch, we get about 650K lines with about 1.6K basic blocks and spent a little less than 0.2s in LLVM. cc rust-lang#33111 r? @Aatch
Configuration menu - View commit details
-
Copy full SHA for 96b6e8f - Browse repository at this point
Copy the full SHA 96b6e8fView commit details -
Rollup merge of rust-lang#33552 - dotdash:scfg, r=luqmana
[MIR] Enhance the SimplifyCfg pass to merge consecutive blocks Updated from rust-lang#30238, including the changes suggested by @Aatch.
Configuration menu - View commit details
-
Copy full SHA for 494bc14 - Browse repository at this point
Copy the full SHA 494bc14View commit details -
Rollup merge of rust-lang#33554 - sfackler:no-current-exe, r=alexcric…
…hton Don't use env::current_exe with libbacktrace If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc rust-lang#21889 r? @alexcrichton cc @semarie
Configuration menu - View commit details
-
Copy full SHA for bab9fa2 - Browse repository at this point
Copy the full SHA bab9fa2View commit details -
Rollup merge of rust-lang#33555 - soltanmm:ambiguous-nixon, r=nikomat…
…sakis Remove unification despite ambiguity in projection Turns out that closures aren't explicitly considered in `project.rs`, so the ambiguity handling w.r.t. closures can just be removed as the change done in `select.rs` covers it. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for c3e0529 - Browse repository at this point
Copy the full SHA c3e0529View commit details -
Rollup merge of rust-lang#33560 - eddyb:symtidy, r=alexcrichton
Use symlink_metadata in tidy to avoid panicking on broken symlinks. r? @alexcrichton
Configuration menu - View commit details
-
Copy full SHA for bf535f3 - Browse repository at this point
Copy the full SHA bf535f3View commit details -
Rollup merge of rust-lang#33563 - Amanieu:oncestate, r=alexcrichton
Export OnceState from libstd This type is used in the signature of `call_once_force` but isn't exported from libstd. r? @alexcrichton
Configuration menu - View commit details
-
Copy full SHA for dc37d09 - Browse repository at this point
Copy the full SHA dc37d09View commit details -
Rollup merge of rust-lang#33565 - Amanieu:once_doc, r=GuillaumeGomez
Fix typo in std::sync::Once documentation
Configuration menu - View commit details
-
Copy full SHA for a8a491a - Browse repository at this point
Copy the full SHA a8a491aView commit details -
Rollup merge of rust-lang#33566 - dotdash:biased_switch, r=nagisa
[MIR trans] Optimize trans for biased switches Currently, all switches in MIR are exhausitive, meaning that we can have a lot of arms that all go to the same basic block, the extreme case being an if-let expression which results in just 2 possible cases, be might end up with hundreds of arms for large enums. To improve this situation and give LLVM less code to chew on, we can detect whether there's a pre-dominant target basic block in a switch and then promote this to be the default target, not translating the corresponding arms at all. In combination with rust-lang#33544 this makes unoptimized MIR trans of nickel.rs as fast as using old trans and greatly improves the times for optimized builds, which are only 30-40% slower instead of ~300%. cc rust-lang#33111
Configuration menu - View commit details
-
Copy full SHA for 8942994 - Browse repository at this point
Copy the full SHA 8942994View commit details -
Rollup merge of rust-lang#33572 - nagisa:assoc-const-types, r=eddyb
Support references to outer type params for assoc consts Fixes rust-lang#28809 r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 1879aaa - Browse repository at this point
Copy the full SHA 1879aaaView commit details -
Rollup merge of rust-lang#33576 - soltanmm:vtable, r=nikomatsakis
Plumb inference obligations through selection, take 2 Using a `SnapshotVec` and dumping inferred obligations into `Vtable` variants. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 2c55f77 - Browse repository at this point
Copy the full SHA 2c55f77View commit details -
Rollup merge of rust-lang#33580 - frewsxcv:temp-dir, r=alexcrichton
Cleanup formatting and wording for `std::env::temp_dir` docs. None
Configuration menu - View commit details
-
Copy full SHA for 88ecbc4 - Browse repository at this point
Copy the full SHA 88ecbc4View commit details -
Rollup merge of rust-lang#33590 - durka:patch-22, r=aturon
update "reason" for fnbox feature gate It isn't "newly introduced" anymore.
Configuration menu - View commit details
-
Copy full SHA for 0018516 - Browse repository at this point
Copy the full SHA 0018516View commit details -
Rollup merge of rust-lang#33593 - dotdash:smart_derive, r=brson
Improve derived implementations for enums with lots of fieldless variants A number of trait methods like PartialEq::eq or Hash::hash don't actually need a distinct arm for each variant, because the code within the arm only depends on the number and types of the fields in the variants. We can easily exploit this fact to create less and better code for enums with multiple variants that have no fields at all, the extreme case being C-like enums. For nickel.rs and its by now infamous 800 variant enum, this reduces optimized compile times by 25% and non-optimized compile times by 40%. Also peak memory usage is down by almost 40% (310MB down to 190MB). To be fair, most other crates don't benefit nearly as much, because they don't have as huge enums. The crates in the Rust distribution that I measured saw basically no change in compile times (I only tried optimized builds) and only 1-2% reduction in peak memory usage.
Configuration menu - View commit details
-
Copy full SHA for 31d4b35 - Browse repository at this point
Copy the full SHA 31d4b35View commit details -
Rollup merge of rust-lang#33596 - nikomatsakis:issue-33586-regr-assoc…
…-type-path, r=eddyb re-introduce a cache for ast-ty-to-ty It turns out that `ast_ty_to_ty` is supposed to be updating the `def` after it finishes, but at some point in the past it stopped doing so. This was never noticed because of the `ast_ty_to_ty_cache`, but that cache was recently removed. This PR fixes the code to update the def properly, but apparently that is not quite enough to make the operation idempotent, so for now we reintroduce the cache too. Fixes rust-lang#33586. r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 73f75cc - Browse repository at this point
Copy the full SHA 73f75ccView commit details -
Rollup merge of rust-lang#33598 - haikoschol:master, r=alexcrichton
doc: Fix comment in std::string::String example code
Configuration menu - View commit details
-
Copy full SHA for d1ab5d2 - Browse repository at this point
Copy the full SHA d1ab5d2View commit details -
Rollup merge of rust-lang#33600 - ollie27:rustdoc_impl_params, r=alex…
…crichton rustdoc: Fix missing type parameters on impls They were broken by rust-lang#32558. Fixes: rust-lang#33592
Configuration menu - View commit details
-
Copy full SHA for f657a30 - Browse repository at this point
Copy the full SHA f657a30View commit details -
Rollup merge of rust-lang#33602 - eddyb:no-trans--check, r=michaelwoe…
…rister Save metadata even with -Z no-trans (e.g. for multi-crate cargo check). Removes the item symbol map in metadata, as we can now generate them in a deterministic manner. The `-Z no-trans` change lets the LLVM passes and linking run, but with just metadata and no code. It fails while trying to link a binary because there's no `main` function, which is correct but not good UX. There's also no way to easily throw away all of the artifacts to rebuild with actual code generation. We might want `cargo check` to do that using cargo-internal information and then it would just work. cc @alexcrichton @nikomatsakis @Aatch @michaelwoerister
Configuration menu - View commit details
-
Copy full SHA for 96297ea - Browse repository at this point
Copy the full SHA 96297eaView commit details