Hi Dave, Did that patch of yours ever make it into trunk? I can't seem to find any related checkin for PromoteMemoryToRegister.cpp. I've been doing some extra profiling lately and the RewriteSingleStoreAlloca function alone is taking a whopping 63% of execution time. Thanks! Nicolas -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of David Greene Sent: Monday, 11 August, 2008 23:05 To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] mem2reg optimization On Monday 11 August 2008 09:58, Nicolas Capens wrote:> Hi all, > > > > While profiling LLVM I noticed that a significant amount of time is spent > in the RewriteSingleStoreAlloca function. Especially for fairly long basic > blocks, linearly searching for uses before a store isn't fast. So I was > wondering if there isn't a faster way to locate these uses?YES! I just finished a patch 2 hours ago to fix this. I'll get it in ASAP. mem2reg totally dropped off the radar once I did this. -Dave _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Wednesday 24 September 2008 09:35, Nicolas Capens wrote:> Hi Dave, > > Did that patch of yours ever make it into trunk? I can't seem to find any > related checkin for PromoteMemoryToRegister.cpp. I've been doing some extra > profiling lately and the RewriteSingleStoreAlloca function alone is taking > a whopping 63% of execution time.I will commit it today along with some other things. I've been having a lot of trouble building llvm-gcc but I think I've struggled enouigh now and will just hope our testing on this end has been enough. Thanks for the prod. -Dave
Hi Dave, As an exercise I tried to fix this myself, and I think I have a working patch (attached). My own tests are all working wonderfully, and at fantastic performance! I'm looking forward to your patch to see whether we used the same approach or whether things could be improved further. Anyway, I've re-profiled the code and found ComputeLiveInBlocks to be the main hotspot now. Again it uses a linear search over the instructions so there's a chance this can be optimized as well... Kind regards, Nicolas -----Original Message----- From: David Greene [mailto:dag at cray.com] Sent: Wednesday, 24 September, 2008 18:07 To: Nicolas Capens Cc: 'LLVM Developers Mailing List' Subject: Re: [LLVMdev] mem2reg optimization On Wednesday 24 September 2008 09:35, Nicolas Capens wrote:> Hi Dave, > > Did that patch of yours ever make it into trunk? I can't seem to find any > related checkin for PromoteMemoryToRegister.cpp. I've been doing someextra> profiling lately and the RewriteSingleStoreAlloca function alone is taking > a whopping 63% of execution time.I will commit it today along with some other things. I've been having a lot of trouble building llvm-gcc but I think I've struggled enouigh now and will just hope our testing on this end has been enough. Thanks for the prod. -Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: PromoteMemoryToRegister.patch Type: application/octet-stream Size: 2695 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080925/6cf39542/attachment.obj>