Commit Graph

3278 Commits

Author SHA1 Message Date
bjorn3
5bf5153d00 Fix non-dynamic indexing into vector types 2023-02-14 15:49:32 +00:00
bjorn3
478bc5ba01 Rustup to rustc 1.69.0-nightly (065852def 2023-02-13) 2023-02-14 12:18:14 +01:00
bjorn3
72c6655224 Sync from rust e9ab7872fd 2023-02-14 12:09:13 +01:00
Oli Scherer
14bc2e60c2 s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
Alan Egerton
c95eca2857 Alias folding/visiting traits instead of re-export 2023-02-13 10:24:46 +00:00
bjorn3
efd33c5a84
Merge pull request #1356 from matthiaskrgr/clippy_compl
clippy::complexity fixes
2023-02-10 23:43:48 +01:00
Matthias Krüger
0b62b643e3 clippy::complexity fixes 2023-02-10 22:21:02 +01:00
bjorn3
291cadb2d8
Merge pull request #1355 from matthiaskrgr/clippy_perf
clippy::perf fixes
2023-02-10 21:06:22 +01:00
Matthias Krüger
1a072c5688 clippy::perf fixes 2023-02-10 20:04:32 +01:00
bjorn3
4a1c2d9c7c Fix signaling available_token_condvar when a new token is received
This slightly improves performance on systems with many cores and
barely affects systems with few cores.

My laptop (2 core + HT):
Before:
Benchmark 2: RUSTC=rustc /home/bjorn/Projects/cg_clif2/./dist/cargo-clif build --manifest-path /home/bjorn/Projects/cg_clif2/./download/simple-raytracer/Cargo.toml --target-dir /home/bjorn/Projects/cg_clif2/./build/simple_raytracer
  Time (mean ± σ):     12.042 s ±  0.313 s    [User: 29.434 s, System: 4.720 s]
  Range (min … max):   11.670 s … 12.795 s    10 runs

After:
Benchmark 2: RUSTC=rustc /home/bjorn/Projects/cg_clif2/./dist/cargo-clif build --manifest-path /home/bjorn/Projects/cg_clif2/./download/simple-raytracer/Cargo.toml --target-dir /home/bjorn/Projects/cg_clif2/./build/simple_raytracer
  Time (mean ± σ):     12.037 s ±  0.384 s    [User: 29.960 s, System: 4.722 s]
  Range (min … max):   11.673 s … 12.769 s    10 runs

Dev desktop (32 cores)
Before:
Benchmark 2: RUSTC=rustc /home/gh-bjorn3/cg_clif/./dist/cargo-clif build --manifest-path /home/gh-bjorn3/cg_clif/./download/simple-raytracer/Cargo.toml --target-dir /home/gh-bjorn3/cg_clif/./build/simple_raytracer
  Time (mean ± σ):     10.425 s ±  0.104 s    [User: 25.877 s, System: 5.513 s]
  Range (min … max):   10.267 s … 10.640 s    10 runs

After:
Benchmark 2: RUSTC=rustc /home/gh-bjorn3/cg_clif/./dist/cargo-clif build --manifest-path /home/gh-bjorn3/cg_clif/./download/simple-raytracer/Cargo.toml --target-dir /home/gh-bjorn3/cg_clif/./build/simple_raytracer
  Time (mean ± σ):     10.212 s ±  0.100 s    [User: 25.918 s, System: 5.555 s]
  Range (min … max):   10.079 s … 10.362 s    10 runs
2023-02-10 18:08:39 +00:00
bjorn3
7870b296e4 Remove a couple of duplicate layout_of and monomorphize calls 2023-02-10 09:26:01 +00:00
bjorn3
bdb0665479 Avoid spurious visible_parent_map query invocation 2023-02-10 09:26:01 +00:00
bjorn3
bbf39002e6 Merge branch 'sync_from_rust' 2023-02-09 12:39:32 +01:00
bjorn3
56951e4f2b Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
bjorn3
7d53619064 Force the allocator to be looked up from the perspective of the rustc binary
Fixes #1303
2023-02-07 15:37:49 +01:00
bjorn3
8494882773 Rustup to rustc 1.69.0-nightly (75a0be98f 2023-02-05) 2023-02-06 18:32:25 +01:00
bjorn3
6dfa3c9513 Sync from rust 044a28a409 2023-02-06 18:03:15 +01:00
bjorn3
5ab690d9e7
Merge pull request #1351 from bjorn3/global_asm_const
Implement const and sym operands for global asm
2023-02-05 20:41:49 +01:00
bjorn3
178e267977 Implement sym operands for global asm 2023-02-05 18:48:40 +00:00
bjorn3
df6b067900 Implement const operands for global asm 2023-02-05 18:17:51 +00:00
bjorn3
e238ea6155
Merge pull request #1350 from bjorn3/inline_asm_sym
Implement const and sym operands for inline asm
2023-02-05 19:17:00 +01:00
bjorn3
a2719a285c Fix linker error when inline asm sym operand is not exported from local CGU 2023-02-05 17:39:00 +00:00
bjorn3
2e93be3a4c Add create_wrapper_function helper 2023-02-05 17:24:02 +00:00
bjorn3
044a3a65a0 Support const and sym operands in inline asm 2023-02-05 17:00:47 +00:00
bjorn3
8b48138039
Merge pull request #1347 from bjorn3/dist_no_debug_assertions
Build CI dist artifacts without debug assertions
2023-02-05 15:47:23 +01:00
bjorn3
761a91ade8 Build CI dist artifacts without debug assertions
This significantly improves performance. For example for the
simple-raytracer benchmark it goes from a 13% improvement over LLVM to
39% improvement over LLVM.
2023-02-04 11:31:17 +00:00
bjorn3
efb92a1ae8 Use packed debuginfo for the sysroot on macOS
This reduces the sysroot size
2023-02-03 20:02:15 +00:00
bjorn3
f5669a3548 Fix assert_mem_uninitialized_valid in release mode 2023-02-03 20:02:15 +00:00
bjorn3
2c229a884f
Merge pull request #1346 from bjorn3/self_profile_cleanup
Improve -Ztime-passes and -Zself-profile output
2023-02-03 20:48:22 +01:00
bjorn3
a0d3b0963d Record cranelift pass timings in self profile results 2023-02-03 18:39:05 +00:00
bjorn3
469783c263 Use generic_activity_with_arg in codegen_fn and compile_fn 2023-02-03 17:33:39 +00:00
bjorn3
d2ffe40864 Cleanup -Ztime-passes output 2023-02-03 17:16:09 +00:00
bjorn3
a465d6a860 Move codegen_and_compile_fn to driver/jit.rs 2023-02-03 16:48:35 +00:00
bjorn3
21bdff8bc0 Fix transmute from vector to scalar pair again 2023-02-01 15:28:06 +01:00
bjorn3
78bf4af659 Fix hyperfine install on CI 2023-02-01 13:58:05 +00:00
bjorn3
df04fd6fba Don't force many scalar pair values to the stack in write_cvalue_maybe_transmute
Sometimes it is necessary for handling vector to scalar pair transmutes,
but if the types are the same there is no need for this.

This improves runtime performance on simple-raytracer by 12%.
2023-02-01 13:55:28 +00:00
bjorn3
79f4cc0822 Run y.rs bench in CI 2023-01-31 18:14:54 +00:00
bjorn3
d1024b6560 Fix y.rs bench 2023-01-31 17:44:29 +00:00
bjorn3
572e32b4cd Fix rustc test suite 2023-01-31 17:39:19 +00:00
bors
ba7bb62e25 Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk
Use stable metric for const eval limit instead of current terminator-based logic

This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.

The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).

Also see: #103877
2023-01-29 04:11:27 +00:00
bjorn3
3ba9b13490 Don't download abi-cafe and simple-raytracer in ./y.rs prepare
Instead download them on the fly
2023-01-27 18:44:19 +00:00
bors
7ef46c8bab Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnr
Switch to `EarlyBinder` for `fn_sig` query

Part of the work to finish #105779 (also see https://github.com/rust-lang/types-team/issues/78).

Several queries `X` have a `bound_X` variant that wraps the output in [`EarlyBinder`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.EarlyBinder.html). This adds `EarlyBinder` to the return type of the `fn_sig` query and removes `bound_fn_sig`.

r? `@lcnr`
2023-01-27 15:02:44 +00:00
bjorn3
e24fa2f915 Rustup to rustc 1.69.0-nightly (d7948c843 2023-01-26) 2023-01-27 12:43:49 +01:00
bjorn3
56cb727734 Sync from rust 18890f05f6 2023-01-27 12:36:10 +01:00
Kyle Matsuda
21575908c6 add EarlyBinder::no_bound_vars 2023-01-26 20:28:31 -07:00
Kyle Matsuda
7bb0bfea04 change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata 2023-01-26 20:28:25 -07:00
Kyle Matsuda
a88ec47d48 replace usages of fn_sig query with bound_fn_sig 2023-01-26 20:15:36 -07:00
bors
02d5f7fa4d Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3
Sync rustc_codegen_cranelift

For cg_clif itself there have been a couple of bug fixes since the last sync, a Cranelift update and implemented all remaining simd platform intrinsics used by `std::simd`. (`std::arch` still misses a lot though) Most of the diff is from reworking of the cg_clif build system though.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-01-27 00:03:09 +00:00
bors
3ac370b890 Auto merge of #107314 - matthiaskrgr:rollup-j40lnlj, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #106407 (Improve proc macro attribute diagnostics)
 - #106960 (Teach parser to understand fake anonymous enum syntax)
 - #107085 (Custom MIR: Support binary and unary operations)
 - #107086 (Print PID holding bootstrap build lock on Linux)
 - #107175 (Fix escaping inference var ICE in `point_at_expr_source_of_inferred_type`)
 - #107204 (suggest qualifying bare associated constants)
 - #107248 (abi: add AddressSpace field to Primitive::Pointer )
 - #107272 (Implement ObjectSafe and WF in the new solver)
 - #107285 (Implement `Generator` and `Future` in the new solver)
 - #107286 (ICE in new solver if we see an inference variable)
 - #107313 (Add Style Team Triagebot config)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-01-26 06:23:14 +00:00
bors
801b1a1919 Auto merge of #105582 - saethlin:instcombine-assert-inhabited, r=cjgillot
InstCombine away intrinsic validity assertions

This optimization (currently) fires 246 times on the standard library. It seems to fire hardly at all on the big crates in the benchmark suite. Interesting.
2023-01-26 03:10:52 +00:00