<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 18, 2016 at 1:45 PM Sanjay Patel <<a href="mailto:spatel@rotateright.com">spatel@rotateright.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">spatel added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: include/llvm/Target/TargetLowering.h:260-266<br class="gmail_msg">
+  int getSqrtEnabled(EVT VT, MachineFunction &MF) const;<br class="gmail_msg">
+<br class="gmail_msg">
+  /// Return a ReciprocalEstimate enum value for a division of the given type<br class="gmail_msg">
+  /// based on the function's attributes. If the operation is not overridden by<br class="gmail_msg">
+  /// the function's attributes, "Unspecified" is returned and target defaults<br class="gmail_msg">
+  /// are expected to be used for instruction selection.<br class="gmail_msg">
+  int getDivEnabled(EVT VT, MachineFunction &MF) const;<br class="gmail_msg">
----------------<br class="gmail_msg">
echristo wrote:<br class="gmail_msg">
> Bit of a bikeshed but these two functions sound like they're seeing if sqrt and div are instructions in the hardware.<br class="gmail_msg">
I'll take any suggested improvements. :)<br class="gmail_msg">
<br class="gmail_msg">
Note that I reverted this commit at rL284513 because I screwed something up with the StringRefs while parsing the function attribute.<br class="gmail_msg">
<br class="gmail_msg"></blockquote><div><br></div><div>It's long, but how about getRecipEstimateDivEnabled?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A bot said: "AddressSanitizer: initialization-order-fiasco" (!)<br class="gmail_msg"><br class="gmail_msg"></blockquote><div><br></div><div>How judgmental ;)</div><div><br></div><div>-eric </div></div></div>