[LLVMdev] lifetime.start/end clarification

Renato Golin renato.golin at linaro.org
Tue Nov 4 09:16:37 PST 2014


On 4 November 2014 16:39, Arnaud A. de Grandmaison
<arnaud.degrandmaison at arm.com> wrote:
> Yes, I meant not visible in any dominating block. I believe assuming the ptr is alive from the function entry is conservatively correct, but not optimal. In my testcase, a lifetime.start could be inserted in the crit_edge bb.

Don't you mean "not visible from at least one dominating path"?

You may have many paths through (perhaps the same) blocks from the
beginning of the function to a lifetime.end call, and if at least one
of them doesn't have lifetime.start(), you're doomed. You'd have to
scan all paths, not just the blocks, where lifetime.start could be
defined.

I agree function entry is a safe assumption.

cheers,
--renato



More information about the llvm-dev mailing list