Skip to content

[StructurizeCFG] Hoist and simplify zero-cost incoming else phi values #139605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format correction
  • Loading branch information
VigneshwarJ committed May 12, 2025
commit 95c47d22998030dc79e9f0867160111a557d6d28
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ INITIALIZE_PASS_END(StructurizeCFGLegacyPass, "structurizecfg",
"Structurize the CFG", false, false)

/// Then and Else block order in SCC is arbitrary. But based on the
/// order, after structurization there are cases where there might be extra
/// order, after structurization there are cases where there might be extra
/// VGPR copies due to interference during register coelescing.
/// eg:- incoming phi values from Else block contains only vgpr copies and
/// incoming phis in Then block has are some modification for the vgprs.
Expand All @@ -457,7 +457,7 @@ INITIALIZE_PASS_END(StructurizeCFGLegacyPass, "structurizecfg",
///
/// This function checks the incoming phi values in the merge block and
/// orders based on the following heuristics of Then and Else block. Checks
/// whether an incoming phi can be potential copy instructions and if so
/// whether an incoming phi can be potential copy instructions and if so
/// checks whether copy within the block or not.
/// Increases score if its a potential copy from outside the block.
/// the higher scored block is ordered first.
Expand Down
Loading