rust/tests
Dylan DPC c1d6d322f4
Rollup merge of #113716 - DianQK:add-no_builtins-to-function, r=pnkfelix
Add the `no-builtins` attribute to functions when `no_builtins` is applied at the crate level.

**When `no_builtins` is applied at the crate level, we should add the `no-builtins` attribute to each function to ensure it takes effect in LTO.**

This is also the reason why no_builtins does not take effect in LTO as mentioned in #35540.

Now, `#![no_builtins]` should be similar to `-fno-builtin` in clang/gcc, see https://clang.godbolt.org/z/z4j6Wsod5.

Next, we should make `#![no_builtins]` participate in LTO again. That makes sense, as LTO also takes into consideration function-level instruction optimizations, such as the MachineOutliner. More importantly, when a user writes a large `#![no_builtins]` crate, they would like this crate to participate in LTO as well.

We should also add a function-level no_builtins attribute to allow users to have more control over it. This is similar to Clang's `__attribute__((no_builtin))` feature, see https://clang.godbolt.org/z/Wod6KK6eq. Before implementing this feature, maybe we should discuss whether to support more fine-grained control, such as `__attribute__((no_builtin("memcpy")))`.

Related discussions:
- #109821
- #35540

Next (a separate pull request?):
- [ ] Revert #35637
- [ ] Add a function-level `no_builtin` attribute?
2023-07-19 22:37:06 +05:30
..
assembly test-various: run codegen and assembly tests 2023-07-02 02:22:22 +02:00
auxiliary
codegen Add the no-builtins attribute to functions when no_builtins is applied at the crate level. 2023-07-18 22:15:47 +08:00
codegen-units
debuginfo Update natvis to match full type names for Arc, Rc, Weak, etc 2023-07-17 15:51:46 -04:00
incremental Bless incremental test. 2023-07-10 16:01:18 +00:00
mir-opt Auto merge of #109025 - cjgillot:refprop-dbg, r=JakobDegen 2023-07-14 17:32:59 +00:00
pretty
run-coverage refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
run-coverage-rustdoc Re-bless the newly-migrated tests 2023-06-28 11:09:19 +10:00
run-make Add the no-builtins attribute to functions when no_builtins is applied at the crate level. 2023-07-18 22:15:47 +08:00
run-make-fulldeps Don't require each rustc_interface tool to opt-in to parallel_rustc support 2023-07-11 22:55:23 -05:00
run-pass-valgrind
rustdoc rustdoc: use src consistently over source in JavaScript 2023-07-14 16:54:14 -07:00
rustdoc-gui Update rustdoc GUI tests 2023-07-18 14:34:24 +02:00
rustdoc-js Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-js-std Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle 2023-07-02 18:49:29 +00:00
rustdoc-json Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, r=aDotInTheVoid,notriddle 2023-07-18 02:47:03 +00:00
rustdoc-ui
ui Rollup merge of #113444 - lcnr:alias-bound-test, r=compiler-errors 2023-07-19 22:37:06 +05:30
ui-fulldeps Rollup merge of #113373 - jyn514:download-rustc-fixes, r=albertlarsan68 2023-07-11 21:00:27 -07:00
COMPILER_TESTS.md