1
Fork 0
rust/compiler/rustc_data_structures/src
bors 3cdd0197e7 Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk
Use stable metric for const eval limit instead of current terminator-based logic

This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.

The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).

Also see: #103877
2023-01-29 04:11:27 +00:00
..
base_n Adapt rustc_data_structures tests to run in strict miri 2022-06-04 17:46:29 +02:00
binary_search_util Adopt let else in more places 2022-02-19 17:27:43 +01:00
fingerprint Make Fingerprint::combine_commutative associative 2022-01-03 19:07:29 +01:00
flock Remove execute bit from lock file permissions 2022-10-17 21:10:46 +02:00
graph Improve efficiency of has_back_edge(...) 2023-01-24 00:01:37 +00:00
intern Rename PtrKey as Interned and improve it. 2022-02-15 15:50:29 +11:00
obligation_forest Use a type-alias-impl-trait in ObligationForest 2023-01-21 20:13:56 +01:00
owning_ref compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
sip128 SipHasher128: improve constant names and add more comments 2020-10-11 23:48:35 -07:00
small_c_str mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
small_str Add SmallStr 2022-03-04 16:57:34 +01:00
snapshot_map Call the method fork instead of clone and add proper comments 2022-02-14 12:57:20 -03:00
sorted_map rustc_data_structures: remove ref patterns and other artifacts of the past 2023-01-17 07:48:19 +00:00
sso compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
stable_hasher Fix isize optimization in StableHasher for big-endian architectures 2022-02-03 11:47:41 +01:00
tagged_ptr compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
tiny_list rustc_data_structures: remove ref patterns and other artifacts of the past 2023-01-17 07:48:19 +00:00
transitive_relation get rid of RefCell in TransitiveRelation 2022-08-22 18:08:46 +08:00
vec_map eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
atomic_ref.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
base_n.rs minor code cleanups 2022-12-12 19:49:53 +01:00
captures.rs Remove #[allow(unused_lifetimes)] which is now unnecessary 2021-06-17 08:56:54 +09:00
fingerprint.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
flock.rs separate flock implementations into separate modules 2022-04-14 18:30:53 -04:00
frozen.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
functor.rs Use liballoc's specialised in-place vec collection 2022-06-08 12:14:49 +01:00
fx.rs Use UnordMap instead of FxHashMap in define_id_collections!(). 2023-01-19 10:40:47 +01:00
intern.rs Rollup merge of #104898 - oli-obk:group_all_the_things, r=wesleywiser 2022-12-06 16:54:52 +01:00
jobserver.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
lib.rs Also remove #![feature(control_flow_enum)] where possible 2023-01-18 10:22:21 -08:00
macros.rs Introduce ChunkedBitSet and use it for some dataflow analyses. 2022-02-23 10:18:49 +11:00
map_in_place.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
memmap.rs Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr 2022-12-03 21:25:45 +00:00
profiling.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
sharded.rs Move Sharded maps into each QueryCache impl 2022-02-20 12:10:46 -05:00
sip128.rs Fix stacked borrows invalidation in rustc_data_structures sip128 2022-06-04 17:46:36 +02:00
small_c_str.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
small_str.rs Add SmallStr 2022-03-04 16:57:34 +01:00
sorted_map.rs rustc_data_structures: remove ref patterns and other artifacts of the past 2023-01-17 07:48:19 +00:00
stable_hasher.rs fix some typos 2022-12-25 00:43:50 +01:00
stack.rs Allow inlining of ensure_sufficient_stack() 2022-02-12 11:30:04 +01:00
steal.rs Harden the pre-tyctxt query system against accidental recomputation 2023-01-12 09:26:28 +00:00
svh.rs Use delayed error handling for Encodable and Encoder infallible. 2022-06-08 07:01:26 +10:00
sync.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
tagged_ptr.rs fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
temp_dir.rs Capitalize safety comments 2020-09-08 22:37:18 -04:00
tiny_list.rs rustc_data_structures: remove ref patterns and other artifacts of the past 2023-01-17 07:48:19 +00:00
transitive_relation.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
unhash.rs Avoid rehashing Fingerprint as a map key 2020-09-01 18:27:02 -07:00
unord.rs Clean up and document unord collections a bit. 2023-01-19 17:37:59 +01:00
vec_linked_list.rs Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
vec_map.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
work_queue.rs Remove (lots of) dead code 2021-03-27 22:16:33 -04:00