[PATCH] D28170: [LICM] When promoting scalars, allow inserting stores to thread-local allocas
Xin Tong via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 14:32:34 PST 2017
On Wed, Jan 18, 2017 at 2:20 PM, Michael Kuperstein <mkuper at google.com> wrote:
> 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,
>> + (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.
>> rL LLVM
More information about the llvm-commits