Skip to content
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

[Backport to 16] Ensure that PHI node has an incoming value per each predecessor instance #2837

Merged

Commits on Nov 9, 2024

  1. [Backport to 16] Ensure that PHI node has an incoming value per each …

    …predecessor instance
    
    This PR partially fixes issue KhronosGroup#2702 in the part that is responsible for SPIR-V to LLVM IR translation. Namely, this PR ensures that all PHI nodes of a Function has the number of incoming blocks matching block's predecessor count. When a PHI node doesn't conform to this rule, this PR inserts missing number of (Value, Basic Block) pairs to make the PHI node valid.
    
    Another problem from KhronosGroup#2702, that is violation of the requirement to OpPhi's to have exactly one Parent ID operand for each parent block of the current block in the CFG in the output SPIR-V code, is out of scope of this PR.
    VyacheslavLevytskyy authored and MrSidims committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    0ec0a27 View commit details
    Browse the repository at this point in the history
  2. [Backport to 16] ensure that PHI node has an incoming value per each …

    …predecessor instance even if the input SPIR-V module is invalid as reported by spirv-val
    VyacheslavLevytskyy authored and MrSidims committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    07dca8e View commit details
    Browse the repository at this point in the history