james faure via llvm-dev
2020-Sep-20 16:07 UTC
[llvm-dev] extern calls interfere with optimizations
Hi, I have a frontend that could insert many calls to an external threading library, my problem is that would interfere with optimizations, particularly the inliner. Is there some way to do this ? I've considered leaving textual markers in function names, is that a legitimate solution ? James -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200920/7b869ebe/attachment.html>
David Blaikie via llvm-dev
2020-Sep-20 16:48 UTC
[llvm-dev] extern calls interfere with optimizations
you can put various attributes (const/pure/noreturn/returns/whatever) on the function to help optimizations know what to do with them On Sun, Sep 20, 2020 at 9:07 AM james faure via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Hi, > I have a frontend that could insert many calls to an external threading library, my problem is that would interfere with optimizations, particularly the inliner. > > Is there some way to do this ? > I've considered leaving textual markers in function names, is that a legitimate solution ? > > James > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Johannes Doerfert via llvm-dev
2020-Sep-21 17:47 UTC
[llvm-dev] extern calls interfere with optimizations
On 9/20/20 11:48 AM, David Blaikie via llvm-dev wrote:> you can put various attributes (const/pure/noreturn/returns/whatever) > on the function to help optimizations know what to do with themWhile we have a rich and growing set to describe possible side effect, it certainly depends on the functions what is applicable. What is the actual reason the inliner behavior changes? Could it just be code size? Are those calls mostly "getters"? Fork-join calls? Barriers? Also take a look at the `__OMP_ATTRS_SET` we define in `llvm/include/llvm/Frontend/OpenMP/OMPKinds.def`. ~ Johannes> On Sun, Sep 20, 2020 at 9:07 AM james faure via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Hi, >> I have a frontend that could insert many calls to an external threading library, my problem is that would interfere with optimizations, particularly the inliner. >> >> Is there some way to do this ? >> I've considered leaving textual markers in function names, is that a legitimate solution ? >> >> James >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev