rust/compiler
Andreas Molzer a41e2fd963 Convert the recursive find_state to a loop
The basic conversion is a straightforward conversion of the linear
recursion to a loop forwards and backwards propagation of the result.
But this uses an optimization to avoid the need for extra space that
would otherwise be necessary to store the stack of unfinished states as
the function is not tail recursive.

Observe that only non-root-nodes in cycles have a recursive call and
that every such call overwrites their own node state. Thus we reuse the
node state itself as temporary storage for the stack of unfinished
states by inverting the links to a chain back to the previous state
update. When we hit the root or end of the full explored chain we
propagate the node state update backwards by following the chain until
a node with a link to itself.
2020-11-05 19:24:49 +01:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_ast Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov 2020-10-27 09:25:54 +00:00
rustc_ast_lowering Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_ast_passes Fix typos 2020-10-29 16:51:46 +01:00
rustc_ast_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_attr Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_builtin_macros Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_codegen_cranelift Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff25d3dda92' 2020-10-26 09:53:27 +01:00
rustc_codegen_llvm Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_codegen_ssa Rollup merge of #78396 - josephlr:ermsb, r=petrochenkov 2020-10-27 08:45:24 +09:00
rustc_data_structures Convert the recursive find_state to a loop 2020-11-05 19:24:49 +01:00
rustc_driver Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_error_codes Rollup merge of #78332 - PoignardAzur:doc_E0308, r=camelid 2020-10-27 08:44:54 +09:00
rustc_errors Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_expand Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_feature Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_fs_util Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_graphviz /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_hir Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_hir_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_incremental /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer Rollup merge of #78460 - varkor:turbofish-string-generic, r=lcnr 2020-10-29 12:08:50 +09:00
rustc_interface Auto merge of #78414 - nox:function-sections, r=nagisa,bjorn3 2020-10-28 17:47:36 +00:00
rustc_lexer Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_lint Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_llvm Rollup merge of #78462 - danielframpton:fixnullisa, r=nagisa 2020-10-29 17:05:23 +01:00
rustc_macros Retire rustc_dep_node_try_load_from_on_disk_cache. 2020-10-22 23:04:46 +02:00
rustc_metadata Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_middle Rollup merge of #78545 - jackh726:anonymous, r=oli-obk 2020-10-30 18:00:56 +09:00
rustc_mir Link to pass docs from NRVO module docs 2020-10-29 23:05:45 -07:00
rustc_mir_build Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_parse Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_query_system Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_resolve Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_save_analysis Rollup merge of #78349 - JohnTitor:issue-75962, r=davidtwco 2020-10-27 08:45:07 +09:00
rustc_serialize Replace absolute paths with relative ones 2020-10-13 14:16:45 +02:00
rustc_session Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_span Rollup merge of #78524 - tmiasko:source-files-borrow, r=Aaron1011 2020-10-30 18:00:54 +09:00
rustc_symbol_mangling Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_target Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_trait_selection Rollup merge of #78422 - estebank:fix-78372, r=pnkfelix 2020-10-29 17:05:14 +01:00
rustc_traits Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Auto merge of #78562 - JohnTitor:rollup-otg906u, r=JohnTitor 2020-10-30 10:01:49 +00:00