diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-17 13:24:38 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-06-22 20:08:49 +0000 |
| commit | 09aab29ebf93fbb546d409d1e127392abf36cd8a (patch) | |
| tree | 6f1abc3ef5c543edc3e22f037a8d6d44a10ccb97 /compiler/rustc_middle/src | |
| parent | 8051f012658fde822bfc661b52e90950b411e5c9 (diff) | |
| download | rust-09aab29ebf93fbb546d409d1e127392abf36cd8a.tar.gz rust-09aab29ebf93fbb546d409d1e127392abf36cd8a.zip | |
Only compute recursive callees once.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 3668f4e12f5..de3b15c5a6f 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1283,14 +1283,13 @@ rustc_queries! { return_result_from_ensure_ok } - /// Check whether the function has any recursion that could cause the inliner to trigger - /// a cycle. - query mir_callgraph_reachable(key: (ty::Instance<'tcx>, LocalDefId)) -> bool { + /// Return the set of (transitive) callees that may result in a recursive call to `key`. + query mir_callgraph_cyclic(key: LocalDefId) -> &'tcx UnordSet<ty::Instance<'tcx>> { fatal_cycle + arena_cache desc { |tcx| - "computing if `{}` (transitively) calls `{}`", - key.0, - tcx.def_path_str(key.1), + "computing (transitive) callees of `{}` that may recurse", + tcx.def_path_str(key), } } |
