[PATCH] D13358: InstCombine: Fold comparisons between unguessable allocas and other pointers

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 14:23:22 PDT 2015


hans added a comment.

> There's a potential problem here in justifying the transform -- in

>  the loop, the programmer is no longer doing a "one-off guess" anymore,

>  but systematically searching for the offset of a passed in argument

>  (which points to some slot in the caller's stack, say) from the

>  alloca.


Thanks for clarifying. It's an interesting example :-)

I think we're still in the clear here. The way I see it, alloca has a lot of freedom in how it allocates memory, and we can act as if it allocated the memory in a place that the programmer isn't finding with their guesses.


http://reviews.llvm.org/D13358





More information about the llvm-commits mailing list