rust/compiler/rustc_codegen_cranelift/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
..
abi Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
debuginfo Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
driver Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
intrinsics Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3 2023-01-27 00:03:09 +00:00
optimize Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
allocator.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
analyze.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
base.rs Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk 2023-01-29 04:11:27 +00:00
cast.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
codegen_i128.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
common.rs Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3 2023-01-27 00:03:09 +00:00
compiler_builtins.rs Merge commit '370c397ec9' into sync_cg_clif-2022-03-20 2022-03-20 16:55:21 +01:00
concurrency_limiter.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00
config.rs Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
constant.rs Update codegen cranelift for ConstEvalCounter 2023-01-23 23:56:22 +00:00
cranelift_native.rs Fix CI 2023-01-25 16:27:28 +01:00
discriminant.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
global_asm.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
inline_asm.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00
lib.rs Vendor newer version of cranelift-native 2023-01-25 15:19:40 +01:00
linkage.rs Sync rustc_codegen_cranelift 'ddd4ce2553' 2021-04-30 14:49:58 +02:00
main_shim.rs Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnr 2023-01-27 15:02:44 +00:00
num.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
pointer.rs Merge commit '0969bc6dde' into sync_cg_clif-2021-03-29 2021-03-29 10:45:09 +02:00
pretty_clif.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
toolchain.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
trap.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
unsize.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00
value_and_place.rs Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
vtable.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00