]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRename `optin_builtin_traits` to `auto_traits`
Camelid [Mon, 23 Nov 2020 03:54:31 +0000 (19:54 -0800)]
Rename `optin_builtin_traits` to `auto_traits`

They were originally called "opt-in, built-in traits" (OIBITs), but
people realized that the name was too confusing and a mouthful, and so
they were renamed to just "auto traits". The feature flag's name wasn't
updated, though, so that's what this PR does.

There are some other spots in the compiler that still refer to OIBITs,
but I don't think changing those now is worth it since they are internal
and not particularly relevant to this PR.

Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.

3 years agoDrop support for cloudabi targets
Lzu Tao [Tue, 27 Oct 2020 13:10:31 +0000 (13:10 +0000)]
Drop support for cloudabi targets

3 years agoupdate `cg_clif`
Bastian Kauschke [Wed, 28 Oct 2020 07:25:06 +0000 (08:25 +0100)]
update `cg_clif`

3 years agoChanged unwrap_or to unwrap_or_else in some places.
Nicholas-Baron [Fri, 6 Nov 2020 21:24:55 +0000 (13:24 -0800)]
Changed unwrap_or to unwrap_or_else in some places.

The discussion seems to have resolved that this lint is a bit "noisy" in
that applying it in all places would result in a reduction in
readability.

A few of the trivial functions (like `Path::new`) are fine to leave
outside of closures.

The general rule seems to be that anything that is obviously an
allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it
is a 0-sized allocation.

3 years agoRollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum
Jonas Schievink [Tue, 10 Nov 2020 13:45:21 +0000 (14:45 +0100)]
Rollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum

rustc_target: Further cleanup use of target options

Follow up to https://github.com/rust-lang/rust/pull/77729.

Implements items 2 and 4 from the list in https://github.com/rust-lang/rust/pull/77729#issue-500228243.

The first commit collapses uses of `target.options.foo` into `target.foo`.

The second commit renames some target options to avoid tautology:
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`

r? `@Mark-Simulacrum`

3 years agoRollup merge of #78674 - tmiasko:inline-substs-for-mir-body, r=oli-obk
Dylan DPC [Mon, 9 Nov 2020 00:13:42 +0000 (01:13 +0100)]
Rollup merge of #78674 - tmiasko:inline-substs-for-mir-body, r=oli-obk

inliner: Use substs_for_mir_body

Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.

Resolves #78529.
Resolves #78560.

3 years agoCollapse all uses of `target.options.foo` into `target.foo`
Vadim Petrochenkov [Sun, 8 Nov 2020 11:27:51 +0000 (14:27 +0300)]
Collapse all uses of `target.options.foo` into `target.foo`

with an eye on merging `TargetOptions` into `Target`.

`TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.

3 years agoRollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
Yuki Okushi [Fri, 6 Nov 2020 16:02:14 +0000 (01:02 +0900)]
Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514

Fix shellcheck error

## Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068

3 years agofix shellcheck error of SC2068
Daiki Ihara [Mon, 2 Nov 2020 12:17:52 +0000 (21:17 +0900)]
fix shellcheck error of SC2068

3 years agofix shellcheck error of SC2148
Daiki Ihara [Tue, 3 Nov 2020 13:55:49 +0000 (22:55 +0900)]
fix shellcheck error of SC2148

3 years agoinliner: Use substs_for_mir_body
Tomasz Miąsko [Fri, 6 Nov 2020 00:00:00 +0000 (00:00 +0000)]
inliner: Use substs_for_mir_body

Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.

3 years agoFix even more URLs
Guillaume Gomez [Thu, 5 Nov 2020 13:33:23 +0000 (14:33 +0100)]
Fix even more URLs

3 years ago`u64::try_from` will now fail if `ScalarInt` isn't exactly 64 bits, thus we use ...
oli [Wed, 4 Nov 2020 13:59:11 +0000 (13:59 +0000)]
`u64::try_from` will now fail if `ScalarInt` isn't exactly 64 bits, thus we use `to_bits` with the correct size

3 years ago`u128` truncation and sign extension are not just interpreter related
oli [Wed, 4 Nov 2020 13:41:58 +0000 (13:41 +0000)]
`u128` truncation and sign extension are not just interpreter related

3 years agos/Scalar::Raw/Scalar::Int
oli [Sun, 1 Nov 2020 16:57:03 +0000 (16:57 +0000)]
s/Scalar::Raw/Scalar::Int

3 years agoFix cranelift build
oli [Thu, 29 Oct 2020 13:30:47 +0000 (13:30 +0000)]
Fix cranelift build

3 years agoMerge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020...
bjorn3 [Tue, 3 Nov 2020 10:00:04 +0000 (11:00 +0100)]
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01

3 years agoRustup to rustc 1.49.0-nightly (4760b8fb8 2020-10-25)
bjorn3 [Mon, 26 Oct 2020 08:51:48 +0000 (09:51 +0100)]
Rustup to rustc 1.49.0-nightly (4760b8fb8 2020-10-25)

3 years agoReplace write with write_all
bjorn3 [Sun, 25 Oct 2020 12:33:39 +0000 (13:33 +0100)]
Replace write with write_all

3 years agoRemove unused trap_unimplemented_ret_value
bjorn3 [Thu, 22 Oct 2020 10:44:53 +0000 (12:44 +0200)]
Remove unused trap_unimplemented_ret_value

3 years agoRustup to rustc 1.49.0-nightly (1eaadebb3 2020-10-21)
bjorn3 [Thu, 22 Oct 2020 10:44:03 +0000 (12:44 +0200)]
Rustup to rustc 1.49.0-nightly (1eaadebb3 2020-10-21)

3 years agoUse architecture pointer size for AddConstructor (#1094)
Kitsu [Fri, 16 Oct 2020 14:19:22 +0000 (17:19 +0300)]
Use architecture pointer size for AddConstructor (#1094)

* Use architecture pointer size for AddConstructor

* Update src/backend.rs

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agoError on non-constant simd_insert/simd_extract index
bjorn3 [Fri, 16 Oct 2020 12:03:29 +0000 (14:03 +0200)]
Error on non-constant simd_insert/simd_extract index

3 years agoRustup to rustc 1.49.0-nightly (dd7fc54eb 2020-10-15)
bjorn3 [Fri, 16 Oct 2020 07:35:48 +0000 (09:35 +0200)]
Rustup to rustc 1.49.0-nightly (dd7fc54eb 2020-10-15)

3 years agoFix compilation for non-unix systems
bjorn3 [Thu, 15 Oct 2020 16:51:49 +0000 (18:51 +0200)]
Fix compilation for non-unix systems

3 years agoFix a compilation error in debug mode
bjorn3 [Thu, 15 Oct 2020 16:44:22 +0000 (18:44 +0200)]
Fix a compilation error in debug mode

3 years agoUse MetadataRef in the metadata loader to fix parallel rustc
bjorn3 [Thu, 15 Oct 2020 14:15:04 +0000 (16:15 +0200)]
Use MetadataRef in the metadata loader to fix parallel rustc

3 years agoFix warning
bjorn3 [Thu, 15 Oct 2020 13:39:06 +0000 (15:39 +0200)]
Fix warning

3 years agoOutput clif ir to output dir instead of hardcoded path
bjorn3 [Thu, 15 Oct 2020 08:57:56 +0000 (10:57 +0200)]
Output clif ir to output dir instead of hardcoded path

This is necessary for reproducable builds.

3 years agoRustup to rustc 1.49.0-nightly (e160e5cb8 2020-10-14)
bjorn3 [Thu, 15 Oct 2020 08:34:13 +0000 (10:34 +0200)]
Rustup to rustc 1.49.0-nightly (e160e5cb8 2020-10-14)

3 years agoRustup to rustc 1.49.0-nightly (c71248b70 2020-10-11)
bjorn3 [Mon, 12 Oct 2020 12:23:36 +0000 (14:23 +0200)]
Rustup to rustc 1.49.0-nightly (c71248b70 2020-10-11)

3 years agoAvoid iadd for ptr const val with zero offset
bjorn3 [Mon, 12 Oct 2020 10:03:18 +0000 (12:03 +0200)]
Avoid iadd for ptr const val with zero offset

3 years agoMake _rust_extern_with_linkage_* readonly
bjorn3 [Mon, 12 Oct 2020 10:02:38 +0000 (12:02 +0200)]
Make _rust_extern_with_linkage_* readonly

3 years agoRemove MIR dump on panic
bjorn3 [Sun, 11 Oct 2020 11:24:14 +0000 (13:24 +0200)]
Remove MIR dump on panic

I haven't used it for a long time and it adds a lot of noise to the
panic print.

3 years agoFix rust-analyzer.linkedProjects paths
bjorn3 [Sun, 11 Oct 2020 11:19:04 +0000 (13:19 +0200)]
Fix rust-analyzer.linkedProjects paths

3 years agoAbort earlier when an error happens in jit mode
bjorn3 [Sun, 11 Oct 2020 09:31:36 +0000 (11:31 +0200)]
Abort earlier when an error happens in jit mode

3 years agoUpdate dependencies
bjorn3 [Sun, 11 Oct 2020 09:20:15 +0000 (11:20 +0200)]
Update dependencies

3 years agoUpdate Cranelift
bjorn3 [Sun, 11 Oct 2020 09:14:08 +0000 (11:14 +0200)]
Update Cranelift

3 years agoRustup to rustc 1.49.0-nightly (b1af43bc6 2020-10-10)
bjorn3 [Sun, 11 Oct 2020 08:58:26 +0000 (10:58 +0200)]
Rustup to rustc 1.49.0-nightly (b1af43bc6 2020-10-10)

3 years agoUse custom driver for sysroot building too
bjorn3 [Sat, 10 Oct 2020 14:41:31 +0000 (16:41 +0200)]
Use custom driver for sysroot building too

This required another custom driver to ensure that build scripts are
built using cg_llvm instead of cg_clif.

After this change only rustdoc still uses -Zcodegen-backend

3 years agoRustfmt
bjorn3 [Fri, 9 Oct 2020 17:17:52 +0000 (19:17 +0200)]
Rustfmt

3 years agoMerge pull request #1093 from bjorn3/use_new_module_interface
bjorn3 [Thu, 8 Oct 2020 17:22:15 +0000 (19:22 +0200)]
Merge pull request #1093 from bjorn3/use_new_module_interface

Use the new cranelift-module interface

3 years agoUse the new cranelift-module interface
bjorn3 [Thu, 1 Oct 2020 08:38:23 +0000 (10:38 +0200)]
Use the new cranelift-module interface

This updates Cranelift to include bytecodealliance/wasmtime#2249

3 years agoUpdate sysroot miniz_oxide
bjorn3 [Thu, 8 Oct 2020 11:37:02 +0000 (13:37 +0200)]
Update sysroot miniz_oxide

3 years agoUpdate rust-analyzer config for changed path
bjorn3 [Mon, 5 Oct 2020 09:14:10 +0000 (11:14 +0200)]
Update rust-analyzer config for changed path

3 years agoInstall rustfmt by default when doing a rustup
bjorn3 [Mon, 5 Oct 2020 09:13:11 +0000 (11:13 +0200)]
Install rustfmt by default when doing a rustup

3 years agoRustup to rustc 1.49.0-nightly (beb5ae474 2020-10-04)
bjorn3 [Mon, 5 Oct 2020 09:12:41 +0000 (11:12 +0200)]
Rustup to rustc 1.49.0-nightly (beb5ae474 2020-10-04)

3 years agoRustup to rustc 1.48.0-nightly (8fe73e80d 2020-10-01)
bjorn3 [Fri, 2 Oct 2020 12:26:34 +0000 (14:26 +0200)]
Rustup to rustc 1.48.0-nightly (8fe73e80d 2020-10-01)

3 years agoPrevent usage of sccache
bjorn3 [Wed, 30 Sep 2020 07:15:02 +0000 (09:15 +0200)]
Prevent usage of sccache

It doesn't detect cg_clif as a rust compiler

Fixes #1091

3 years agoMerge pull request #1089 from bjorn3/custom_driver
bjorn3 [Tue, 29 Sep 2020 21:52:59 +0000 (23:52 +0200)]
Merge pull request #1089 from bjorn3/custom_driver

Add custom rustc driver that uses cg_clif

3 years agoUpdate readme
bjorn3 [Tue, 29 Sep 2020 17:50:03 +0000 (19:50 +0200)]
Update readme

3 years agoReplace CG_CLIF_JIT with --jit
bjorn3 [Tue, 29 Sep 2020 16:41:59 +0000 (18:41 +0200)]
Replace CG_CLIF_JIT with --jit

3 years agoDon't read CG_CLIF_JIT from init_global_lock
bjorn3 [Tue, 29 Sep 2020 16:12:23 +0000 (18:12 +0200)]
Don't read CG_CLIF_JIT from init_global_lock

In preparation to moving away from an env var

3 years agoBuild build scripts for sysroot using cg_llvm
bjorn3 [Tue, 29 Sep 2020 15:51:52 +0000 (17:51 +0200)]
Build build scripts for sysroot using cg_llvm

There is not yet a cg_clif sysroot available when building the sysroot itself

3 years agoFix JIT
bjorn3 [Tue, 29 Sep 2020 13:28:48 +0000 (15:28 +0200)]
Fix JIT

3 years agoAdd custom driver
bjorn3 [Tue, 29 Sep 2020 12:43:34 +0000 (14:43 +0200)]
Add custom driver

3 years agoFix panic
bjorn3 [Tue, 29 Sep 2020 12:11:14 +0000 (14:11 +0200)]
Fix panic

3 years agoRustup to rustc 1.48.0-nightly (fc2daaae6 2020-09-28)
bjorn3 [Tue, 29 Sep 2020 11:50:06 +0000 (13:50 +0200)]
Rustup to rustc 1.48.0-nightly (fc2daaae6 2020-09-28)

3 years agoSilence rm warning when files are not existing
bjorn3 [Tue, 29 Sep 2020 11:26:32 +0000 (13:26 +0200)]
Silence rm warning when files are not existing

3 years agoInvoke panic handler instead of trap for assert_* intrinsics
bjorn3 [Tue, 29 Sep 2020 11:22:01 +0000 (13:22 +0200)]
Invoke panic handler instead of trap for assert_* intrinsics

3 years agoEnable incr comp for release mode in Cargo.toml
bjorn3 [Tue, 29 Sep 2020 11:17:01 +0000 (13:17 +0200)]
Enable incr comp for release mode in Cargo.toml

3 years agoRemove dead code
bjorn3 [Sat, 26 Sep 2020 09:48:26 +0000 (11:48 +0200)]
Remove dead code

3 years agoSmall change to test script
bjorn3 [Wed, 23 Sep 2020 16:34:54 +0000 (18:34 +0200)]
Small change to test script

3 years agoImprove readme
bjorn3 [Wed, 23 Sep 2020 14:44:02 +0000 (16:44 +0200)]
Improve readme

3 years agoDocument almost all modules
bjorn3 [Wed, 23 Sep 2020 13:13:49 +0000 (15:13 +0200)]
Document almost all modules

Fixes #1082

3 years agoAlso allow returning PassMode::ByValPair directly into an ssa var
bjorn3 [Wed, 23 Sep 2020 12:29:18 +0000 (14:29 +0200)]
Also allow returning PassMode::ByValPair directly into an ssa var

Benchmark #1: ./raytracer_cg_clif_pre
  Time (mean ± σ):      8.251 s ±  0.021 s    [User: 8.245 s, System: 0.005 s]
  Range (min … max):    8.225 s …  8.292 s    10 runs

Benchmark #2: ./raytracer_cg_clif_post
  Time (mean ± σ):      8.206 s ±  0.043 s    [User: 8.199 s, System: 0.007 s]
  Range (min … max):    8.168 s …  8.279 s    10 runs

3 years agoMerge pull request #1083 from bjorn3/fix_lld
bjorn3 [Wed, 23 Sep 2020 12:02:29 +0000 (14:02 +0200)]
Merge pull request #1083 from bjorn3/fix_lld

Fix lld

3 years agoUse pcrel pointers in .eh_frame
bjorn3 [Wed, 23 Sep 2020 08:00:09 +0000 (10:00 +0200)]
Use pcrel pointers in .eh_frame

Fixes #1055

3 years agoAdd option to use a single section for each function
bjorn3 [Wed, 23 Sep 2020 07:43:35 +0000 (09:43 +0200)]
Add option to use a single section for each function

3 years agoUpdate Cranelift
bjorn3 [Wed, 23 Sep 2020 07:38:28 +0000 (09:38 +0200)]
Update Cranelift

3 years agoShorten __alloc symbol names a bit
bjorn3 [Wed, 23 Sep 2020 07:38:49 +0000 (09:38 +0200)]
Shorten __alloc symbol names a bit

3 years agoMisc changes
bjorn3 [Tue, 22 Sep 2020 11:06:14 +0000 (13:06 +0200)]
Misc changes

3 years agoImprove rust-analyzer configuration
bjorn3 [Tue, 22 Sep 2020 10:36:03 +0000 (12:36 +0200)]
Improve rust-analyzer configuration

3 years agoUpdate Cranelift
bjorn3 [Mon, 21 Sep 2020 17:23:39 +0000 (19:23 +0200)]
Update Cranelift

3 years agoFix debug build
bjorn3 [Mon, 21 Sep 2020 12:56:19 +0000 (14:56 +0200)]
Fix debug build

3 years agoRustup to rustc 1.48.0-nightly (f68e08933 2020-09-19)
bjorn3 [Sun, 20 Sep 2020 14:25:14 +0000 (16:25 +0200)]
Rustup to rustc 1.48.0-nightly (f68e08933 2020-09-19)

3 years agoDon't benchmark mod_bench anymore
bjorn3 [Fri, 18 Sep 2020 12:45:52 +0000 (14:45 +0200)]
Don't benchmark mod_bench anymore

3 years agoReplace FxHashMap with IndexVec for local_map
bjorn3 [Wed, 16 Sep 2020 16:45:19 +0000 (18:45 +0200)]
Replace FxHashMap with IndexVec for local_map

Fixes #745

3 years agoRemove wasmparser dependency through object
bjorn3 [Wed, 16 Sep 2020 15:17:57 +0000 (17:17 +0200)]
Remove wasmparser dependency through object

3 years agoRustfmt
bjorn3 [Wed, 16 Sep 2020 14:58:58 +0000 (16:58 +0200)]
Rustfmt

3 years agoRemove cfg-if dependency
bjorn3 [Wed, 16 Sep 2020 14:57:52 +0000 (16:57 +0200)]
Remove cfg-if dependency

3 years agoRemove byteorder dependency
bjorn3 [Wed, 16 Sep 2020 14:54:58 +0000 (16:54 +0200)]
Remove byteorder dependency

3 years agoReorganize scripts
bjorn3 [Wed, 16 Sep 2020 14:46:02 +0000 (16:46 +0200)]
Reorganize scripts

3 years agoRemove hashbrown usage
bjorn3 [Tue, 15 Sep 2020 19:00:04 +0000 (21:00 +0200)]
Remove hashbrown usage

drain_filter is now supported on nightly

3 years agoFix miscompilation in previous commit
bjorn3 [Mon, 14 Sep 2020 09:44:53 +0000 (11:44 +0200)]
Fix miscompilation in previous commit

3 years agoUse don't unroll loop in Rvalue::Repeat
bjorn3 [Mon, 14 Sep 2020 09:32:18 +0000 (11:32 +0200)]
Use don't unroll loop in Rvalue::Repeat

Fixes #1081

3 years agoRustup to rustc 1.48.0-nightly (7402a3944 2020-09-13)
bjorn3 [Mon, 14 Sep 2020 08:56:37 +0000 (10:56 +0200)]
Rustup to rustc 1.48.0-nightly (7402a3944 2020-09-13)

3 years agoFix typo
bjorn3 [Mon, 14 Sep 2020 08:32:37 +0000 (10:32 +0200)]
Fix typo

3 years agoRustup to rustc 1.48.0-nightly (73dc675b9 2020-09-06)
bjorn3 [Mon, 7 Sep 2020 19:16:35 +0000 (21:16 +0200)]
Rustup to rustc 1.48.0-nightly (73dc675b9 2020-09-06)

3 years agoFix dylib metadata writing
bjorn3 [Sat, 5 Sep 2020 09:00:34 +0000 (11:00 +0200)]
Fix dylib metadata writing

Rustc switched from flate2 to snappy

3 years agoRustup to rustc 1.48.0-nightly (c59199efc 2020-09-04)
bjorn3 [Sat, 5 Sep 2020 08:38:49 +0000 (10:38 +0200)]
Rustup to rustc 1.48.0-nightly (c59199efc 2020-09-04)

3 years agoMerge pull request #1080 from mbrubeck/deps
bjorn3 [Thu, 3 Sep 2020 23:00:12 +0000 (01:00 +0200)]
Merge pull request #1080 from mbrubeck/deps

Update to hashbrown 0.9

3 years agoUpdate to hashbrown 0.9
Matt Brubeck [Thu, 3 Sep 2020 22:38:57 +0000 (15:38 -0700)]
Update to hashbrown 0.9

3 years agoOptimize SwitchInt for bools
bjorn3 [Sun, 30 Aug 2020 11:02:53 +0000 (13:02 +0200)]
Optimize SwitchInt for bools

3 years agoSet notrap flag on loads and stores
bjorn3 [Sun, 30 Aug 2020 09:14:11 +0000 (11:14 +0200)]
Set notrap flag on loads and stores

3 years agoMerge pull request #1079 from CohenArthur/fmt-master
bjorn3 [Fri, 28 Aug 2020 12:09:34 +0000 (14:09 +0200)]
Merge pull request #1079 from CohenArthur/fmt-master

Run cargo fmt on the whole project

3 years agofmt: Skip whole module with bang
CohenArthur [Fri, 28 Aug 2020 10:28:55 +0000 (12:28 +0200)]
fmt: Skip whole module with bang

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agooptimize: Remove conditional compilation on instance
CohenArthur [Fri, 28 Aug 2020 10:26:52 +0000 (12:26 +0200)]
optimize: Remove conditional compilation on instance

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
3 years agofmt: Skip src/target_features_whitelist.rs
CohenArthur [Fri, 28 Aug 2020 10:23:01 +0000 (12:23 +0200)]
fmt: Skip src/target_features_whitelist.rs

3 years agofmt: Skip fn_sig_for_fn_abi()
CohenArthur [Fri, 28 Aug 2020 10:20:24 +0000 (12:20 +0200)]
fmt: Skip fn_sig_for_fn_abi()