Skip to content

Dead Code: Multi-Block Handling in Single-Block Preconditioned Pass #11006

@stry-tt

Description

@stry-tt

Description

self.simple_optimization(|context| {
if Some(context.block_id) != previous_block {
active_condition = one;
last_side_effects_enabled_instruction = None;
}
previous_block = Some(context.block_id);

The pass contains multi-block handling code that resets state on block transitions, but the module's precondition states that the function must have only one basic block. This code is effectively dead/defensive in nature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions