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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160212/04cff298/attachment.html>
David Blaikie via llvm-dev
2016-Feb-12 15:55 UTC
[llvm-dev] which ir instructions have name
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. 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 > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160212/074e6691/attachment.html>
> 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"? -- Mehdi> > On Fri, Feb 12, 2016 at 7:00 AM, Carlos Alba via llvm-dev <llvm-dev at lists.llvm.org <mailto: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 <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <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/d3459dcd/attachment.html>