Change how globalopt handles aliases in llvm.used

Nick Lewycky nicholas at mxc.ca
Mon Jun 10 22:14:51 PDT 2013


Rafael EspĂ­ndola wrote:
> On 5 June 2013 20:08, Nick Lewycky<nlewycky at google.com>  wrote:
>> Does anyone else have an opinion on verify.patch? Is it okay to require in
>> the verifier that every entry in @llvm.used must have a name? Is it ever
>> valid for an optimization to nuke the name of a global without first
>> checking whether it's used by @llvm.used?
>>
>> I'm convinced that having an unnamed variable in @llvm.used can't possibly
>> have any use (it must be dead, we can ignore/remove all such entries), but
>> I'm not sure whether a well-behaved optimization ever produces them (just as
>> well-behaved optimizations may cause blocks to become unreachable).
>
> The definition of llvm.used says it acts as an invisible external
> reference, so I am pretty sure it is invalid to just remove the name
> from an element.

Sounds good, please submit!

>
>> Review of verify.patch:
>>
>> Please also update LangRef.html with this patch to mention that all entries
>> in @llvm.used must have names.
>
> Done. New patch is attached.
>
>> Good news, I think I've reviewed this patch before? It looks like it's
>> probably ready to be submitted.
>
> I uploaded it to http://llvm-reviews.chandlerc.com/D936 for a final OK.
>
> Cheers,
> Rafael
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list