[PATCH] D17337: __builtin_object_size problem with pointer as argument

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 17:23:28 PST 2016


george.burgess.iv added a comment.

That's... concerning, especially given that there doesn't seem to be a bug filed about this behavior. Can you paste the errors that UBSan gives you, please?


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1962
@@ +1961,3 @@
+        eraseInstFromFunction(*I);
+        Iter = Users.erase(Iter); // Skip examining in next loop.
+      } else {
----------------
This smells quadratic. Can we just partition `Users` so that the calls to `objectsize` are all at the front instead? Doing so would also let us either make this loop quite a bit smaller, or let us go back to having only one loop.


Repository:
  rL LLVM

http://reviews.llvm.org/D17337





More information about the llvm-commits mailing list