[PATCH] propagate IR-level fast-math-flags to DAG nodes

Sanjay Patel spatel at rotateright.com
Fri Apr 10 13:59:05 PDT 2015


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3618
@@ -3630,3 +3617,3 @@
 
-    N = GetBinarySDNode(Opcode, DL, VTs, N1, N2, nuw, nsw, exact);
-
+    N = GetSDNodeWithFlags(Opcode, DL, VTs, Ops, Flags);
+    
----------------
kariddi wrote:
> Does it even make sense to have BinarySDNode around at all considering the main function generating these now generates standard SDNodes?
Hi Marcello -

Thanks for looking at this patch. 

I got rid of "BinaryWithFlagsSDNode", but "BinarySDNode" had some uses elsewhere along with "UnarySDNode" and "TernarySDNode".

The comment for BinarySDNode says:
  /// This class is used for two-operand SDNodes.  This is solely
  /// to allow co-allocation of node operands with the node itself.

So it's just there for malloc efficiency? If everybody agrees that it has no value, then I can delete it, but I think that should be a follow-on patch.

http://reviews.llvm.org/D8900

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list