[llvm-dev] which ir instructions have name

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 12 09:33:08 PST 2016


On Fri, Feb 12, 2016 at 8:29 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:

>
> On Feb 12, 2016, at 7:55 AM, David Blaikie via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Names are optional and have overhead - we usually try not to emit names
> (Clang produces IR with names in an Asserts build, but otherwise it omits
> them - there's not as much of that logic in the LLVM optimizers, so even
> starting with a non-Asserts Clang output you'll still find the optimizers
> introduce names for instructions)
>
>
> At some point we would want to try to more fully remove the construction
> of named instructions in the IR in non-Asserts builds across the stack,
> it's just overhead we want to avoid in production execution.
>
>
> That's something I figured recently (too many calls to strlen on my
> non-assert profile...). The "switch" seems triggered on the IRBuilder (if I
> remember correctly), so any IRBuilder created instruction won' t have a
> name in release build.
> Should we favor the use of the IR builder in optimization that manipulates
> name? Or should we do something else to prevent the use of names in release
> build. Introduce a flag to build clang with the name field totally removed
> in "super released build"?
>

Not sure what the right overall solution might be - I know Chandler's
expressed some thoughts on this before, including issues related to just
/building/ the names, even if we threw them away.


>
> --
> Mehdi
>
>
>
>
> On Fri, Feb 12, 2016 at 7:00 AM, Carlos Alba via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Hi everyone,
>>
>> Some instructions in llvm have names and for some of them the name is
>> empty. Now, I wanted to know which instructions have names?
>>
>> Best,
>> Carlo
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160212/fca81f68/attachment.html>


More information about the llvm-dev mailing list