Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Permit the MIR inliner to inline diverging functions#106428

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bors merged 6 commits intorust-lang:masterfromsaethlin:inline-diverging-functions
Mar 26, 2023

Conversation

@saethlin
Copy link
Member

@saethlinsaethlin commentedJan 3, 2023
edited
Loading

This heuristic prevents inlining ofhint::unreachable_unchecked, which in turn makesOption/Result::unwrap_unchecked a bad inlining candidate. I looked through the changes tocore,alloc,std, andhashbrown by hand and they all seem reasonable. Let's see how this looks in perf...


Based on rustc-perf it looks like this regresses ctfe-stress, and the cachegrind diff indicates that this regression is inInterpCx::statement. I don't know how to do any deeper analysis because that function isenormous in the try toolchain, which has no debuginfo in it. And a local build produces significantly different codegen for that function, even with LTO.

Noratrieb reacted with thumbs up emoji
@rustbotrustbot added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. T-compilerRelevant to the compiler team, which will review and decide on the PR/issue. labelsJan 3, 2023
@saethlin
Copy link
MemberAuthor

@bors try@rust-timer queue

Noratrieb reacted with thumbs up emoji

@rust-timer

This comment has been minimized.

@rustbotrustbot added the S-waiting-on-perfStatus: Waiting on a perf run to be completed. labelJan 3, 2023
@bors
Copy link
Collaborator

bors commentedJan 3, 2023

⌛ Trying commit e4ddc8a0f6cac4ea10db08d70f4d15cfd3a5ecaf with merge 696235b229d3d1166bd68a49240f1d7880b2ff2d...

@bors
Copy link
Collaborator

bors commentedJan 4, 2023

☀️ Try build successful -checks-actions
Build commit: 696235b229d3d1166bd68a49240f1d7880b2ff2d (696235b229d3d1166bd68a49240f1d7880b2ff2d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (696235b229d3d1166bd68a49240f1d7880b2ff2d):comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.8%[0.8%, 0.9%]3
Improvements ✅
(primary)
-0.4%[-0.4%, -0.4%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-0.4%[-0.4%, -0.4%]1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
5.8%[5.8%, 5.8%]1
Regressions ❌
(secondary)
2.0%[2.0%, 2.0%]1
Improvements ✅
(primary)
-0.1%[-0.1%, -0.1%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.9%[-0.1%, 5.8%]2

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
3.0%[3.0%, 3.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

@rustbotrustbot removed the S-waiting-on-perfStatus: Waiting on a perf run to be completed. labelJan 4, 2023
@nikic
Copy link
Contributor

This will fail a codegen test. It looks like invert a test condition and turn anllvm.assume into aselect withundef. I don't understand enough to be sure if that's good or bad.

Which codegen test is this?

@saethlin
Copy link
MemberAuthor

This function in particular:

pubunsafefnunchecked_shl_unsigned_smaller(a:u16,b:u32) ->u16{

@nikic
Copy link
Contributor

This function in particular:

pubunsafefnunchecked_shl_unsigned_smaller(a:u16,b:u32) ->u16{

Do you happen to have the error log (or new output) for that one?

Strange, the codegen test fails locally but not in CI.

Can at least answer that one: This is amin-llvm-version: 15.0 test, and PR CI runs with LLVM 13.

@saethlin
Copy link
MemberAuthor

saethlin commentedJan 4, 2023
edited
Loading

Ah, found the file:unchecked_shifts.txt

running 396 testsiiiiii.........i....................i...............................i................... 88/396i...........i...i...................i...........................ii...................... 176/396i..ii...i.......ii...i.ii.i................ii........................................... 264/396.....i....i....i..............................................i....i.................... 352/396................F...........................failures:---- [codegen] src/test/codegen/unchecked_shifts.rs stdout ----error: verification with 'FileCheck' failedstatus: exit status: 1command: "/home/ben/rust/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.ll" "/home/ben/rust/src/test/codegen/unchecked_shifts.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC" "--dump-input-context" "100"stdout: none--- stderr -------------------------------/home/ben/rust/src/test/codegen/unchecked_shifts.rs:23:16: error: CHECK-DAG: expected string not found in input // CHECK-DAG: %[[INRANGE:.+]] = icmp ult i32 %b, 65536               ^/home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.ll:14:43: note: scanning from heredefine i16 @unchecked_shl_unsigned_smaller(i16 %a, i32 %b) unnamed_addr #0 {                                          ^/home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.ll:16:5: note: possible intended match here %_2.i.i = icmp ugt i32 %b, 65535    ^/home/ben/rust/src/test/codegen/unchecked_shifts.rs:53:16: error: CHECK-DAG: expected string not found in input // CHECK-DAG: %[[INRANGE:.+]] = icmp ult i32 %b, 32768               ^/home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.ll:39:41: note: scanning from heredefine i16 @unchecked_shr_signed_smaller(i16 %a, i32 %b) unnamed_addr #0 {                                        ^/home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.ll:41:5: note: possible intended match here %_2.i.i = icmp ugt i32 %b, 32767    ^Input file: /home/ben/rust/build/x86_64-unknown-linux-gnu/test/codegen/unchecked_shifts/unchecked_shifts.llCheck file: /home/ben/rust/src/test/codegen/unchecked_shifts.rs-dump-input=help explains the following input dump.Input was:<<<<<<          1: ; ModuleID = 'unchecked_shifts.d7deabc1-cgu.0'           2: source_filename = "unchecked_shifts.d7deabc1-cgu.0"           3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"           4: target triple = "x86_64-unknown-linux-gnu"           5:            6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable           7: define i32 @unchecked_shl_unsigned_same(i32 %a, i32 %b) unnamed_addr #0 {           8: start:           9:  %0 = shl i32 %a, %b          10:  ret i32 %0          11: }          12:           13: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable          14: define i16 @unchecked_shl_unsigned_smaller(i16 %a, i32 %b) unnamed_addr #0 { dag:23'0                                               X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found         15: start: dag:23'0     ~~~~~~~         16:  %_2.i.i = icmp ugt i32 %b, 65535 dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~dag:23'1         ?                              possible intended match         17:  %_5.i.i = trunc i32 %b to i16 dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         18:  %.sroa.3.0.i.i = select i1 %_2.i.i, i16 undef, i16 %_5.i.i dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         19:  %0 = shl i16 %a, %.sroa.3.0.i.i dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         20:  ret i16 %0 dag:23'0     ~~~~~~~~~~~~         21: } dag:23'0     ~~         22:  dag:23'0     ~         23: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         24: define i64 @unchecked_shl_unsigned_bigger(i64 %a, i32 %b) unnamed_addr #0 { dag:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         25: start:          26:  %0 = zext i32 %b to i64          27:  %1 = shl i64 %a, %0          28:  ret i64 %1          29: }          30:           31: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable          32: define i32 @unchecked_shr_signed_same(i32 %a, i32 %b) unnamed_addr #0 {          33: start:          34:  %0 = ashr i32 %a, %b          35:  ret i32 %0          36: }          37:           38: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable          39: define i16 @unchecked_shr_signed_smaller(i16 %a, i32 %b) unnamed_addr #0 { dag:53'0                                             X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found         40: start: dag:53'0     ~~~~~~~         41:  %_2.i.i = icmp ugt i32 %b, 32767 dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~dag:53'1         ?                              possible intended match         42:  %_5.i.i = trunc i32 %b to i16 dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         43:  %.sroa.3.0.i.i = select i1 %_2.i.i, i16 undef, i16 %_5.i.i dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         44:  %0 = ashr i16 %a, %.sroa.3.0.i.i dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         45:  ret i16 %0 dag:53'0     ~~~~~~~~~~~~         46: } dag:53'0     ~~         47:  dag:53'0     ~         48: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         49: define i64 @unchecked_shr_signed_bigger(i64 %a, i32 %b) unnamed_addr #0 { dag:53'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         50: start:          51:  %0 = zext i32 %b to i64          52:  %1 = ashr i64 %a, %0          53:  ret i64 %1          54: }          55:           56: attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable "probe-stack"="__rust_probestack" "target-cpu"="x86-64" }          57:           58: !llvm.module.flags = !{!0, !1}          59:           60: !0 = !{i32 7, !"PIC Level", i32 2}          61: !1 = !{i32 2, !"RtLibUseGOT", i32 1} >>>>>>------------------------------------------failures:    [codegen] src/test/codegen/unchecked_shifts.rstest result: FAILED. 363 passed; 1 failed; 32 ignored; 0 measured; 0 filtered out; finished in 2.37sSome tests failed in compiletest suite=codegen mode=codegen host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu

@nikic
Copy link
Contributor

Thanks! The weird select should get fixed by#106294, so maybe wait for that one to land.

That'll still loose the assume, but I'm not sure we care about it (I think@scottmcm wanted to have these?)

@scottmcm
Copy link
Member

scottmcm commentedJan 7, 2023
edited
Loading

@nikic I think thatselect is actually important, because it's preserving the UB for a too-large shift (as it makes0_u16.unchecked_shift(0x100) end up doingashr i16 0, undef, which is UB because out-of-bounds shifts are UB, and theundef cold be out-of-bounds).

I don't have a strong opinion onhow the LLVM-level UB-ness for that is preserved, just that it's still there. If it ending up producing aselect like that is a good way to keep it for later LLVM optimizations (instead of the assume) and it doesn't affect codegen, then great.

But I'm slightly concerned that this means thateverthing usingunreachable_unchecked might be impacted by this in surprising ways. Why does MIR-level inlining it --unchecked_shr uses it viaunwrap_unchecked, IIRC -- mean that the LLVM codegen is changing? That seems surprising, and potentially concerning.

Would it perhaps be worth a mir-transform test thatunwrap_unchecked is still doing what we'd expect after this?

EDIT: Oh, wait, out-of-bounds shift ispoison, not UB, whereasllvm.assume(false) is UB. But I guess that's fine?


Aside: reason number 2947643 that I wanttrunc nuw to represent this stuff directly rather than needing trickyundefs andassumes...

@saethlinsaethlinforce-pushed theinline-diverging-functions branch 2 times, most recently from9fd6e31 to0dd6e02CompareJanuary 17, 2023 22:18
@saethlin
Copy link
MemberAuthor

I've rebased this up since#106294 is now merged.

By default, thellvm.assume call goes away. But the MIR has a form I've long been suspicious of: There aretwo blocks which are onlyunreachable. It turns out turning on the MIR passDeduplicateBlocks, which will delete one of these, fixes the LLVM regression. 🤔

@saethlin
Copy link
MemberAuthor

saethlin commentedJan 18, 2023
edited
Loading

I could have sworn we ensure that we emit oneunreachable block per function in rustc_codegen_ssa. So that pass shouldn't matter actually. But it seems like it does.

Turning off MIR inliningalso causes thellvm.assume calls to disappear. So it seems like we need to do just the right amount of MIR inlining to preserve thellvm.assume? If that's true, this seems very fragile, and possibly an LLVM issue, so I'm not sure if I should even care about this.

@scottmcm
Copy link
Member

Don't block this PR on that one assume. Do whatever you need for that codegen test; I can always update the implementation ofunchecked_sh[lr] to be more direct if needed.

Just so long as you're convinced that this additional inlining doesn't regress people usingunwrap_unchecked in general. That's the only thing that scares me about the codegen test failure.

@saethlinsaethlinforce-pushed theinline-diverging-functions branch from0dd6e02 tof8d0b47CompareJanuary 20, 2023 04:42
@saethlin
Copy link
MemberAuthor

saethlin commentedJan 20, 2023
edited
Loading

Just so long as you're convinced that this additional inlining doesn't regress people usingunwrap_unchecked in general. That's the only thing that scares me about the codegen test failure.

I looked for examples of other codegen in the standard library which depends onunwrap_unchecked and haven't been able to find any good ones. There is some use of it, but it's mostly buried inside larger implementations. There is a tantalizing use inOption::insert, but that can be replaced with just.unwrap() without altering codegen.

I'm going to try hunting for examples in the ecosystem.

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As all other targets are unreachable, we could InstCombine this pattern into:

_5 = Eq(_4, const 1_size);Assume(_5);goto -> bb3

Would this help LLVM ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

My instinct is that we should keep the "otherwise unreachable" part so LLVM knows that_4 is definitely1, and can optimize backwards using that.

Thus perhaps something like

Suggested change
switchInt(move _4) -> [0:bb1,1: bb3, otherwise: bb2]; // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
switchInt(move _4) -> [1:bb3, otherwise: bb2]; // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL

might be best?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I believe that transformation is accomplished by DeduplicateBlocks, which I noted back here:#106428 (comment) though I'll admit I was a bit vague.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

DeduplicateBlocks can be a heavy hammer, since it hashes basic blocks. Detecting unreachable blocks is trivial, since we only need to test the terminator. That's why I suggested modifyingInstCombine.SimplifyCfg could do the trick too.
About the final solution: either the assume or the reduced SwitchInt, I don't mind, as long as LLVM understands.

@cjgillotcjgillot added the A-mir-optArea: MIR optimizations labelJan 21, 2023
@saethlinsaethlinforce-pushed theinline-diverging-functions branch fromf8d0b47 to4b1a179CompareJanuary 22, 2023 23:49
@saethlin
Copy link
MemberAuthor

@bors try@rust-timer queue

@bors
Copy link
Collaborator

☀️ Test successful -checks-actions
Approved by: cjgillot
Pushing2420bd3 to master...

@borsbors added the merged-by-borsThis PR was explicitly merged by bors. labelMar 26, 2023
@borsbors merged commit2420bd3 intorust-lang:masterMar 26, 2023
@rustbotrustbot added this to the1.70.0 milestoneMar 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2420bd3):comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.6%[0.6%, 0.6%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-0.4%[-0.4%, -0.4%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.1%[-0.4%, 0.6%]2

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
1.5%[0.4%, 6.2%]40
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-3.2%[-5.7%, -0.1%]4
Improvements ✅
(secondary)
-4.7%[-4.7%, -4.7%]1
All ❌✅ (primary)1.1%[-5.7%, 6.2%]44

Cycles

This benchmark run did not return any relevant results for this metric.

@rustbotrustbot removed the perf-regressionPerformance regression. labelMar 26, 2023
@rust-log-analyzer
Copy link
Collaborator

The jobdist-x86_64-apple-alt failed! Check out the build log:(web)(plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling sysinfo v0.26.7error: could not compile `bootstrap`Caused by:  process didn't exit successfully: `/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0/bin/rustc --crate-name bootstrap --edition=2021 lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=1 --cfg 'feature="build-metrics"' --cfg 'feature="sysinfo"' -C metadata=ce3210034294b420 -C extra-filename=-ce3210034294b420 --out-dir /Users/runner/work/rust/rust/build/bootstrap/debug/deps -C incremental=/Users/runner/work/rust/rust/build/bootstrap/debug/incremental -L dependency=/Users/runner/work/rust/rust/build/bootstrap/debug/deps --extern atty=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libatty-f3463e585de1f047.rmeta --extern build_helper=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libbuild_helper-9d2bc277721db64f.rmeta --extern cc=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libcc-49bfe8c7d867fb37.rmeta --extern cmake=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libcmake-89997d098798ab5e.rmeta --extern fd_lock=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libfd_lock-d352b88169ae9b78.rmeta --extern filetime=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libfiletime-dfad8c62ded938a8.rmeta --extern getopts=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libgetopts-919ee0a0aa1476b8.rmeta --extern hex=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libhex-236ab3c1bfe4e4f1.rmeta --extern ignore=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libignore-a7771d5b7aea3d15.rmeta --extern libc=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/liblibc-44c5b86cce046821.rmeta --extern object=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libobject-311d048112783467.rmeta --extern once_cell=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libonce_cell-fb2de34fe0557dc6.rmeta --extern opener=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libopener-0eab13e0ca8f31ca.rmeta --extern serde=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libserde-d05a262813607a2d.rmeta --extern serde_derive=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libserde_derive-2aab301c883d1ded.dylib --extern serde_json=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libserde_json-0a148363995afa96.rmeta --extern sha2=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libsha2-7b55139cb79fb0aa.rmeta --extern sysinfo=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libsysinfo-c6ae361f7ec35ee4.rlib --extern tar=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libtar-8a82ba23634473a9.rmeta --extern termcolor=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libtermcolor-799832683ef6fe02.rmeta --extern toml=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libtoml-e06787ff05533496.rmeta --extern walkdir=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libwalkdir-d7f1d54c877394c7.rmeta --extern xz2=/Users/runner/work/rust/rust/build/bootstrap/debug/deps/libxz2-a46d8b83251c0877.rmeta -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings -L native=/usr/local/Cellar/xz/5.4.1/lib` (signal: 11, SIGSEGV: invalid memory reference)Build completed unsuccessfully in 0:01:13make: *** [prepare] Error 1Command failed. Attempt 2/5:Building bootstrap---[ 17%] Building X86GenDisassemblerTables.inc...[ 17%] Building RISCVGenSearchableTables.inc...[ 17%] Building AVRGenInstrInfo.inc...[ 17%] Building RISCVGenSubtargetInfo.inc...PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.Stack dump:0. Program arguments: ../../../bin/llvm-tblgen -gen-callingconv -I /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/X86 -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/include -I/Users/runner/work/rust/rust/src/llvm-project/llvm/include -I /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/X86/X86GenCallingConv.incStack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):0  llvm-tblgen              0x000000010e6bfafb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 431  llvm-tblgen              0x000000010e6bebb8 llvm::sys::RunSignalHandlers() + 2482  llvm-tblgen              0x000000010e6c0160 SignalHandler(int) + 2883  libsystem_platform.dylib 0x00007ff817820dfd _sigtramp + 294  llvm-tblgen              0x000000010e6a3a10 llvm::StringMapImpl::LookupBucketFor(llvm::StringRef) + 5925  libsystem_c.dylib        0x00007ff817756d24 abort + 1236  libsystem_malloc.dylib   0x00007ff817634357 has_default_zone0 + 07  libsystem_malloc.dylib   0x00007ff81763752b malloc_report + 1518  llvm-tblgen              0x000000010e4e04d9 llvm::Record::~Record() + 1219  llvm-tblgen              0x000000010e6e165f std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 6310 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3811 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3812 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2613 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3814 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2615 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3816 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3817 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3818 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3819 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2620 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3821 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3822 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3823 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 26[ 17%] Building AVRGenMCCodeEmitter.inc...24 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2625 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3826 llvm-tblgen              0x000000010e6e1646 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 3827 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2628 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2629 llvm-tblgen              0x000000010e6e163a std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>>>::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::unique_ptr<llvm::Record, std::__1::default_delete<llvm::Record>>>, void*>*) + 2630 llvm-tblgen              0x000000010e6d9f5e llvm::RecordKeeper::~RecordKeeper() + 19031 llvm-tblgen              0x000000010e6c6e1e llvm::TableGenMain(char const*, bool (*)(llvm::raw_ostream&, llvm::RecordKeeper&)) + 361432 llvm-tblgen              0x000000010e65ff49 main + 13733 llvm-tblgen              0x000000010e4311b4 start + 5234 llvm-tblgen              0x000000000000000d start + 18446744069175307917/bin/sh: line 1: 73629 Abort trap: 6           ../../../bin/llvm-tblgen -gen-callingconv -I /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/X86 -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/include -I/Users/runner/work/rust/rust/src/llvm-project/llvm/include -I /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/X86/X86GenCallingConv.incmake[2]: *** [lib/Target/X86/X86GenCallingConv.inc] Error 134make[2]: *** Deleting file `lib/Target/X86/X86GenCallingConv.inc'make[2]: *** Waiting for unfinished jobs....[ 17%] Building AVRGenRegisterInfo.inc...[ 17%] Building AVRGenSubtargetInfo.inc...[ 17%] Building M68kGenRegisterInfo.inc...[ 17%] Building M68kGenRegisterBank.inc...---[ 23%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSection.cpp.o[ 23%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSectionCOFF.cpp.o[ 23%] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/DiagnosticPrinter.cpp.o[ 23%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSectionDXContainer.cpp.omake[1]: *** [lib/Target/X86/CMakeFiles/X86CommonTableGen.dir/all] Error 2[ 23%] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Dominators.cpp.omake[1]: *** Waiting for unfinished jobs....[ 23%] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/FPEnv.cpp.o[ 23%] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Function.cpp.o[ 23%] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/GCStrategy.cpp.o[ 23%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSectionMachO.cpp.o---make: *** [all] Error 2thread 'main' panicked at 'command did not execute successfully, got: exit status: 2build script failed, must exit now', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.48/src/lib.rs:975:5 finished in 132.192 secondsBuild completed unsuccessfully in 0:05:01

@saethlinsaethlin deleted the inline-diverging-functions branchApril 2, 2023 19:28
bors added a commit to rust-lang-ci/rust that referenced this pull requestApr 21, 2023
…illotDeduplicate unreachable blocks, for real this timeInrust-lang#106428 (in particularrust-lang@41eda69) we noticed that inlining `unreachable_unchecked` can produce duplicate unreachable blocks. So we improved two MIR optimizations: `SimplifyCfg` was given a simplify to deduplicate unreachable blocks, then `InstCombine` was given a combiner to deduplicate switch targets that point at the same block. The problem is that change doesn't actually work.Our current pass order is```SimplifyCfg (does nothing relevant to this situation)Inline (produces multiple unreachable blocks)InstCombine (doesn't do anything here, oops)SimplifyCfg (produces the duplicate SwitchTargets that InstCombine is looking for)```So in here, I have factored out the specific function from `InstCombine` and placed it inside the simplify that produces the case it is looking for. This should ensure that it runs in the scenario it was designed for.Fixesrust-lang#110551r? `@cjgillot`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull requestApr 20, 2024
Deduplicate unreachable blocks, for real this timeInrust-lang/rust#106428 (in particularrust-lang/rust@41eda69) we noticed that inlining `unreachable_unchecked` can produce duplicate unreachable blocks. So we improved two MIR optimizations: `SimplifyCfg` was given a simplify to deduplicate unreachable blocks, then `InstCombine` was given a combiner to deduplicate switch targets that point at the same block. The problem is that change doesn't actually work.Our current pass order is```SimplifyCfg (does nothing relevant to this situation)Inline (produces multiple unreachable blocks)InstCombine (doesn't do anything here, oops)SimplifyCfg (produces the duplicate SwitchTargets that InstCombine is looking for)```So in here, I have factored out the specific function from `InstCombine` and placed it inside the simplify that produces the case it is looking for. This should ensure that it runs in the scenario it was designed for.Fixesrust-lang/rust#110551r? `@cjgillot`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull requestApr 27, 2024
Deduplicate unreachable blocks, for real this timeInrust-lang/rust#106428 (in particularrust-lang/rust@41eda69) we noticed that inlining `unreachable_unchecked` can produce duplicate unreachable blocks. So we improved two MIR optimizations: `SimplifyCfg` was given a simplify to deduplicate unreachable blocks, then `InstCombine` was given a combiner to deduplicate switch targets that point at the same block. The problem is that change doesn't actually work.Our current pass order is```SimplifyCfg (does nothing relevant to this situation)Inline (produces multiple unreachable blocks)InstCombine (doesn't do anything here, oops)SimplifyCfg (produces the duplicate SwitchTargets that InstCombine is looking for)```So in here, I have factored out the specific function from `InstCombine` and placed it inside the simplify that produces the case it is looking for. This should ensure that it runs in the scenario it was designed for.Fixesrust-lang/rust#110551r? `@cjgillot`
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cjgillotcjgillotcjgillot approved these changes

@WaffleLapkinWaffleLapkinWaffleLapkin left review comments

@tmiaskotmiaskotmiasko left review comments

@scottmcmscottmcmscottmcm approved these changes

Assignees

@cjgillotcjgillot

Labels

A-mir-optArea: MIR optimizationsmerged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Milestone

1.70.0

Development

Successfully merging this pull request may close these issues.

16 participants

@saethlin@rust-timer@bors@nikic@scottmcm@rust-log-analyzer@cjgillot@WaffleLapkin@rustbot@albertlarsan68@JakobDegen@the8472@compiler-errors@ehuss@matthiaskrgr@tmiasko

[8]ページ先頭

©2009-2025 Movatter.jp