[PATCH] D78912: [mlir] Fixed warning related to unused variable in Liveness.

Marcel Koester via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 03:43:00 PDT 2020


dfki-mako created this revision.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
dfki-mako added a reviewer: herhut.
dfki-mako added a project: MLIR.

The latest changes of the Liveness analysis caused a warning related to an unused variable. This commit solves this warning.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78912

Files:
  mlir/lib/Analysis/Liveness.cpp


Index: mlir/lib/Analysis/Liveness.cpp
===================================================================
--- mlir/lib/Analysis/Liveness.cpp
+++ mlir/lib/Analysis/Liveness.cpp
@@ -297,7 +297,7 @@
 
   // Local printing helpers
   auto printValueRef = [&](Value value) {
-    if (Operation *defOp = value.getDefiningOp())
+    if (value.getDefiningOp())
       os << "val_" << valueIds[value];
     else {
       auto blockArg = value.cast<BlockArgument>();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78912.260267.patch
Type: text/x-patch
Size: 457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/a8dcfb62/attachment-0001.bin>


More information about the llvm-commits mailing list