[PATCH] D17337: __builtin_object_size problem with pointer as argument

Strahinja Petrovic via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 04:28:20 PST 2016


spetrovic added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1957
@@ +1956,3 @@
+          eraseInstFromFunction(*I);
+          Users[i] = nullptr; // Skip examing this in next loop.
+        }
----------------
george.burgess.iv wrote:
> george.burgess.iv wrote:
> > Nit: Can we move this somewhere above `replaceInstUsesWith`? Having the RAUW update `Users[i]` seems pointless if we're just going to null it out anyway.
> Nit: The comment should say "Skip examining" :)
I think there is no difference if we move this ( Users[i] = nullptr; ). This is a local variable, and I don't think that it can affect replaceInstUsesWith().


Repository:
  rL LLVM

http://reviews.llvm.org/D17337





More information about the llvm-commits mailing list