]>
git.lizzy.rs Git - rust.git/log
bjorn3 [Sun, 28 Aug 2022 09:30:00 +0000 (11:30 +0200)]
Merge pull request #1273 from bjorn3/jit_pull_symbols
Use pull instead of push based model for getting dylib symbols in the jit
bjorn3 [Sun, 28 Aug 2022 08:43:19 +0000 (10:43 +0200)]
Use pull instead of push based model for getting dylib symbols in the jit
This avoids having to parse the dylibs to get all symbols and matches
the way the dynamic linker resolves symbols. Furthermore it fixes the
jit on Windows.
bjorn3 [Thu, 25 Aug 2022 14:34:28 +0000 (16:34 +0200)]
bjorn3 [Wed, 24 Aug 2022 17:06:47 +0000 (17:06 +0000)]
Rustfmt
bjorn3 [Wed, 24 Aug 2022 16:40:58 +0000 (18:40 +0200)]
Merge commit '
e9d1a0a7b0b28dd422f1a790ccde532acafbf193 ' into sync_cg_clif-2022-08-24
bjorn3 [Wed, 24 Aug 2022 16:37:37 +0000 (18:37 +0200)]
Rustup to rustc 1.65.0-nightly (
060e47f74 2022-08-23)
bjorn3 [Wed, 24 Aug 2022 16:29:45 +0000 (18:29 +0200)]
bjorn3 [Wed, 24 Aug 2022 15:22:30 +0000 (17:22 +0200)]
Merge pull request #1271 from bjorn3/parallel_comp_support
Support compiling codegen units in parallel
bjorn3 [Wed, 24 Aug 2022 14:28:40 +0000 (14:28 +0000)]
Add fixme
bjorn3 [Wed, 24 Aug 2022 10:22:01 +0000 (12:22 +0200)]
Tune drop_excess_capacity
bjorn3 [Tue, 23 Aug 2022 16:51:06 +0000 (16:51 +0000)]
Make sure to count reused cgus towards the count of jobs done
bjorn3 [Tue, 23 Aug 2022 16:11:12 +0000 (16:11 +0000)]
Add some self profiler calls
bjorn3 [Tue, 23 Aug 2022 16:09:08 +0000 (16:09 +0000)]
Compile functions from clif ir to object code in parallel
bjorn3 [Tue, 23 Aug 2022 16:06:01 +0000 (16:06 +0000)]
Use correct CguReuse variant
bjorn3 [Tue, 23 Aug 2022 16:05:29 +0000 (16:05 +0000)]
Do asm compilation and object file emission in parallel
bjorn3 [Tue, 23 Aug 2022 15:44:39 +0000 (15:44 +0000)]
Add a jobserver based concurrency limiter
bjorn3 [Fri, 19 Aug 2022 10:27:00 +0000 (10:27 +0000)]
Store symbol name as owned string
bjorn3 [Tue, 23 Aug 2022 11:10:44 +0000 (11:10 +0000)]
Revert "Avoid masking shift amounts (#1268)"
This reverts commit
156bda8bc708cca60e9de18743d833c8d97dd7ff .
This breaks the mir_overflow_off rustc test:
https://github.com/bjorn3/rustc_codegen_cranelift/runs/
7971362755 ?check_suite_focus=true#step:7:2904
Afonso Bordado [Tue, 23 Aug 2022 10:42:35 +0000 (11:42 +0100)]
Use native scalar `fma` instruction (#1267)
Cranelift 0.87 now supports lowering `fma` as a libcall on x86 [0].
With 0.88 enabling the native x86 instruction under the `has_fma` flag.
aarch64 and s390x already support this as a native instruction, so it's
nice that we emit it for those.
We can't lower the SIMD version using the `fma` instruction since the
lowering can fail if the x86 `has_fma` flag is not enabled. Cranelift
doesn't yet know how to fallback for these cases
[0]: https://github.com/bytecodealliance/wasmtime/commit/
709716bb8e6adaf7e65f3497168af23ce0cf09ef
Afonso Bordado [Tue, 23 Aug 2022 10:42:24 +0000 (11:42 +0100)]
Avoid masking shift amounts (#1268)
Cranelift 0.87 now follows its own documentation regarding
shift amounts, and implicitly masks them if the arch requires it. [0]
[0]: https://github.com/bytecodealliance/wasmtime/commit/
05089321740a07757dff0a285176b2651a49aae2
bjorn3 [Mon, 22 Aug 2022 18:53:10 +0000 (18:53 +0000)]
Update to Cranelift 0.87.0
Matthias Krüger [Sun, 21 Aug 2022 14:54:07 +0000 (16:54 +0200)]
Rollup merge of #100822 - WaffleLapkin:no_offset_question_mark, r=scottmcm
Replace most uses of `pointer::offset` with `add` and `sub`
As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts.
This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things.
r? ````@scottmcm````
_split off from #100746_
Maybe Waffle [Fri, 19 Aug 2022 09:33:06 +0000 (13:33 +0400)]
Replace most uses of `pointer::offset` with `add` and `sub`
bjorn3 [Fri, 19 Aug 2022 10:03:43 +0000 (12:03 +0200)]
Merge pull request #1266 from bjorn3/parallel_comp_refactor2
Refactorings for enabling parallel compilation (part 2)
Dylan DPC [Fri, 19 Aug 2022 06:56:41 +0000 (12:26 +0530)]
Rollup merge of #100208 - RalfJung:dyn-upcast-nop, r=petrochenkov
make NOP dyn casts not require anything about the vtable
As suggested [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/dyn-upcasting.20stabilization/near/
292151439 ). This matches what the codegen backends already do, and what Miri did do until https://github.com/rust-lang/rust/pull/99420 when I made it super extra paranoid.
bjorn3 [Thu, 18 Aug 2022 18:59:14 +0000 (18:59 +0000)]
Small cleanup
bjorn3 [Thu, 18 Aug 2022 18:19:40 +0000 (18:19 +0000)]
Move Span lowering from debuginfo finalization to codegen
This removes the dependency on TyCtxt from the debuginfo finalization
code.
bjorn3 [Thu, 18 Aug 2022 17:48:22 +0000 (17:48 +0000)]
Make line_program_add_file a DebugContext method
bjorn3 [Thu, 18 Aug 2022 17:23:36 +0000 (17:23 +0000)]
Move set_function_span earlier
bjorn3 [Thu, 18 Aug 2022 17:17:33 +0000 (17:17 +0000)]
Move FunctionDebugContext creation to codegen_fn
bjorn3 [Thu, 18 Aug 2022 17:11:41 +0000 (17:11 +0000)]
Introduce FunctionDebugContext
This will make it easier to move TyCtxt requiring operations before clif
ir compilation.
bjorn3 [Thu, 18 Aug 2022 15:57:21 +0000 (15:57 +0000)]
Use walk_chain for function span too
This is a correctness fix
bjorn3 [Thu, 18 Aug 2022 15:25:26 +0000 (15:25 +0000)]
Remove TyCtxt from DebugContext
And explicitly thread it through everwhere it is needed.
bjorn3 [Thu, 18 Aug 2022 15:19:29 +0000 (15:19 +0000)]
Remove Instance param of DebugContext::define_function
bjorn3 [Thu, 18 Aug 2022 15:14:04 +0000 (15:14 +0000)]
Remove stub local debuginfo implementation
It isn't actually wired up and temporarily removing it will make changes
to the debuginfo generation code much simpler.
bjorn3 [Thu, 18 Aug 2022 12:55:44 +0000 (12:55 +0000)]
Register debuginfo for lazy jit shim
bjorn3 [Wed, 17 Aug 2022 14:51:02 +0000 (16:51 +0200)]
Merge pull request #1265 from afonso360/stack_store
Use `stack_store` instead of `stack_addr`+`store` when building structs
bjorn3 [Wed, 17 Aug 2022 13:47:52 +0000 (13:47 +0000)]
Remove TyCtxt parameter from compile_fn
Afonso Bordado [Wed, 17 Aug 2022 13:46:05 +0000 (14:46 +0100)]
Use `stack_store` instead of `stack_addr`+`store` when building structs
bjorn3 [Wed, 17 Aug 2022 13:43:32 +0000 (13:43 +0000)]
Remove TyCtxt field from CodegenCx
bjorn3 [Wed, 17 Aug 2022 13:07:18 +0000 (13:07 +0000)]
Replace instance param of write_clif_file with symbol_name
bjorn3 [Wed, 17 Aug 2022 13:03:32 +0000 (13:03 +0000)]
Remove optimize_function
It currently doesn't have any optimizations at all.
bjorn3 [Mon, 15 Aug 2022 14:21:41 +0000 (16:21 +0200)]
Rustup to rustc 1.65.0-nightly (
801821d15 2022-08-14)
bjorn3 [Mon, 15 Aug 2022 14:17:32 +0000 (16:17 +0200)]
bjorn3 [Sun, 14 Aug 2022 16:37:30 +0000 (16:37 +0000)]
Work around new asm! usage in measureme
This is necessary to fix rustc bootstraps
bjorn3 [Sat, 13 Aug 2022 14:53:28 +0000 (16:53 +0200)]
Merge pull request #1264 from bjorn3/parallel_comp_refactor
Refactorings for enabling parallel compilation (part 1)
bjorn3 [Sat, 13 Aug 2022 12:18:41 +0000 (12:18 +0000)]
Remove TyCtxt parameter from emit_cgu
TyCtxt isn't available on background threads.
bjorn3 [Sat, 13 Aug 2022 09:03:28 +0000 (09:03 +0000)]
Move error reporting out of emit_cgu
Error reporting requires a Session, which isn't available on background
threads.
Afonso Bordado [Sat, 13 Aug 2022 09:02:16 +0000 (10:02 +0100)]
Rename abi-checker patch (#1262)
bjorn3 [Sat, 13 Aug 2022 06:34:55 +0000 (08:34 +0200)]
Merge pull request #1255 from afonso360/abi-checker
Add abi-checker to y.rs and run it on CI
Afonso Bordado [Fri, 12 Aug 2022 22:47:12 +0000 (23:47 +0100)]
Disable some abi-checker tests
Afonso Bordado [Fri, 12 Aug 2022 20:47:36 +0000 (21:47 +0100)]
Update abi-checker version
bjorn3 [Fri, 12 Aug 2022 19:10:16 +0000 (19:10 +0000)]
Move copy to incr comp cache to codegen join phase
The copy depends on Session, which is only available on the main thread.
As such the copy can't be done on future codegen threads.
bjorn3 [Fri, 12 Aug 2022 18:55:39 +0000 (18:55 +0000)]
Stream object file to disk
This reduces memory usage and may improve performance slightly.
bjorn3 [Fri, 12 Aug 2022 18:40:48 +0000 (18:40 +0000)]
Move build_isa call into make_module
bjorn3 [Fri, 12 Aug 2022 13:15:51 +0000 (13:15 +0000)]
Don't attempt to do incr comp for the allocator shim
The allocator shim doesn't get reused and the allocator shim is just
under 2kb, so reusing it is likely more expensive than regenerating it.
bjorn3 [Fri, 12 Aug 2022 13:03:18 +0000 (13:03 +0000)]
Give fields of ModuleCodegenResult names
bjorn3 [Fri, 12 Aug 2022 12:40:21 +0000 (14:40 +0200)]
Merge pull request #1260 from uweigand/s390x-ignore-aligntest
Ignore ptr_bitops_tagging test on s390x
bjorn3 [Fri, 12 Aug 2022 12:30:24 +0000 (12:30 +0000)]
Enable inline asm on macOS
bjorn3 [Fri, 12 Aug 2022 12:27:47 +0000 (12:27 +0000)]
Remove the partial linking hack for global asm support
Ulrich Weigand [Fri, 12 Aug 2022 11:46:31 +0000 (13:46 +0200)]
Ignore ptr_bitops_tagging test on s390x
This test requires dynamic stack re-alignment on s390x, which is
currently unsupported (see issue #1258).
bjorn3 [Fri, 12 Aug 2022 09:55:59 +0000 (09:55 +0000)]
Don't take TyCtxt as argument for compile_global_asm
This allows it to be executed on a background thread.
bjorn3 [Fri, 12 Aug 2022 11:14:14 +0000 (13:14 +0200)]
Merge pull request #1257 from uweigand/memcpy-align
Fix alignment flag for emit_small_memory_copy
Ulrich Weigand [Fri, 12 Aug 2022 10:48:40 +0000 (12:48 +0200)]
Fix alignment flag for emit_small_memory_copy
Do not unconditionally pass the "aligned" MemFlag when calling
emit_small_memory_copy. Instead, allow the back end to rely on
the alignment info passed separately to this routine.
bjorn3 [Fri, 12 Aug 2022 09:28:41 +0000 (09:28 +0000)]
Move some sess.fatal calls out of compile_global_asm
bjorn3 [Fri, 12 Aug 2022 09:11:47 +0000 (09:11 +0000)]
Extract global_asm module
bjorn3 [Thu, 11 Aug 2022 13:49:08 +0000 (13:49 +0000)]
Introduce OngoingCodegen type
bjorn3 [Thu, 11 Aug 2022 13:38:07 +0000 (13:38 +0000)]
Return ModuleCodegenResult from reuse_workproduct_for_cgu
bjorn3 [Wed, 10 Aug 2022 18:47:05 +0000 (18:47 +0000)]
Move cached_context out of CodegenCx
bjorn3 [Wed, 10 Aug 2022 18:29:46 +0000 (18:29 +0000)]
Split non-compile parts of codegen_fn out into a separate function
The new codegen_and_compile_fn function only calls codegen_fn and then
compile_fn. This makes it possible for both parts to be called
separately by the driver.
bjorn3 [Wed, 10 Aug 2022 15:06:17 +0000 (15:06 +0000)]
Move some code into codegen_fn_content
bjorn3 [Tue, 9 Aug 2022 12:27:34 +0000 (12:27 +0000)]
Remove most trap functions and remove all trapnz usages
bjorn3 [Mon, 8 Aug 2022 16:30:01 +0000 (18:30 +0200)]
Rustup to rustc 1.65.0-nightly (
d394408fb 2022-08-07)
bjorn3 [Mon, 8 Aug 2022 15:01:38 +0000 (17:01 +0200)]
Ralf Jung [Mon, 8 Aug 2022 13:04:26 +0000 (09:04 -0400)]
also update anyhow in codegen_cranelift
Ralf Jung [Sat, 6 Aug 2022 21:18:59 +0000 (17:18 -0400)]
make NOP dyn casts not require anything about the vtable
Afonso Bordado [Sat, 6 Aug 2022 20:24:38 +0000 (21:24 +0100)]
Move abi-checker to y.rs test
Afonso Bordado [Sat, 6 Aug 2022 19:51:47 +0000 (20:51 +0100)]
Pass all pairs to abi-checker
Afonso Bordado [Sat, 6 Aug 2022 19:51:20 +0000 (20:51 +0100)]
Add abi-checker to clean_all.sh
Afonso Bordado [Sat, 6 Aug 2022 14:59:45 +0000 (15:59 +0100)]
Test adding abi-checker to CI
Afonso Bordado [Sat, 6 Aug 2022 12:34:55 +0000 (13:34 +0100)]
Initial ABI Checker support
bjorn3 [Fri, 5 Aug 2022 13:17:13 +0000 (13:17 +0000)]
Fix previous commit
bjorn3 [Fri, 5 Aug 2022 12:57:19 +0000 (12:57 +0000)]
Disable incr comp globally on CI
bjorn3 [Fri, 5 Aug 2022 12:13:57 +0000 (12:13 +0000)]
Re-introduce test.sh as convenience wrapper around ./y.rs test
bjorn3 [Fri, 5 Aug 2022 12:13:36 +0000 (12:13 +0000)]
Update dependencies
bjorn3 [Thu, 4 Aug 2022 16:48:09 +0000 (18:48 +0200)]
Merge pull request #1254 from afonso360/float-intrinsics-fix
Use native cranelift instructions when lowering float intrinsics
Afonso Bordado [Tue, 2 Aug 2022 07:08:45 +0000 (08:08 +0100)]
Use native cranelift instructions when lowering float intrinsics
bjorn3 [Mon, 1 Aug 2022 20:15:02 +0000 (22:15 +0200)]
Merge pull request #1253 from afonso360/msvc-nosysroot
Fix `no_sysroot` testsuite for MSVC environments
Afonso Bordado [Mon, 1 Aug 2022 18:41:08 +0000 (19:41 +0100)]
Misc Cleanups
Afonso Bordado [Mon, 1 Aug 2022 10:38:56 +0000 (11:38 +0100)]
Add windows support to mini_core tests
Afonso Bordado [Mon, 1 Aug 2022 08:57:43 +0000 (09:57 +0100)]
Fix mini_core printf linking on windows
Link against legacy_stdio_definitions on windows which provides printf as a linkable symbol.
Afonso Bordado [Mon, 1 Aug 2022 08:49:54 +0000 (09:49 +0100)]
Disable JIT on windows
bjorn3 [Sun, 31 Jul 2022 10:22:22 +0000 (12:22 +0200)]
Merge pull request #1252 from afonso360/tests-rs
Move test script to y.rs
bjorn3 [Sun, 31 Jul 2022 10:15:56 +0000 (10:15 +0000)]
Rustfmt
Afonso Bordado [Sat, 30 Jul 2022 22:07:03 +0000 (23:07 +0100)]
Don't pass RUSTFLAGS to rustc in tests
Afonso Bordado [Sat, 30 Jul 2022 22:04:59 +0000 (23:04 +0100)]
Assume host target in get_file_name
Afonso Bordado [Sat, 30 Jul 2022 21:58:34 +0000 (22:58 +0100)]
Don't run tests on Windows CI
Afonso Bordado [Sat, 30 Jul 2022 21:32:06 +0000 (22:32 +0100)]
Cleanup meaningless changes
Afonso Bordado [Sat, 30 Jul 2022 21:05:39 +0000 (22:05 +0100)]
Compare lines iterator instead of full output
This avoids differences in line endings.
Afonso Bordado [Sat, 30 Jul 2022 20:08:59 +0000 (21:08 +0100)]
Log cloned regex output