[PATCH] [SeparateConstOffsetFromGEP] garbage-collect intermediate instructions
Mark Heffernan
meheff at google.com
Mon Apr 20 11:18:45 PDT 2015
================
Comment at: lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:624
@@ -619,3 +623,3 @@
// We can reuse BO in this case, because the new expression shares the same
// instruction type and BO is used at most once.
----------------
Is this reuse going to cause problems with your garbage collection? When you go to recusively delete UserChain you'll encounter this reused (and now live) instruction and deletion will stop there. However, deeper in the UserChain[] it seems like you could still have dead instructions. The problem would be is that these dead instructions are no longer in the expression tree for UserChain.back()
================
Comment at: test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll:1
@@ -1,2 +1,2 @@
-; RUN: opt < %s -separate-const-offset-from-gep -dce -S | FileCheck %s
+; RUN: opt < %s -separate-const-offset-from-gep -S | FileCheck %s
----------------
Should any extra checks be added to verify we're removing dead code?
http://reviews.llvm.org/D9096
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list