[PATCH] D21725: [LoopUnswitch] Unswitch on conditions feeding into guards

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 25 12:27:32 PDT 2016


sanjoy added inline comments.

================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:532
@@ +531,3 @@
+
+  SmallVector<IntrinsicInst *, 4> Guards;
+
----------------
majnemer wrote:
> Hmm, does switching to a raw pointer help? In the even in which the guard was cloned and destroyed, the guard in your list would be a bad pointer.
My reading of the code is that that's fine, since if we do invalidate something in `Guards`, we'll return and never look at `Guards` again.  I've added a comment for that.


http://reviews.llvm.org/D21725





More information about the llvm-commits mailing list