[PATCH] D16205: ValueTracking: Put DataLayout reference into the Query structure, NFC.

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 16:35:28 PST 2016


I have no objection to the patch, but I am curious to know why you see a 
speedup here.  I'd really expect a combination of inlining and register 
allocation tricks* to cut the cost of the argument passing to near 
zero.  If it isn't, that seems like something we should fix in the 
compiler.  (I'm assuming you're compiling with a recent Clang here?)

* In many of these cases, the argument register doesn't need to be 
preserved over the inner call because a) it's not a callee saved 
register and b) it's not used after the return.

Have you looked at the resulting assembly to see where the time is spent?

Philip


On 01/14/2016 03:46 PM, Matthias Braun via llvm-commits wrote:
> MatzeB created this revision.
> MatzeB added reviewers: hfinkel, majnemer, sanjoy.
> MatzeB added a subscriber: llvm-commits.
> MatzeB set the repository for this revision to rL LLVM.
>
> After r251146 computeKnownBits() is called multiple times for every instruction in the program, which resulted in a 3% compiletime regression. This patch tries to get some of that compiletime back by optimizing the function:
>
> Put DataLayout reference into the Query structure.
> It looks nicer and improves the compiletime of a typical
> clang -O3 -emit-llvm run by ~0.6% for me.
>
> Repository:
>    rL LLVM
>
> http://reviews.llvm.org/D16205
>
> Files:
>    lib/Analysis/ValueTracking.cpp
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160114/bb61b8b1/attachment.html>


More information about the llvm-commits mailing list