mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
propagate IR-level fast-math-flags to DAG nodes (NFC)
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 ...which split the existing nsw / nuw / exact flags and FMF into their own struct. There are 2 structural changes here: 1. The main diff is that we're preparing to extend the optimization flags to affect more than just binary SDNodes. Eg, IR intrinsics ( https://llvm.org/bugs/show_bug.cgi?id=21290 ) or non-binop nodes that don't even exist in IR such as FMA, FNEG, etc. 2. The other change is that we're actually copying the FP fast-math-flags from the IR instructions to SDNodes. Differential Revision: http://reviews.llvm.org/D8900 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236546 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -655,7 +655,7 @@ public:
|
||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT);
|
||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N);
|
||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N1, SDValue N2,
|
||||
bool nuw = false, bool nsw = false, bool exact = false);
|
||||
const SDNodeFlags *Flags = nullptr);
|
||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N1, SDValue N2,
|
||||
SDValue N3);
|
||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N1, SDValue N2,
|
||||
@@ -978,8 +978,7 @@ public:
|
||||
|
||||
/// Get the specified node if it's already available, or else return NULL.
|
||||
SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs, ArrayRef<SDValue> Ops,
|
||||
bool nuw = false, bool nsw = false,
|
||||
bool exact = false);
|
||||
const SDNodeFlags *Flags = nullptr);
|
||||
|
||||
/// Creates a SDDbgValue node.
|
||||
SDDbgValue *getDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R,
|
||||
@@ -1236,9 +1235,8 @@ private:
|
||||
|
||||
void allnodes_clear();
|
||||
|
||||
BinarySDNode *GetBinarySDNode(unsigned Opcode, SDLoc DL, SDVTList VTs,
|
||||
SDValue N1, SDValue N2, bool nuw, bool nsw,
|
||||
bool exact);
|
||||
SDNode *GetSDNodeWithFlags(unsigned Opcode, SDLoc DL, SDVTList VTs,
|
||||
ArrayRef<SDValue> Ops, const SDNodeFlags *Flags);
|
||||
|
||||
/// List of non-single value types.
|
||||
FoldingSet<SDVTListNode> VTListMap;
|
||||
|
Reference in New Issue
Block a user