<div dir="ltr">Hi Eric,<br><br>Thanks for the elaboration. I now understand. Luckily these mapper classes are always instantiated at the point of use anyway, but I agree that changing their API to make it more clear their intended use would be a good thing.<div><br></div><div>Vladimir, could you please remove the FeatureBits from the constructor of these classes and have it passed in as a parameter to all the query functions?</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><br><div class="gmail_quote">On Thu, 26 Mar 2015 at 23:51 Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote">On Thu, Mar 26, 2015 at 4:50 PM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote">On Thu, Mar 26, 2015 at 2:49 PM James Molloy <<a href="mailto:james@jamesmolloy.co.uk" target="_blank">james@jamesmolloy.co.uk</a>> wrote:<br></div></div><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">Hi Eric,<br><br></blockquote></div></div><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">Are you saying the uint64_t feature sets shouldn't be copied into the helper class and perhaps should be passed to the query functions directly? Or that there's some API for querying them that I'm missing? Or something else?<br><br></blockquote></div></div><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"></blockquote><div><br></div><div>I was thinking of instead just using the AsmParser's knowledge of such things rather than copying them around and defining functions in each one.</div><div><br></div><div>Ultimately no objection anymore, it'd be nice to not have state kept in these helpers though.</div><div><br></div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>To elaborate:</div><div><br></div><div>Because asm parsing and asm printing are both subtarget dependent and not target machine dependent. Some of this will end up changing and unifying uses of features will make it somewhat easier to clean up.</div><div><br></div><div>(As an example take a look at the ARM inst printer and see where it checks on the subtarget and then realize that it's currently being set per module).</div></div></div><div dir="ltr"><div class="gmail_quote"><div><br></div><div>-eric</div></div></div><div dir="ltr"><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_quote"><div></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry I'm bein</blockquote></div></div><div dir="ltr"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">g obtuse, but it seems like you have some context that I'm missing which is making it difficult for me to understand. <br><br>Cheers,<br><br>James<br><div class="gmail_quote">On Thu, 26 Mar 2015 at 21:43, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">A better question might be:<br><br><div>Why are all of these classes copying the feature sets and using them with their own API?</div></div><div dir="ltr"><div><br></div><div>-eric</div></div><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 2:39 PM James Molloy <<a href="mailto:james@jamesmolloy.co.uk" target="_blank">james@jamesmolloy.co.uk</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Eric,<br><br>Thanks for the clarification. I'm afraid I don't fully understand what you're saying though, so perhaps you could clarify further?<br><div><br></div><div>The mapper classes map between a textual register/prefetch operation/barrier name and its binary equivalent. Whether this succeeds is sometimes dependent on a subtarget feature being available. My reading of this patch (and the code in situ) is that the mapper classes take a subtarget feature set and query it. The input comes transitively from ComputeAvailableFeatures(), so I'm afraid I don't understand what about this is "reimplementing".</div><div><br></div><div>Sorry,</div><div><br></div><div>James</div></div><br><div class="gmail_quote">On Thu, 26 Mar 2015 at 19:53 Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why are you effectively reimplementing the feature sets for this class?<br>
<br>
-eric<br>
<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D8496" target="_blank">http://reviews.llvm.org/D8496</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settin<u></u>gs/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
<br>
______________________________<u></u><u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/llvm-commits</a><br>
</blockquote></div>
______________________________<u></u><u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div></div></blockquote></div></div></blockquote></div>