[PATCH] D37419: Teach scalar evolution to handle inttoptr/ptrtoint

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 00:07:13 PDT 2017


>
>
>>
> So, i instrumented llvm to add runtime asserts about the noaliasing
> pointers before free (IE it adds an assert that, for each pointer that is
> noaliased with the pointer passed to free, free is not destroying that
> pointer), and it fails really quickly.
>
>
> Are these live pointers? (i.e., could this be caused because malloc is
> recycling memory blocks?)
>
>
I only stared at a few of them, and they looked live.
They weren't already freed/reused.

I stopped looking because, well, nothing has  broken so far and while this
was a fun digression, fixing any of this isn't going to be at the top of my
list soon.
I'm only going to complain for so long if i'm not going to go and fix it ;)

I feel like i have enough "things that bother me" to fix for the moment :)



> Hence, i'm going to go with "i still have trouble believing we are
> generating currently correct code that accounts for this model".
> Though i admit nothing currently takes advantage of free that i can find.
> But at least i feel like i understand what we are trying to model :)
>
>
> Sounds good. ;)
>
> We should be a bit careful, however. Or, at least I should ;) -- I'd like
> to get back to doing heap-to-stack conversion at some point.
>
>
I somehow would guess when we start stressing the memory model this
particular issue may be the least of our worries :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170904/f8254c78/attachment.html>


More information about the llvm-commits mailing list