[PATCH] D28170: [LICM] When promoting scalars, allow inserting stores to thread-local allocas

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 14:20:28 PST 2017


Assuming I understand you correctly - no, that's the mistake I made in the
original version of this patch. :-)
See discussion with Philip on https://reviews.llvm.org/D28147 .

On Wed, Jan 18, 2017 at 2:16 PM, Xin Tong via Phabricator <
reviews at reviews.llvm.org> wrote:

> trentxintong added inline comments.
>
>
> ================
> Comment at: llvm/trunk/lib/Transforms/Scalar/LICM.cpp:1037
>      SafeToInsertStore =
> -        isAllocLikeFn(Object, TLI) && !PointerMayBeCaptured(Object, true,
> true);
> +        (isAllocLikeFn(Object, TLI) || isa<AllocaInst>(Object)) &&
> +        !PointerMayBeCaptured(Object, true, true);
> ----------------
> The question I really want to ask is whether the check for
> MayNotBeCaptured is necessary for Alloca. Should not alloca be implicitly
> thread local ? The language reference does not explicitly state it.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D28170
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170118/fa88c10c/attachment.html>


More information about the llvm-commits mailing list