[PATCH] D42267: [ThinLTO] Allow 0 to be a valid value for pruning interval for C LTO API.

Steven Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 18:53:25 PST 2018



> On Feb 7, 2018, at 6:20 PM, katya.romanova at sony.com wrote:
> 
> Thank you! I will wait for a formal LGTM from the code owners and commit.
> Apple could change ld64 not set up cache pruning interval to 0 when pruning_interval option was not set, then I suspect the default settings will be applied.
>  
> Steven, just a heads up. I’m planning to do a follow-up patch allowing 0  to be a meaningful value for the rest 4 cache pruning options. How would it affect you? The rational is the same: to make C LTO API more compatible with C++ LTO API. What do you think?

Are you talking about max size and expiration? ld64 also sets them to 0 if user didn't specify a value. Depending on the meaning you assign to 0, it could actually have undesirable behavior. I think giving them a different value is dangerous but we can discuss once you have your proposal.

Steven

>  
> From: stevenwu at apple.com [mailto:stevenwu at apple.com] 
> Sent: Wednesday, February 7, 2018 2:37 PM
> To: Teresa Johnson <tejohnson at google.com>
> Cc: reviews+D42267+public+4d77dea060c5b663 at reviews.llvm.org; Romanova, Katya <katya.romanova at sony.com>; Mehdi AMINI <joker.eph at gmail.com>; bd1976llvm at gmail.com; deadalnix+llvmreview at gmail.com; Duncan Exon Smith <dexonsmith at apple.com>; Bob Haarman <llvm at inglorion.net>; Easwaran Raman <eraman at google.com>; llvm-commits <llvm-commits at lists.llvm.org>
> Subject: Re: [PATCH] D42267: [ThinLTO] Allow 0 to be a valid value for pruning interval for C LTO API.
>  
>  
> 
> 
> On Feb 7, 2018, at 2:17 PM, Teresa Johnson <tejohnson at google.com <mailto:tejohnson at google.com>> wrote:
>  
>  
>  
> On Tue, Feb 6, 2018 at 4:58 PM, Katya Romanova via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> kromanova added a comment.
> 
> Great! Teresa, please let me know if it's OK to commit or if you want me to change something in this patch.
> I got an OK from Steven Wu, Apple's ThinLTO/ld64 developer.
>  
> It's ok with me. Just to confirm, my understanding after reading through the thread is that currently ld64 will pass the value 0 to this by default, so with this change and the current ld64, pruning will be forced immediately. But Apple will change ld64 so in the future it would not do this. Is that correct?
> As long as Apple is happy, I'm fine with that.
>  
> I had a discussion with Duncan and we are ok with this. Just remember the next time when you use your custom libLTO on macOS during development, you might get cache pruning every time by default. However, the ld64 that supports thinLTO already has -prune_interval_lto which you can overwrite to get the behavior you want.
>  
> Steven
>  
> 
> 
>  
> 
> 
> Repository:
>   rL LLVM
> 
> https://reviews.llvm.org/D42267 <https://reviews.llvm.org/D42267>
> 
> 
> 
> 
>  
> -- 
> Teresa Johnson |
>  Software Engineer |
>  tejohnson at google.com <mailto:tejohnson at google.com> |
>  408-460-2413

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


More information about the llvm-commits mailing list