[PATCH] D49108: [CVP] Handle instructions with no user. No need to create CVPLattice state. This handles terminator instructions and more.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 08:29:32 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342398: [CVP] Handle instructions with no user. No need to create CVPLattice state. (authored by trentxintong, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D49108
Files:
llvm/trunk/lib/Transforms/IPO/CalledValuePropagation.cpp
Index: llvm/trunk/lib/Transforms/IPO/CalledValuePropagation.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/CalledValuePropagation.cpp
+++ llvm/trunk/lib/Transforms/IPO/CalledValuePropagation.cpp
@@ -345,6 +345,9 @@
void visitInst(Instruction &I,
DenseMap<CVPLatticeKey, CVPLatticeVal> &ChangedValues,
SparseSolver<CVPLatticeKey, CVPLatticeVal> &SS) {
+ // Simply bail if this instruction has no user.
+ if (I.use_empty())
+ return;
auto RegI = CVPLatticeKey(&I, IPOGrouping::Register);
ChangedValues[RegI] = getOverdefinedVal();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49108.165772.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/f636aa84/attachment.bin>
More information about the llvm-commits
mailing list