<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 14, 2016 at 2:01 PM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Jul 14, 2016, at 1:34 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br class="m_1139127344705160189Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 14, 2016 at 1:30 PM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Jul 14, 2016, at 1:26 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br class="m_1139127344705160189m_2402579181451370300Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 13, 2016 at 4:47 PM Mehdi Amini via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: mehdi_amini<br>Date: Wed Jul 13 18:39:46 2016<br>New Revision: 275348<br><br>URL:<span class="m_1139127344705160189m_2402579181451370300Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=275348&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=275348&view=rev</a><br>Log:<br>Add EnableIPRA to TargetOptions, and move the cl::opt -enable-ipra to TargetMachine.cpp<br><br>Avoid exposing a cl::opt in a public header and instead promote this<br>option in the API.<br>Alternatively, we could land the cl::opt in CommandFlags.h so that<br>it is available to every tool, but we would still have to find an<br>option for clang.<br><br></blockquote><div><br></div><div>Are you planning to have it as a -f option to clang or just something via -mllvm?</div></div></div></div></blockquote><div><br></div><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Not sure yet, what do you suggest?</div></div></div></blockquote><div><br></div><div>I'd probably leave it as a -mllvm option at the moment which means you don't need to put it into TargetOptions. Since you probably only would need it for llc anyhow?</div></div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>The question is “how to share access to this option as it starts to affect various part of the codegen”. </div><div>I was not really happy with the previous state which was adding a global cl::opt into TargetPassConfig.h (and pull CommandLine.h into this public header as well), and adding it to “TargetOptions” seemed cleaner.</div></div></div></blockquote><div><br></div><div>Seems cleaner than that for sure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>I’m fine with reverting this if you think it is fine to expose this cl::opt as a global in a public header?</div><div><br></div></div></div></blockquote><div><br></div><div>What are you envisioning ultimately? Staged rollout per target? Perhaps something similar to the MI Scheduler then?</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div></div><div>— </div></div></div><div style="word-wrap:break-word"><div><div>Mehdi</div></div></div><div style="word-wrap:break-word"><div><div><br></div><div><br></div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Modified: llvm/trunk/include/llvm/Target/TargetOptions.h<br>URL:<span class="m_1139127344705160189m_2402579181451370300Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=275348&r1=275347&r2=275348&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=275348&r1=275347&r2=275348&view=diff</a><br>==============================================================================<br>--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)<br>+++ llvm/trunk/include/llvm/Target/TargetOptions.h Wed Jul 13 18:39:46 2016<br>@@ -100,7 +100,8 @@ namespace llvm {<br>           DisableIntegratedAS(false), CompressDebugSections(false),<br>           RelaxELFRelocations(false), FunctionSections(false),<br>           DataSections(false), UniqueSectionNames(true), TrapUnreachable(false),<br>-          EmulatedTLS(false), FloatABIType(FloatABI::Default),<br>+          EmulatedTLS(false), EnableIPRA(false),<br>+          FloatABIType(FloatABI::Default),<br>           AllowFPOpFusion(FPOpFusion::Standard), Reciprocals(TargetRecip()),<br>           JTType(JumpTable::Single), ThreadModel(ThreadModel::POSIX),<br>           EABIVersion(EABI::Default), DebuggerTuning(DebuggerKind::Default),<br>@@ -207,6 +208,9 @@ namespace llvm {<br>     /// function in the runtime library..<br>     unsigned EmulatedTLS : 1;<br><br>+    /// This flag enables InterProcedural Register Allocation (IPRA).<br>+    unsigned EnableIPRA : 1;<br>+<br></blockquote><div><br></div><div>You forgot to add it to the copy routine.</div></div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Did you mean comparison? (I don’t see any copy routine)</div><div><br></div><div>r275467</div><div><br></div><div>Thanks,</div><div><br></div><div>— </div></div></div><div style="word-wrap:break-word"><div><div>Mehdi</div></div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div></div>