Skip to content

Replace most uses of type_array with type_byte_array in rustc_codegen_llvm - #165928

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:type-byte-array
Open

beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:type-byte-array

Conversation

@beetrees

Copy link
Copy Markdown
Contributor

Most uses of type_array in rustc_codegen_llvm pass type_i8() as the element type and a size as the length. This PR splits that use case into a dedicated type_byte_array method.

r? @bjorn3

@rustbot

rustbot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_codegen_llvm/src/debuginfo

cc @Walnut356

@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Nov 13, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 13, 2026
@bjorn3

bjorn3 commented Nov 13, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f69d643 has been approved by bjorn3

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 13, 2026
Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`

Most uses of `type_array` in `rustc_codegen_llvm` pass `type_i8()` as the element type and a size as the length. This PR splits that use case into a dedicated `type_byte_array` method.

r? @bjorn3
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 13, 2026
Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`

Most uses of `type_array` in `rustc_codegen_llvm` pass `type_i8()` as the element type and a size as the length. This PR splits that use case into a dedicated `type_byte_array` method.

r? @bjorn3
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #160618 (require a consistent codegen backend when -Zllvm-target-feature is present)
 - #164043 (alloc: Unstably add `Vec::repeat` and `Vec::repeat_in`)
 - #164823 (Use `DerefMut` and `IndexMut` before `&raw mut` autoborrow)
 - #165568 (rustdoc: Suggest corrections for reference label typos)
 - #165924 (rustc_codegen_gcc subtree update 2026-11-13)
 - #165927 (Remove `const_struct` from `rustc_codegen_ssa`)
 - #165928 (Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`)
 - #164362 (Emit note for `non_exhaustive` within defining crate for `unreachable_patterns`)
 - #164997 (Fix as str suggestion in subpattern)
 - #165868 (Small changes to dyn compatibility)
 - #165879 (Add `#[rustc_test_entrypoint_marker]` back !)
 - #165903 (Fix borrowck ICE when a borrow outlives a local in a const block)
 - #165914 (Use `trim_prefix` in bootstrap)
 - #165919 (tests: accept better behavior on underaligned accesses)
@Zalathar

Copy link
Copy Markdown
Member

@bors rollup=iffy
@bors try jobs=test-aarch64-msvc-2

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`


try-job: test-aarch64-msvc-2
@rust-bors

rust-bors Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Testing commit f69d643 with merge 787a615...

Workflow: https://github.com/rust-lang/rust/actions/runs/43531200682

rust-bors Bot pushed a commit that referenced this pull request Nov 14, 2026
Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`

Most uses of `type_array` in `rustc_codegen_llvm` pass `type_i8()` as the element type and a size as the length. This PR splits that use case into a dedicated `type_byte_array` method.

r? @bjorn3
@Zalathar

Copy link
Copy Markdown
Member

Pulling this out of the queue while the try job runs.

@bors r-

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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, 2026
@rust-bors

rust-bors Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#165940), which was unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

View changes since this unapproval

@rust-bors

rust-bors Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 1a6cbc4 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-msvc-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] find_msvc_tools test:false 1.113
[RUSTC-TIMING] cc test:false 1.369
   Compiling compiler_builtins v0.1.160 (C:\a\rust\rust\library\compiler-builtins\compiler-builtins)
[RUSTC-TIMING] build_script_build test:false 0.801
Assertion failed: E <= end() && "Trying to erase past the end.", file C:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/TinyPtrVector.h, line 270
[RUSTC-TIMING] core test:false 28.287
error: could not compile `core` (lib)

Caused by:
  process didn't exit successfully: `C:\a\rust\rust\build\bootstrap\debug\rustc 'C:\a\rust\rust\build\bootstrap\debug\rustc' --crate-name core --edition=2024 'library\core\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat,unused-externs-silent --crate-type lib --emit=dep-info,metadata,link -Z embed-metadata=no -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 --warn=unexpected_cfgs --check-cfg 'cfg(no_fp_fmt_parse)' --check-cfg 'cfg(feature, values(any()))' --check-cfg 'cfg(target_has_reliable_f16)' --check-cfg 'cfg(target_has_reliable_f16_math)' --check-cfg 'cfg(target_has_reliable_f16b)' --check-cfg 'cfg(target_has_reliable_f128)' --check-cfg 'cfg(target_has_reliable_f128_math)' --check-cfg 'cfg(no_io_statics)' -Cembed-bitcode=yes -Zunstable-options -Cforce-frame-pointers=non-leaf -C debug-assertions=on --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("debug_refcell", "optimize_for_size", "panic_immediate_abort"))' -C metadata=be032579fe0883de -C extra-filename=-4b1355948afd9fb6 --out-dir 'C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\core/4b1355948afd9fb6\out' --target aarch64-pc-windows-msvc -L 'dependency=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\dist\build\core/4b1355948afd9fb6\out' -Zannotate-moves '--check-cfg=cfg(feature,values(any()))' -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --force-warn=unused_crate_dependencies` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
warning: build failed, waiting for other jobs to finish...
Assertion failed: E <= end() && "Trying to erase past the end.", file C:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/TinyPtrVector.h, line 270
[RUSTC-TIMING] compiler_builtins test:false 8.098
error: could not compile `compiler_builtins` (lib)

Caused by:
  process didn't exit successfully: `C:\a\rust\rust\build\bootstrap\debug\rustc 'C:\a\rust\rust\build\bootstrap\debug\rustc' --crate-name compiler_builtins --edition=2024 'library\compiler-builtins\compiler-builtins\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat,unused-externs-silent --crate-type lib --emit=dep-info,metadata,link -Z embed-metadata=no -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -Cembed-bitcode=yes -Zunstable-options -Cforce-frame-pointers=non-leaf -C debug-assertions=on --cfg 'feature="arch"' --cfg 'feature="c"' --cfg 'feature="compiler-builtins"' --cfg 'feature="default"' --cfg 'feature="unmangled-names"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("arch", "c", "compiler-builtins", "default", "mem", "unmangled-names", "unstable-public-internals"))' -C metadata=844a2a35e6b22282 -C extra-filename=-6ae01e573b57cacb --out-dir 'C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\compiler_builtins/6ae01e573b57cacb\out' --target aarch64-pc-windows-msvc -L 'dependency=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\dist\build\compiler_builtins/6ae01e573b57cacb\out' --extern 'core=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\core/4b1355948afd9fb6\out\libcore-4b1355948afd9fb6.rmeta' -Zannotate-moves '--check-cfg=cfg(feature,values(any()))' -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --force-warn=unused_crate_dependencies -L 'native=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\compiler_builtins/c929816aef3eae97\out' -L 'native=C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.52.37025\atlmfc\lib\arm64' -l static=compiler-rt --cfg intrinsics_enabled --cfg optimizations_enabled --cfg f16_enabled --cfg f128_enabled --cfg mem_unaligned --cfg '__absvdi2="optimized-c"' --cfg '__absvsi2="optimized-c"' --cfg '__absvti2="optimized-c"' --cfg '__addvdi3="optimized-c"' --cfg '__addvsi3="optimized-c"' --cfg '__addvti3="optimized-c"' --cfg '__cmpdi2="optimized-c"' --cfg '__cmpti2="optimized-c"' --cfg '__fe_getround="optimized-c"' --cfg '__fe_raise_inexact="optimized-c"' --cfg '__ffsti2="optimized-c"' --cfg '__int_util="optimized-c"' --cfg '__mulvdi3="optimized-c"' --cfg '__mulvsi3="optimized-c"' --cfg '__mulvti3="optimized-c"' --cfg '__negdf2="optimized-c"' --cfg '__negdi2="optimized-c"' --cfg '__negsf2="optimized-c"' --cfg '__negti2="optimized-c"' --cfg '__negvdi2="optimized-c"' --cfg '__negvsi2="optimized-c"' --cfg '__negvti2="optimized-c"' --cfg '__paritydi2="optimized-c"' --cfg '__paritysi2="optimized-c"' --cfg '__parityti2="optimized-c"' --cfg '__popcountdi2="optimized-c"' --cfg '__popcountsi2="optimized-c"' --cfg '__popcountti2="optimized-c"' --cfg '__subvdi3="optimized-c"' --cfg '__subvsi3="optimized-c"' --cfg '__subvti3="optimized-c"' --cfg '__ucmpdi2="optimized-c"' --cfg '__ucmpti2="optimized-c"' --check-cfg 'cfg(thumb)' --check-cfg 'cfg(thumb1_only)' --check-cfg 'cfg(target_abi_eabihf)' --check-cfg 'cfg(x86_no_sse2)' --check-cfg 'cfg(target_feature, values("vfp2sp", "vfp2"))' --check-cfg 'cfg(assert_no_panic)' --check-cfg 'cfg(intrinsics_enabled)' --check-cfg 'cfg(optimizations_enabled)' --check-cfg 'cfg(f16_enabled)' --check-cfg 'cfg(f128_enabled)' --check-cfg 'cfg(__ashldi3, values("optimized-c"))' --check-cfg 'cfg(__ashlsi3, values("optimized-c"))' --check-cfg 'cfg(__ashrdi3, values("optimized-c"))' --check-cfg 'cfg(__ashrsi3, values("optimized-c"))' --check-cfg 'cfg(__bswapsi2, values("optimized-c"))' --check-cfg 'cfg(__bswapdi2, values("optimized-c"))' --check-cfg 'cfg(__bswapti2, values("optimized-c"))' --check-cfg 'cfg(__divdi3, values("optimized-c"))' --check-cfg 'cfg(__divsi3, values("optimized-c"))' --check-cfg 'cfg(__divmoddi4, values("optimized-c"))' --check-cfg 'cfg(__divmodsi4, values("optimized-c"))' --check-cfg 'cfg(__divmodsi4, values("optimized-c"))' --check-cfg 'cfg(__divmodti4, values("optimized-c"))' --check-cfg 'cfg(__lshrdi3, values("optimized-c"))' --check-cfg 'cfg(__lshrsi3, values("optimized-c"))' --check-cfg 'cfg(__moddi3, values("optimized-c"))' --check-cfg 'cfg(__modsi3, values("optimized-c"))' --check-cfg 'cfg(__muldi3, values("optimized-c"))' --check-cfg 'cfg(__udivdi3, values("optimized-c"))' --check-cfg 'cfg(__udivmoddi4, values("optimized-c"))' --check-cfg 'cfg(__udivmodsi4, values("optimized-c"))' --check-cfg 'cfg(__udivsi3, values("optimized-c"))' --check-cfg 'cfg(__umoddi3, values("optimized-c"))' --check-cfg 'cfg(__umodsi3, values("optimized-c"))' --check-cfg 'cfg(target_feature, values("vis3"))' --check-cfg 'cfg(mem_unaligned)' --check-cfg 'cfg(kernel_user_helpers)'` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
Bootstrap failed while executing `test --stage 2 --skip=tests --skip=library --skip=tidyselftest`
Currently active steps:
compile::Assemble { target_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false } } at src\bootstrap\src\core\build_steps\tool.rs:1385
compile::Rustc { target: aarch64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: aarch64-pc-windows-msvc, forced_compiler: false }, crates: [] } at src\bootstrap\src\core\build_steps\compile.rs:2343
compile::Std { target: aarch64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: aarch64-pc-windows-msvc, forced_compiler: false }, crates: [], force_recompile: false, extra_rust_args: [], is_for_mir_opt_tests: false } at src\bootstrap\src\core\build_steps\compile.rs:1064
Build completed unsuccessfully in 0:35:05
make: *** [Makefile:110: ci-msvc-ps1] Error 1
  local time: Fri Nov 13 16:40:23 PST 2026
  network time: Sat, 14 Nov 2026 00:40:23 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@Zalathar

Copy link
Copy Markdown
Member

After some more investigation, this might actually be a flaky failure on main; see https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Tree.20ops/near/640255105.

@beetrees

Copy link
Copy Markdown
Contributor Author

@bors r=bjorn3

@rust-bors

rust-bors Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f69d643 has been approved by bjorn3

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

Reason for tree closure: consistent failures on main

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

5 participants