[PATCH] D19821: [EarlyCSE] Optionally use MemorySSA. NFC.

Geoff Berry via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 10:18:01 PDT 2016


In case you'd like to profile the MemorySSA construction code, here's a 
.bc file of all the code from consumer-typeset linked together.  
MemorySSA construction has a run time of ~0.13s on my machine (which is 
2.2% of the opt -O2 time).


On 8/22/2016 6:17 PM, Daniel Berlin wrote:
> Ah, this is a file that takes <100ms to run in release mode.
> Yeah, gonna be hard to beat that.
> You can see what the time is without any use optimization by using 
> -memssa-check-limit=0 (but again, you have to use 
> getClobberingMemoryAccess as you are now to get sane results).
>
> It looks like all the build time is in use opt.
> Better alias caching would help with this.
>
> Profiling is hard, it takes so little time instruments on my mac won't 
> profile it :)
>
>
>
>
> On Mon, Aug 22, 2016 at 3:00 PM, Geoff Berry <gberry at codeaurora.org 
> <mailto:gberry at codeaurora.org>> wrote:
>
>     Sure, here is the .bc file for z44.c:
>
>
>
>     On 8/22/2016 5:39 PM, Daniel Berlin wrote:
>>     Can you send me bc files so i can profile?
>>     We haven't really begun to speed anything up yet :)
>>
>>     We also could, if it really mattered, turn off use optimization,
>>     which is usually the slow part of building.
>>
>>     It would require updating defining accesses in the walker
>>     (otherwise, it will slow down every query that asks about a given
>>     load. Caching is a non-starter since you are basically caching
>>     something the size of memoryssa ;)).
>>
>>
>>     On Mon, Aug 22, 2016 at 2:27 PM, Geoff Berry
>>     <gberry at codeaurora.org <mailto:gberry at codeaurora.org>> wrote:
>>
>>         gberry added a comment.
>>
>>         I've collected some compile time stats when enabling
>>         MemorySSA EarlyCSE just for the EarlyCSE pass added at the
>>         beginning of addFunctionSimplificationPasses at O2 and higher.
>>         There were 8 benchmarks in the llvm test-suite whose compile
>>         time increased by more than 1%. The biggest increase was in
>>         consumer-typeset. Drilling down a bit, the MemorySSA
>>         construction time for compiling the z44.c input to this
>>         benchmark is reported as 2% of runtime.
>>
>>
>>         https://reviews.llvm.org/D19821 <https://reviews.llvm.org/D19821>
>>
>>
>>
>>
>
>     -- 
>     Geoff Berry
>     Employee of Qualcomm Datacenter Technologies, Inc.
>       Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
>
>

-- 
Geoff Berry
Employee of Qualcomm Datacenter Technologies, Inc.
  Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/9f9f1b2b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: consumer-typeset.bc
Type: application/octet-stream
Size: 2259572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/9f9f1b2b/attachment-0001.obj>


More information about the llvm-commits mailing list