[llvm-dev] An issue with "lifetime.start" and storing "undef"

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 24 01:56:57 PDT 2019


Hi Raghesh,

On Tue, 24 Sep 2019 at 09:26, raghesh via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> In order to confine the scope of a local variable allocated using "alloca", we had written a pass named 'undeflocal'. This helps avoid pseudo phi nodes inserted because of the path (carrying an undefined value) starting from the "entry" block. This unwanted phi instruction was preventing some of the optimizations from getting triggered later on.

It sounds like this is the real problem. Whatever's seeing that store
you're inserting and using it to improve the phi should also be taught
about @llvm.lifetime.start.

Cheers.

Tim.


More information about the llvm-dev mailing list