[all-commits] [llvm/llvm-project] c79ab1: [IROutliner] Separate split PHI nodes from multipl...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Mon Mar 14 12:57:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c79ab1065e89872668b8d43c747ff3e5974b0d96
      https://github.com/llvm/llvm-project/commit/c79ab1065e89872668b8d43c747ff3e5974b0d96
  Author: Andrew Litteken <andrew.litteken at gmail.com>
  Date:   2022-03-14 (Mon, 14 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    A llvm/test/Transforms/IROutliner/exit-block-phi-node-value-attribution.ll

  Log Message:
  -----------
  [IROutliner] Separate split PHI nodes from multiple exits by different outlinable regions.

The IR Outliner is supposed to extract the outputs contained in an external phi node and place them into a phi node contained within the outlined function. However, when the output values of two outlined functions with two different output sets are contained within the same phi node, they are counted as the same exit path when first analyzed. In reality, these create two different phi nodes, creating an inconsistency, resulting in a mismatch in the expected number of output paths and a crash.  This fixes that counting when analyzing the outputs by also analyzing the incoming blocks rather than just the incoming values.

Reviewer: paquette

Differential Revision: https://reviews.llvm.org/D121313




More information about the All-commits mailing list