[PATCH] D43269: [MemorySSA] Be less aggressive with @llvm.lifetime.start

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 12:18:31 PST 2018


dberlin added a comment.

Oh god i've been away from LLVM too long.
So, i don't know what we *want* the semantic to be.
Can you print the memoryssa dumps for this for me?
Add hal, etc, get his thoughts

One thing to realize is that the langref doesn't just say that lifetime.start means "anything before this is undefined".
It actually says anything before this *is known never to be used*
Which, imho, is stronger.

"llvm.lifetime.start’ Intrinsic
...
This intrinsic indicates that before this point in the code, the value of the memory pointed to by ptr is dead. This means that it is known to never be used and has an undefined value."

Essentially, lifetime.start/end, even for the same pointer, create things that are very two distinctly different memory objects, regardless of if they are at the same place in memory, and the compiler is free to treat them that way, at least, as these intrinsics go.


Repository:
  rL LLVM

https://reviews.llvm.org/D43269





More information about the llvm-commits mailing list