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

Eric Christopher echristo at gmail.com
Tue Apr 14 07:31:04 PDT 2015


One high level comment and a few inline nits:

Can you split out the flags part of the patch first? I'm very certain that's not objectionable and will make the actual content of your patch much smaller.

Rest inline :)

Thanks!

-eric


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7806
@@ +7805,3 @@
+  bool AllowRecip = false;
+  if (auto *NodeWithFlags = dyn_cast<SDNodeWithFlags>(N)) {
+    AllowRecip = NodeWithFlags->hasAllowReciprocal();
----------------
Nit: No braces around single statement ifs.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:406
@@ +405,3 @@
+                           const SDNodeFlags *Flags) {
+  if (Flags && mayHaveOptimizationFlags(Opcode)) {
+    unsigned RawFlags = Flags->getRawFlags();
----------------
Early exit?

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:416
@@ +415,3 @@
+static void AddNodeIDFlags(FoldingSetNodeID &ID, const SDNode *N) {
+  if (auto *Node = dyn_cast<SDNodeWithFlags>(N)) {
+    SDNodeFlags Flags = Node->getFlags();
----------------
Early exit?

http://reviews.llvm.org/D8900

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






More information about the llvm-commits mailing list