Uh oh!
There was an error while loading. Please reload this page.
Add TyCtxt::is_lang_item, use it in the compiler - #126491
Conversation
compiler-errors
commented
Jun 14, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
rustbot
commented
Jun 14, 2024
Some changes occurred in match lowering cc @Nadrieril Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred in compiler/rustc_sanitizers cc @rust-lang/project-exploit-mitigations, @rcvalle Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
Add `TyCtxt::is_lang_item`, use it in the compiler ```rust pub fn is_lang_item(self, def_id: DefId, lang_item: LangItem) -> bool; ``` Easier than having to use `Some(def_id) == tcx.lang_items().iterator_trait()` or something. Also makes it easier to turn into `TraitSolverLangItem` in the future. Hope it's not too bad for perf. r? `@lcnr` or `@oli-obk`
bors
commented
Jun 14, 2024
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
commented
Jun 14, 2024
💔 Test failed - checks-actions |
266754c to
93ff86eCompareoli-obk
commented
Jun 14, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Add `TyCtxt::is_lang_item`, use it in the compiler ```rust pub fn is_lang_item(self, def_id: DefId, lang_item: LangItem) -> bool; ``` Easier than having to use `Some(def_id) == tcx.lang_items().iterator_trait()` or something. Also makes it easier to turn into `TraitSolverLangItem` in the future. Hope it's not too bad for perf. r? `@lcnr` or `@oli-obk`
bors
commented
Jun 14, 2024
oli-obk
commented
Jun 14, 2024
In my ideal world we'd be able to preregister def ids like we do with symbols, so lang items can be constant def ids that we can match on (instead of having if/elseif chains), but I don't know how to get there yet in a non-hacky way. Something like this is preferrable. If perf is an issue, maybe a macro to hide the boilerplate would work, too? |
bors
commented
Jun 14, 2024
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Jun 15, 2024
Finished benchmarking commit (be24883): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.997s -> 672.355s (0.05%) |
compiler-errors
commented
Jun 15, 2024
That's barely anything lol |
oli-obk
commented
Jun 15, 2024
@bors r+ |
bors
commented
Jun 15, 2024
bors
commented
Jun 15, 2024
bors
commented
Jun 15, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
Jun 15, 2024
Finished benchmarking commit (8217b41): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -2.2%)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.
CyclesResults (secondary 8.7%)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.
Binary sizeResults (secondary -0.0%)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.
Bootstrap: 671.712s -> 671.15s (-0.08%) |
rylev
commented
Jun 20, 2024
I assume this means that the regressions that were seen aren't considered severe enough. @rustbot label: +perf-regression-triaged |
Easier than having to use
Some(def_id) == tcx.lang_items().iterator_trait()or something. Also makes it easier to turn intoTraitSolverLangItemin the future. Hope it's not too bad for perf.r? @lcnr or @oli-obk