[all-commits] [llvm/llvm-project] 3c9081: [IROutliner] Avoid reusing PHINodes that have alre...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Mon Mar 14 10:00:32 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c90812f3b43fae3a4a8f0d0d6ec29824690431b
      https://github.com/llvm/llvm-project/commit/3c90812f3b43fae3a4a8f0d0d6ec29824690431b
  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/duplicate-merging-phis.ll

  Log Message:
  -----------
  [IROutliner] Avoid reusing PHINodes that have already been matched when merging outlined functions' phi node blocks

When there are two external phi nodes for two different outlined regions, when compressing the created phi nodes between the two regions, the matching for the second phi node in the second region matches the first phi node created for the first region rather than the second phi node created for the first region. This adds an extra output path where there should not be one.

The fix is the ignore phi nodes that have already been matched for each region.

Reviewer: paquette

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




More information about the All-commits mailing list