[LLVMdev] lifetime.start/end clarification

Philip Reames listmail at philipreames.com
Wed Nov 5 13:37:20 PST 2014


On 11/05/2014 12:59 PM, Nick Lewycky wrote:
> The LangRef definition looks like that plus some special rules about 
> how *all* uses before the start are dead. *The* start? What about 
> multiple starts? What does it mean to have start/end/start/end? Can 
> you use an alloca normally, then lifetime.start it? According to 
> langref, no, *all* uses before the start may be nuked. It's a weird 
> rule, but it's intended to support the use case of stack slot 
> colouring, where your starts and ends are paired and tightly wrap the 
> point where the variable is live.
In my previous response, I'd missed this bit of text:
"What does it mean to have start/end/start/end?"

You're right, this is ill defined.  This is an area which needs clarified.

I'm still confused by the rest of your response.  In particular, I don't 
see the text which inspires:
"Can you use an alloca normally, then lifetime.start it?"

The text doesn't talk about uses.  It talks about values of *memory 
locations*.

Philip



More information about the llvm-dev mailing list