<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 7, 2018, at 6:20 PM, <a href="mailto:katya.romanova@sony.com" class="">katya.romanova@sony.com</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Thank you! I will wait for a formal LGTM from the code owners and commit.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">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.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">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?</span></div></div></div></blockquote><div><br class=""></div><div>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.</div><div><br class=""></div><div>Steven</div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span><a href="mailto:stevenwu@apple.com" class="">stevenwu@apple.com</a> [<a href="mailto:stevenwu@apple.com" class="">mailto:stevenwu@apple.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, February 7, 2018 2:37 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Teresa Johnson <<a href="mailto:tejohnson@google.com" class="">tejohnson@google.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:reviews+D42267+public+4d77dea060c5b663@reviews.llvm.org" class="">reviews+D42267+public+4d77dea060c5b663@reviews.llvm.org</a>; Romanova, Katya <<a href="mailto:katya.romanova@sony.com" class="">katya.romanova@sony.com</a>>; Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" class="">joker.eph@gmail.com</a>>; <a href="mailto:bd1976llvm@gmail.com" class="">bd1976llvm@gmail.com</a>; <a href="mailto:deadalnix+llvmreview@gmail.com" class="">deadalnix+llvmreview@gmail.com</a>; Duncan Exon Smith <<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>>; Bob Haarman <<a href="mailto:llvm@inglorion.net" class="">llvm@inglorion.net</a>>; Easwaran Raman <<a href="mailto:eraman@google.com" class="">eraman@google.com</a>>; llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [PATCH] D42267: [ThinLTO] Allow 0 to be a valid value for pruning interval for C LTO API.<o:p class=""></o:p></span></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">On Feb 7, 2018, at 2:17 PM, Teresa Johnson <<a href="mailto:tejohnson@google.com" style="color: purple; text-decoration: underline;" class="">tejohnson@google.com</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">On Tue, Feb 6, 2018 at 4:58 PM, Katya Romanova via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">reviews@reviews.llvm.org</a>> wrote:<o:p class=""></o:p></div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">kromanova added a comment.<br class=""><br class="">Great! Teresa, please let me know if it's OK to commit or if you want me to change something in this patch.<br class="">I got an OK from Steven Wu, Apple's ThinLTO/ld64 developer.<o:p class=""></o:p></div></blockquote><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">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?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">As long as Apple is happy, I'm fine with that.<o:p class=""></o:p></div></div></div></div></div></div></blockquote><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">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.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">Steven<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""> <o:p class=""></o:p></div></div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;" class=""><div class=""><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: "Times New Roman", serif;"><br class=""><br class="">Repository:<br class="">  rL LLVM<br class=""><br class=""><a href="https://reviews.llvm.org/D42267" target="_blank" style="color: purple; text-decoration: underline;" class="">https://reviews.llvm.org/D42267</a><br class=""><br class=""><br class=""><o:p class=""></o:p></p></div></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><br class=""><br clear="all" class=""><o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class="">--<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div class=""><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0"><tbody class=""><tr class=""><td nowrap="" style="border-style: solid none none; border-top-width: 1.5pt; border-top-color: rgb(213, 15, 37); padding: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-family: Arial, sans-serif; color: rgb(85, 85, 85);" class="">Teresa Johnson |<o:p class=""></o:p></span></div></td><td nowrap="" style="border-style: solid none none; border-top-width: 1.5pt; border-top-color: rgb(51, 105, 232); padding: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-family: Arial, sans-serif; color: rgb(85, 85, 85);" class=""> Software Engineer |<o:p class=""></o:p></span></div></td><td nowrap="" style="border-style: solid none none; border-top-width: 1.5pt; border-top-color: rgb(0, 153, 57); padding: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-family: Arial, sans-serif; color: rgb(85, 85, 85);" class=""> <a href="mailto:tejohnson@google.com" target="_blank" style="color: purple; text-decoration: underline;" class="">tejohnson@google.com</a> |<o:p class=""></o:p></span></div></td><td nowrap="" style="border-style: solid none none; border-top-width: 1.5pt; border-top-color: rgb(238, 178, 17); padding: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;" class=""><span style="font-family: Arial, sans-serif; color: rgb(85, 85, 85);" class=""> 408-460-2413</span></div></td></tr></tbody></table></div></div></div></div></blockquote></div></div></div></blockquote></div><br class=""></body></html>