<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><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 dir="ltr"><div class="gmail_quote"><span><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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 dir="ltr"><div class="gmail_quote"><span><font color="#888888"><div><br></div></font></span></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Since restrict-it is a tri-state, I think you'll have to define two new subtarget features in ARM.td (see the attached patch). I'm not sure how prefixing "restrict-it" by "-" is going to work.</div></div></div></div></blockquote><div><br></div></span><div>I think default is a red herring here a bit. It's either on or off right now, we might have to bake in some back end knowledge in the front end about when to apply it, but it should still work out yes?</div><span><div><br></div></span></div></div></blockquote><div><br></div></span><div>Yes, we'll have to know whether "restrict-it" or "no-restrict-it" was passed on command line and whether v8 is supported.</div><span><div><br></div></span></div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>As per your suggestion, I added one feature in ARM.td and then fixed getARMTargetFeatures in lib/Driver/Tools.cpp to push feature "+restrict-it" to the feature list based on the subarch.</div><div><br></div><div>It seems to me that we can add code-gen options to the IR as subtarget features in most cases, but it's not clear to me when to use function attributes and when to use subtarget features. Should we convert target-specific code-gen options into subtarget features whenever it is possible to do so, and  convert target-independent options into function attributes?</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div></blockquote><div><br></div><div>This is what I've been thinking at the moment. I think it cleans up quite a bit of the interface mechanics etc. I've even added one more target-independent one (soft-float) as a subtarget feature because that seems to make the most sense. I think at least some of these are going to be on a case by case basis, but this seems to make the most sense to me.</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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><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 dir="ltr"><div class="gmail_quote"><span><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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>This approach can potentially create larger numbers of subtarget objects as two subtarget objects have to be created If one function has feature "restricted-it" and another has feature "no-restricted-it". If we take the approach in my original patch, we need only one subtarget object. Do you think that's going to be a problem?<br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div></blockquote><div><br></div></span><div>Irrespective of the above I'm not too worried about this. In general, people have a tendency to use the same command line options everywhere, especially for this sort of thing.</div><span><font color="#888888"><div><br></div></font></span></div></div></blockquote><div><br></div></span><div>I would think so too.</div><span><div><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 dir="ltr"><div class="gmail_quote"><span><font color="#888888"><div></div><div>-eric</div></font></span><span><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 dir="ltr"><div class="gmail_extra"><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"><div dir="ltr"><div class="gmail_quote"><span><font color="#888888"><div></div><div>-eric</div></font></span><span><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">
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10414&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=xNXOISfaybQY5JMgPQpMYwpgXBCFvfgN7k0NOQSHqY4&s=0oFT07MPeAgd_2eHPH9ABnbC2NwljHFZhdMSScn1-Y8&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10414</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=xNXOISfaybQY5JMgPQpMYwpgXBCFvfgN7k0NOQSHqY4&s=C1jSyC0Fbw1uyZM8Oh82P3IlASPAW9omb-M88-1recU&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></span></div></div>
</blockquote></div></div></div></blockquote></span></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div></div></div></blockquote></div></div>