propagate IR-level fast-math-flags to DAG nodes, disabled by default
authorSanjay Patel <spatel@rotateright.com>
Tue, 16 Jun 2015 16:25:43 +0000 (16:25 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 16 Jun 2015 16:25:43 +0000 (16:25 +0000)
commitf134048b1d53a3f8b82f000560149b7b5c1522e5
tree5807cfdd53dffb834b82d5474aaeb6f140835097
parent4f79f96fd7351a0bb731fcb508f76e6ab4ae2134
propagate IR-level fast-math-flags to DAG nodes, disabled by default

This is an updated version of the patch that was checked in at:
http://reviews.llvm.org/rL237046

but subsequently reverted because it exposed a bug in the DAG Combiner:
http://reviews.llvm.org/D9893

This time, there's an enablement flag ("EnableFMFInDAG") around the code in
SelectionDAGBuilder where we copy the set of FP optimization flags from IR
instructions to DAG nodes. So, in theory, there should be no functional change
from this patch as-is, but it will allow testing with the added functionality
to proceed via "-enable-fmf-dag" passed to llc.

This patch adds the minimum plumbing necessary to use IR-level
fast-math-flags (FMF) in the backend without actually using
them for anything yet. This is a follow-on to:
http://reviews.llvm.org/rL235997

Differential Revision: http://reviews.llvm.org/D10403

llvm-svn: 239828
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp