Skip to content

Add new MIR constant propagation based on dataflow analysis#101168

Merged
bors merged 76 commits into
rust-lang:masterfrom
jachris:dataflow-const-prop
Nov 15, 2022
Merged

Add new MIR constant propagation based on dataflow analysis#101168
bors merged 76 commits into
rust-lang:masterfrom
jachris:dataflow-const-prop

Conversation

@jachris

@jachris jachris commented Aug 29, 2022

Copy link
Copy Markdown
Contributor

The current constant propagation in rustc_mir_transform/src/const_prop.rs fails to handle many cases that would be expected from a constant propagation optimization. For example:

let x = if true { 0 } else { 0 };

This pull request adds a new constant propagation MIR optimization pass based on the existing dataflow analysis framework. Since most of the analysis is not unique to constant propagation, a generic framework has been extracted. It works on top of the existing framework and could be reused for other optimzations.

Closes #80038. Closes #81605.

Todo

Essential

  • Writes to inactive enum variants. Resolved by rejecting the registration of places with downcast projections for now. Could be improved by flooding other variants if mutable access to a variant is observed.
  • Handle StatementKind::CopyNonOverlapping. Resolved by flooding the destination.
  • Handle UnsafeCell / !Freeze correctly.
  • Overflow propagation of CheckedBinaryOp: Decided to not propagate if overflow flag is true (false will still be propagated)
  • More documentation in general.
  • Arguments for correctness, documentation of necessary assumptions.
  • Better performance, or alternatively, require -Zmir-opt-level=3 for now.

Extra

  • Add explicit unreachability, i.e. upgrading the lattice from $\mathbb{P} \to \mathbb{V}$ to $\set{\bot} \cup (\mathbb{P} \to \mathbb{V})$.
  • Use storage statements to improve precision.
  • Consider opening issue for duplicate diagnostics: Add new MIR constant propagation based on dataflow analysis #101168 (comment)
  • Flood moved-from places with $\bot$ (requires some changes for places with tracked projections).
  • Add downcast projections back in.
  • Algebraic simplifications (possibly with a shared API; done by old const prop).
  • Propagation through slices / arrays.
  • Find other optimizations that are done by old const_prop.rs, but not by this one.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 29, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 29, 2022
@jachris

jachris commented Aug 29, 2022

Copy link
Copy Markdown
Contributor Author

@rustbot label +A-mir-opt

@rustbot rustbot added the A-mir-opt Area: MIR optimizations label Aug 29, 2022
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@jachris jachris force-pushed the dataflow-const-prop branch from 648fc1a to 77d6fad Compare August 29, 2022 22:06
@rust-log-analyzer

This comment has been minimized.

@compiler-errors

Copy link
Copy Markdown
Contributor

r? @oli-obk since you know about const prop

@JakobDegen JakobDegen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for doing this! This is impressive work, and looks to be exactly the direction that I think we should be going. For now, I've only focused on correctness in the review. Once we're confident with that, we can work on everything else.

Besides the one bug I pointed out below, there is a part of the logic here that I am very suspicious of: The place expressions that are tracked might in general be overlapping each other. This can happen either in two cases:

  1. Enums. Assuming that the layouts work out, the below MIR is DB and would be miscompiled by this pass, if I am reading the code correctly:

    (_2 as Foo).0 = 5;
    (_2 as Bar).0 = 5;
    _0 = (_2 as Foo).0;
    return

    It is not possible to generate this kind of MIR from Rust (I am working on something to be able to write it in tests at least), but it is nonetheless a part of the semantics of MIR.

  2. Pointer aliasing. This is the complicated one. The place values that we care about might in general be aliased by pointers, and we also const prop through pointers in the logic here. There is a lot of subtlety to this. For example, this code is "miscompiled:"

    #[inline(never)]
    fn foo() -> usize {
       let mut x = 0;
        let p = core::ptr::addr_of_mut!(x);
        x = 1;
        unsafe { *p = 2 };
        x
    }
    
    fn main() {
        dbg!(foo());
    }

    Miri does indeed report UB for this. Putting aside for a minute the issue of whether or not we're ok miscompiling this, there needs to be a comment in the code somewhere that states what assumptions we are making about the aliasing model that are broken by the above code.

Speaking somewhat more generally, the code that is currently responsible for handling writes needs to explain why its behavior is correct not just for the "obvious" target but for all other possibly overlapping places.

Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
Comment thread compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
@jachris

jachris commented Aug 30, 2022

Copy link
Copy Markdown
Contributor Author

Besides the one bug I pointed out below, there is a part of the logic here that I am very suspicious of: The place expressions that are tracked might in general be overlapping each other. This can happen either in two cases:

  1. Enums. Assuming that the layouts work out, the below MIR is DB and would be miscompiled by this pass, if I am reading the code correctly: [...]

This is unexpected, but I guess it can make sense to allow such writes to inactive variants. If we don't want to deal with layouts, we could flood all other variants with $\top$ when writing through a downcast projection. And we perhaps need to do the same if a mutable reference/pointer to a field of a variant escapes.

  1. Pointer aliasing. This is the complicated one. The place values that we care about might in general be aliased by pointers, and we also const prop through pointers in the logic here. There is a lot of subtlety to this. For example, this code is "miscompiled:" [...]

Miri does indeed report UB for this. Putting aside for a minute the issue of whether or not we're ok miscompiling this, there needs to be a comment in the code somewhere that states what assumptions we are making about the aliasing model that are broken by the above code.

Speaking somewhat more generally, the code that is currently responsible for handling writes needs to explain why its behavior is correct not just for the "obvious" target but for all other possibly overlapping places.

The analysis relies on some properties of Stacked Borrows. I agree that the assumptions should be clearly documented. I'm also not quite convinced yet that the way that taking a mutable reference/pointer is handled is sound (it just floods the place with $\top$). There should probably be a comment for every step in the analysis (including writes, but also for taking references and so on).

Comment thread src/test/mir-opt/dataflow-const-prop/cell.main.DataflowConstProp.diff Outdated
Comment thread src/test/mir-opt/dataflow-const-prop/issue_81605.f.DataflowConstProp.diff Outdated

@oli-obk oli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is if x { y = 42; } handled to not expose the 42 after the if block is left, by relying on the regular dataflow lattice merger erasing such information?

Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs Outdated
Comment thread compiler/rustc_mir_dataflow/src/value_analysis.rs
@oli-obk

oli-obk commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

This is absolutely awesome.

I would propose leaving anything that current const prop does not support (mut refs, dead branch handling, ...) to future PRs. Basically only add "new features" where it falls out of the current work anyway.

Do you know of anything that old const prop supports that the dataflow const propagator does not yet support?

@jachris

jachris commented Aug 30, 2022

Copy link
Copy Markdown
Contributor Author

@oli-obk

Is if x { y = 42; } handled to not expose the 42 after the if block is left, by relying on the regular dataflow lattice merger erasing such information?

Yes, exactly! Let's use the visualization provided by the dataflow analysis framework and the ValueAnalysis wrapper (which provides diffs based on the places, among other things) to see what happens.

fn foo(x: bool, mut y: i32) -> i32 {
    if x {
        y = 42;
    }
    y
}

@jachris

jachris commented Aug 30, 2022

Copy link
Copy Markdown
Contributor Author

This is absolutely awesome.

Thank you for the kind words! :)

I would propose leaving anything that current const prop does not support (mut refs, dead branch handling, ...) to future PRs. Basically only add "new features" where it falls out of the current work anyway.

I agree. Unless there are low-hanging fruits (proper dead branch handling might be easy, I might want to take a look at that).

Do you know of anything that old const prop supports that the dataflow const propagator does not yet support?

I did not really investigate that yet. However, there is algebraic simplification, also mentioned here, which is not currently done by this analysis. Although this should be an easy addition if we want it.

@jachris

jachris commented Aug 31, 2022

Copy link
Copy Markdown
Contributor Author

There are currently many open questions. However, I feel like if this approach turns out to be unsound, it most likely is due to the handling of references and aliasing (this was also brought up by @JakobDegen here). I am not aware of any formal proofs for other MIR optimizations (if you are, please let me know, it might help!), but then again, their correctness is perhaps a little bit more intuitive. Also, an actual formal proof might be infeasible. However, I think with some theory from Abstract Interpretation, we might at least put this analysis on solid ground.

With this commit, I began a semi-formal argument for why this analysis is sound. There is still a lot to cover there, but the current summary is basically: Whenever mutable access to a tracked place escapes the analysis, the tracked place must be assigned to top and stay that way for the duration of possible access. Since something like x = 5; should be propagatable, it follows that we must assume that writes to a place invalidate all mutable access that was granted to x previously (this is a connection to Stacked Borrows).

@jachris

jachris commented Sep 1, 2022

Copy link
Copy Markdown
Contributor Author

I resolved the issue with the overlapping storage of enum variants by rejecting the registration of places that contain downcast projections. This is of course not an optimal solution and could be improved in the future.

@rust-log-analyzer

This comment has been minimized.

@JakobDegen

JakobDegen commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

I'll review this again hopefully tonight, otherwise over the weekend.

I am not aware of any formal proofs for other MIR optimizations (if you are, please let me know, it might help!), but then again, their correctness is perhaps a little bit more intuitive.

I just want to clarify quickly though that I did not mean to imply that I wanted to see a full proof of soundness for the optimization. You are right that those don't exist right now (as far as I know anyway). I mostly just want to move us to a point where we are reasonable comfortable saying that if someone were to try and write such a proof, they would not hit any huge surprises of the form "it turns out this optimization depends on a whole bunch of assumptions that are not mentioned anywhere."

@jachris

jachris commented Sep 2, 2022

Copy link
Copy Markdown
Contributor Author

Adding the ability to track unreachability was not too hard (resolves #81605).

fn f() -> usize {
    1 + if true { 1 } else { 2 }
}

@bors

bors commented Sep 2, 2022

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #101318) made this pull request unmergeable. Please resolve the merge conflicts.

@jachris jachris force-pushed the dataflow-const-prop branch from ce0c101 to b4b1347 Compare September 2, 2022 15:57
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
      System Firmware Version: VMW71.00V.13989454.B64.1906190538
      OS Loader Version: 540.120.3~22
      Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
      SMC Version (system): 2.8f0
      Serial Number (system): VMf4SRZs+RBv
      Provisioning UDID: 4203018E-580F-C1B5-9525-B745CECA79EB

hw.ncpu: 3
hw.byteorder: 1234
---
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang -ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin -stdlib=libc++ -v -c -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_1.o native_dep_1.c
ar crus /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_1.a /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_1.o
/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang -ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin -stdlib=libc++ -v -c -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_2.o native_dep_2.c
ar crus /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_2.a /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_2.o
/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang -ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin -stdlib=libc++ -v -c -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_3.o native_dep_3.c
ar crus /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_3.a /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_3.o
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs  rust_dep_up.rs --crate-type=rlib -Zpacked_bundled_libs
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "U.*native_f2"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep_up.rust_dep_up.9cf8be89-cgu.0.rcgu.o:
---------------- T __ZN11rust_dep_up11rust_dep_up17h591fcb77681d961dE
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
                 U _native_f2
                 U _native_f3

[[[ end stdout ]]]
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "U.*native_f3"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep_up.rust_dep_up.9cf8be89-cgu.0.rcgu.o:
---------------- T __ZN11rust_dep_up11rust_dep_up17h591fcb77681d961dE
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
                 U _native_f2
                 U _native_f3

[[[ end stdout ]]]
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "T.*rust_dep_up"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep_up.rust_dep_up.9cf8be89-cgu.0.rcgu.o:
---------------- T __ZN11rust_dep_up11rust_dep_up17h591fcb77681d961dE
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
                 U _native_f2
                 U _native_f3

[[[ end stdout ]]]
ar t /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" "native_dep_2"
[[[ begin stdout ]]]
__.SYMDEF
lib.rmeta
rust_dep_up.rust_dep_up.9cf8be89-cgu.0.rcgu.o
libnative_dep_2.a
libnative_dep_3.a

[[[ end stdout ]]]
ar t /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" "native_dep_3"
[[[ begin stdout ]]]
__.SYMDEF
lib.rmeta
rust_dep_up.rust_dep_up.9cf8be89-cgu.0.rcgu.o
libnative_dep_2.a
libnative_dep_3.a

[[[ end stdout ]]]
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs  rust_dep_local.rs --extern rlib=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib -Zpacked_bundled_libs --crate-type=rlib
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "U.*native_f1"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep_local.rust_dep_local.17a839ca-cgu.0.rcgu.o:
                 U __ZN11rust_dep_up11rust_dep_up17h591fcb77681d961dE
---------------- T __ZN14rust_dep_local14rust_dep_local17h9562439c45fb1788E
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
                 U _native_f1

[[[ end stdout ]]]
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "T.*rust_dep_local"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep_local.rust_dep_local.17a839ca-cgu.0.rcgu.o:
                 U __ZN11rust_dep_up11rust_dep_up17h591fcb77681d961dE
---------------- T __ZN14rust_dep_local14rust_dep_local17h9562439c45fb1788E
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
                 U _native_f1

[[[ end stdout ]]]
ar t /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" "native_dep_1"
[[[ begin stdout ]]]
__.SYMDEF
lib.rmeta
rust_dep_local.rust_dep_local.17a839ca-cgu.0.rcgu.o
libnative_dep_1.a

[[[ end stdout ]]]
# Make sure compiler doesn't use files, that it shouldn't know about.
rm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/*native_dep_*
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs  main.rs --extern lib=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.exe -Zpacked_bundled_libs --print link-args | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "native_dep_1.*native_dep_2.*native_dep_3"
[[[ begin stdout ]]]
"cc" "-arch" "x86_64" "-m64" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/symbols.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.0.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.1.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.2.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.3.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.4.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.4g86d6gt786od2ny.rcgu.o" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_1.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_2.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_3.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd-b706291094b027ef.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-26793481f52a6183.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libobject-255e039944a74112.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-1b5390a4c4ea9670.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-7ff5ded3cc87cac1.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libgimli-3bc94adda00ae909.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-3b1acde86cef02df.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-475d6817bf154f91.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3f74afb4c8b5ee8d.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-f41ecafa3ea6ace0.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libadler-3f9d4598433d8696.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-f17787f13d366dbc.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-844b6239e11df154.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-31edd1de4ccf8e64.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-626e8a15f1ab42d5.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1a1a8a9181840fa7.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-7763b67623a38e07.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcore-3775c6f0a76e9fa6.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-357b73ae6c57f814.rlib" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.exe" "-Wl,-dead_strip" "-nodefaultlibs"

[[[ end stdout ]]]
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.exe | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "T.*native_f1"
[[[ begin stdout ]]]

[[[ end stdout ]]]
Error: cannot match: T.*native_f1
--- stderr -------------------------------
clang version 14.0.5 (https://github.com/tru/llvm-release-build 686807a176470032c208f27da2cc31b1c10777c6)
Target: x86_64-apple-darwin
Thread model: posix
Thread model: posix
InstalledDir: /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin
 (in-process)
 "/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang-14" -cc1 -triple x86_64-apple-macosx10.8.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name native_dep_1.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -ffp-contract=on -fno-rounding-math -funwind-tables=2 -faligned-alloc-unavailable -target-sdk-version=12.3 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=lldb -target-linker-version 14.0.5 -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -resource-dir /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5 -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -internal-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5/include -internal-externc-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -fdebug-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_1.o -x c native_dep_1.c
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-apple-darwin21.6.0
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
clang version 14.0.5 (https://github.com/tru/llvm-release-build 686807a176470032c208f27da2cc31b1c10777c6)
Thread model: posix
InstalledDir: /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin
 (in-process)
 (in-process)
 "/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang-14" -cc1 -triple x86_64-apple-macosx10.8.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name native_dep_2.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -ffp-contract=on -fno-rounding-math -funwind-tables=2 -faligned-alloc-unavailable -target-sdk-version=12.3 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=lldb -target-linker-version 14.0.5 -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -resource-dir /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5 -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -internal-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5/include -internal-externc-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -fdebug-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_2.o -x c native_dep_2.c
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-apple-darwin21.6.0
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
clang version 14.0.5 (https://github.com/tru/llvm-release-build 686807a176470032c208f27da2cc31b1c10777c6)
Thread model: posix
InstalledDir: /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin
 (in-process)
 (in-process)
 "/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang-14" -cc1 -triple x86_64-apple-macosx10.8.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name native_dep_3.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -ffp-contract=on -fno-rounding-math -funwind-tables=2 -faligned-alloc-unavailable -target-sdk-version=12.3 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=lldb -target-linker-version 14.0.5 -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -resource-dir /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5 -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -internal-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/lib/clang/14.0.5/include -internal-externc-isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -fdebug-compilation-dir=/Users/runner/work/rust/rust/src/test/run-make/rlib-format-packed-bundled-libs -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/libnative_dep_3.o -x c native_dep_3.c
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-apple-darwin21.6.0
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include
 /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib:lib.rmeta: no symbols
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib:lib.rmeta: no symbols
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib:lib.rmeta: no symbols
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib:lib.rmeta: no symbols
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib:lib.rmeta: no symbols
warning: ignoring --out-dir flag due to -o flag
error: linking with `cc` failed: exit status: 1
  |
  |
  = note: "cc" "-arch" "x86_64" "-m64" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/symbols.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.0.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.1.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.2.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.3.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.main.cbcd4161-cgu.4.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.4g86d6gt786od2ny.rcgu.o" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_local.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_1.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_2.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/rustcTvkCi2/libnative_dep_3.a" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd-b706291094b027ef.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-26793481f52a6183.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libobject-255e039944a74112.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-1b5390a4c4ea9670.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-7ff5ded3cc87cac1.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libgimli-3bc94adda00ae909.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-3b1acde86cef02df.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-475d6817bf154f91.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3f74afb4c8b5ee8d.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-f41ecafa3ea6ace0.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libadler-3f9d4598433d8696.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-f17787f13d366dbc.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-844b6239e11df154.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-31edd1de4ccf8e64.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-626e8a15f1ab42d5.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1a1a8a9181840fa7.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-7763b67623a38e07.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcore-3775c6f0a76e9fa6.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-357b73ae6c57f814.rlib" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.exe" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: in /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib(libnative_dep_2.a), archive member 'libnative_dep_2.a' with length 824 is not mach-o or llvm bitcode file '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/librust_dep_up.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error; 1 warning emitted


/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin/llvm-nm: error: /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs/rlib-format-packed-bundled-libs/main.exe: No such file or directory
make: *** [all] Error 1



---- [run-make] src/test/run-make/rlib-format-packed-bundled-libs-2 stdout ----
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
--- stdout -------------------------------
# Build strange-named dep.
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2 -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2  native_dep.rs --crate-type=staticlib -o /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/native_dep.ext
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2 -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2  rust_dep.rs --crate-type=rlib -Zpacked_bundled_libs
"/Users/runner/work/rust/rust/build/x86_64-apple-darwin/ci-llvm/bin"/llvm-nm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" -e "U.*native_f1"
[[[ begin stdout ]]]
lib.rmeta:


rust_dep.rust_dep.f8908835-cgu.0.rcgu.o:
                 U __ZN4core9panicking5panic17h07b892c06fe6c8ceE
---------------- T __ZN8rust_dep8rust_dep17h46da1ffdf057d344E
                 U _native_f1

[[[ end stdout ]]]
ar t /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib | "/Users/runner/work/rust/rust/src/etc/cat-and-grep.sh" "native_dep.ext"
[[[ begin stdout ]]]
__.SYMDEF
lib.rmeta
rust_dep.rust_dep.f8908835-cgu.0.rcgu.o
native_dep.ext

[[[ end stdout ]]]
# Make sure compiler doesn't use files, that it shouldn't know about.
rm /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/native_dep.ext
DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2:/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2 -L /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2  main.rs --extern rust_dep=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib -Zpacked_bundled_libs
--- stderr -------------------------------
warning: ignoring --out-dir flag due to -o flag

warning: 1 warning emitted
warning: 1 warning emitted

/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib:lib.rmeta: no symbols
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "x86_64" "-m64" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/rustckBsR7l/symbols.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.0.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.1.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.2.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.3.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.4.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.4g86d6gt786od2ny.rcgu.o" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/rustckBsR7l/native_dep.ext" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd-b706291094b027ef.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-26793481f52a6183.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libobject-255e039944a74112.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-1b5390a4c4ea9670.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-7ff5ded3cc87cac1.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libgimli-3bc94adda00ae909.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-3b1acde86cef02df.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-475d6817bf154f91.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3f74afb4c8b5ee8d.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-f41ecafa3ea6ace0.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libadler-3f9d4598433d8696.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-f17787f13d366dbc.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-844b6239e11df154.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-31edd1de4ccf8e64.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-626e8a15f1ab42d5.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1a1a8a9181840fa7.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-7763b67623a38e07.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcore-3775c6f0a76e9fa6.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-357b73ae6c57f814.rlib" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: in /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib(native_dep.ext), archive member 'native_dep.ext' with length 8016184 is not mach-o or llvm bitcode file '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

make: *** [all] Error 1

@bors

bors commented Nov 14, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 14, 2022
@matthiaskrgr

Copy link
Copy Markdown
Member

Same failure as here: #104399 (comment)
Weird...
@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2022
@bors

bors commented Nov 15, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 24d2e90 with merge 357f660...

@bors

bors commented Nov 15, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 357f660 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 15, 2022
@bors bors merged commit 357f660 into rust-lang:master Nov 15, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 15, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (357f660): comparison URL.

Overall result: ❌ regressions - 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-5.1%, -5.1%] 1
All ❌✅ (primary) - - 0

Cycles

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

@rustbot rustbot removed the perf-regression Performance regression. label Nov 15, 2022
@jachris jachris deleted the dataflow-const-prop branch November 16, 2022 17:45
Comment thread compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-mir-opt Area: MIR optimizations A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MIR-opt not const-folding Tracking Issue for Non-Lexical Constant Propagation