You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
Here's a concise summary of the major changes in this LLVM IR diff:
Loop and Control Flow Simplification: Multiple functions now use select instructions instead of branching to compute condition results (e.g., icmp eq + select instead of icmp ne + br + phi). This eliminates unnecessary basic blocks like .thread, .critedge, and redundant phi nodes, flattening control flow.
Critical Edge Splitting & Block Merging: Several cases replace explicit critical edge splits (e.g., .critedge, .thread) with direct select-based logic or merged successors (e.g., %_ZNK5boost8geometry6detail7overlay25traversal_switch_detector...exit.thread gaining new predecessors), reducing block count and improving CFG structure.
Phi Node Reduction and Refinement: Phi nodes are simplified — often replacing multi-operand phis with select-driven values or removing dead/infeasible incoming edges (e.g., dropping %13, %85, or %12 from phi lists). Some phis now use undef for uninitialized paths where dominance ensures safety.
Predicate Logic Refactoring: Boolean conditions are restructured using and, or, xor, and select to avoid redundant branches and improve canonicalization (e.g., %.not = icmp eq ...; %or.cond = select i1 ..., i1 ..., i1 false patterns), enhancing optimization opportunities.
Exception Handling and Cleanup Path Updates: Landingpad and cleanup paths are updated to reflect new control flow — e.g., .body and resume blocks now include newly reachable predecessors (like %317 instead of %319), and resume phis are adjusted accordingly to maintain exception semantics.
These changes collectively improve IR canonicalization, reduce control-flow complexity, and support more effective downstream optimizations — all while preserving semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link: llvm/llvm-project#185124
Requested by: @nikic