[PATCH] D32468: [CodeExtractor]: Fix an extractor bug of missing replacing use of old phi with the new one
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 22:04:24 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301291: [CodeExtractor]: Fixup use refs of the old phi. (authored by davidxl).
Changed prior to commit:
https://reviews.llvm.org/D32468?vs=96496&id=96502#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32468
Files:
llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
Index: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
+++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
@@ -220,6 +220,7 @@
// from OldPred of PN.
PHINode *NewPN = PHINode::Create(PN->getType(), 1 + NumPredsFromRegion,
PN->getName() + ".ce", &NewBB->front());
+ PN->replaceAllUsesWith(NewPN);
NewPN->addIncoming(PN, OldPred);
// Loop over all of the incoming value in PN, moving them to NewPN if they
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32468.96502.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170425/95fe983d/attachment.bin>
More information about the llvm-commits
mailing list