[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
Thu Sep 13 08:56:05 PDT 2018


trentxintong updated this revision to Diff 165309.
trentxintong added a comment.

collect some numbers on sqlite3.c


Repository:
  rL LLVM

https://reviews.llvm.org/D49108

Files:
  lib/Transforms/IPO/CalledValuePropagation.cpp


Index: lib/Transforms/IPO/CalledValuePropagation.cpp
===================================================================
--- lib/Transforms/IPO/CalledValuePropagation.cpp
+++ 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.165309.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180913/51834059/attachment.bin>


More information about the llvm-commits mailing list