rust/compiler/rustc_codegen_llvm/src
bors 7a58674259 Auto merge of #124255 - RenjiSann:renji/mcdc-nested-expressions, r=Zalathar
MCDC coverage: support nested decision coverage

#123409 provided the initial MCDC coverage implementation.

As referenced in #124144, it does not currently support "nested" decisions, like the following example :

```rust
fn nested_if_in_condition(a: bool, b: bool, c: bool) {
    if a && if b || c { true } else { false } {
        say("yes");
    } else {
        say("no");
    }
}
```

Note that there is an if-expression (`if b || c ...`) embedded inside a boolean expression in the decision of an outer if-expression.

This PR proposes a workaround for this cases, by introducing a Decision context stack, and by handing several `temporary condition bitmaps` instead of just one.
When instrumenting boolean expressions, if the current node is a leaf condition (i.e. not a `||`/`&&` logical operator nor a `!` not operator), we insert a new decision context, such that if there are more boolean expressions inside the condition, they are handled as separate expressions.

On the codegen LLVM side, we allocate as many `temp_cond_bitmap`s as necessary to handle the maximum encountered decision depth.
2024-04-29 11:54:49 +00:00
..
back Add support for Arm64EC to the Standard Library 2024-04-15 16:05:16 -07:00
coverageinfo mcdc-coverage: Get decision_depth from THIR lowering 2024-04-29 09:13:40 +00:00
debuginfo Set target-abi module flag for RISC-V targets 2024-04-09 05:25:51 +02:00
llvm Auto merge of #121298 - nikic:writable, r=cuviper 2024-04-25 04:31:56 +00:00
abi.rs Auto merge of #121298 - nikic:writable, r=cuviper 2024-04-25 04:31:56 +00:00
allocator.rs Add -Zuse-sync-unwind 2023-12-31 15:27:43 +08:00
asm.rs Add support for Arm64EC inline assembly 2024-04-10 10:06:44 -07:00
attributes.rs Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
base.rs compiler: replace cstr macro with c str literals in compiler and few other c str replacements 2023-12-03 14:54:09 +03:00
builder.rs Auto merge of #124255 - RenjiSann:renji/mcdc-nested-expressions, r=Zalathar 2024-04-29 11:54:49 +00:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs Codegen ZSTs without an allocation 2024-04-16 21:13:21 -04:00
consts.rs Rollup merge of #124178 - GuillaumeGomez:llvm-backend, r=oli-obk 2024-04-22 20:25:58 +02:00
context.rs Pass value and valueLen to create a StringRef 2024-04-09 08:53:11 +02:00
declare.rs sanitizers: Create the rustc_sanitizers crate 2024-04-08 12:05:41 -07:00
errors.rs Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
intrinsic.rs Auto merge of #122053 - erikdesjardins:alloca, r=nikic 2024-04-24 03:00:44 +00:00
lib.rs compiler: use addr_of! 2024-02-24 18:53:48 +03:00
llvm_util.rs llvm: update riscv target feature to match LLVM 19 2024-04-17 16:15:24 -04:00
mono_item.rs Some comment nits 2024-03-12 08:51:20 +00:00
type_.rs Remove my scalar_copy_backend_type optimization attempt 2024-04-09 08:51:32 -07:00
type_of.rs Remove my scalar_copy_backend_type optimization attempt 2024-04-09 08:51:32 -07:00
va_arg.rs Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00