[PATCH] D55018: [CodeExtractor] Split PHI nodes with incoming values from outlined region (PR39433)

Sergei Kachkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 13:14:47 PST 2018


kachkov98 created this revision.
kachkov98 added a reviewer: vsk.
Herald added a subscriber: llvm-commits.

If a PHI node out of extracted region has multiple incoming values from it, split this PHI on two parts. First PHI has incomings only from region and extracts with it (they are placed to the separate basic block that added to the list of outlined), and incoming values in original PHI are replaced by first PHI. Similar solution is already used in CodeExtractor for PHIs in entry block (severSplitPHINodes method). It covers PR39433 bug.


Repository:
  rL LLVM

https://reviews.llvm.org/D55018

Files:
  include/llvm/Transforms/Utils/CodeExtractor.h
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll
  unittests/Transforms/Utils/CodeExtractorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55018.175751.patch
Type: text/x-patch
Size: 11443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181128/fc92ba83/attachment.bin>


More information about the llvm-commits mailing list