/// Tracks dbg_value information through SDISel.
SDDbgInfo *DbgInfo;
+ uint16_t NextPersistentId = 0;
+
public:
/// Clients of various APIs that cause global effects on
/// the DAG can optionally implement this interface. This allows the clients
}
iterator_range<allnodes_iterator> allnodes() {
- return iterator_range<allnodes_iterator>(allnodes_begin(), allnodes_end());
+ return make_range(allnodes_begin(), allnodes_end());
}
iterator_range<allnodes_const_iterator> allnodes() const {
- return iterator_range<allnodes_const_iterator>(allnodes_begin(),
- allnodes_end());
+ return make_range(allnodes_begin(), allnodes_end());
}
/// Return the root tag of the SelectionDAG.
SDVTList VTs = getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Glue };
return getNode(ISD::CopyToReg, dl, VTs,
- ArrayRef<SDValue>(Ops, Glue.getNode() ? 4 : 3));
+ makeArrayRef(Ops, Glue.getNode() ? 4 : 3));
}
// Similar to last getCopyToReg() except parameter Reg is a SDValue
SDVTList VTs = getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, Reg, N, Glue };
return getNode(ISD::CopyToReg, dl, VTs,
- ArrayRef<SDValue>(Ops, Glue.getNode() ? 4 : 3));
+ makeArrayRef(Ops, Glue.getNode() ? 4 : 3));
}
SDValue getCopyFromReg(SDValue Chain, SDLoc dl, unsigned Reg, EVT VT) {
SDVTList VTs = getVTList(VT, MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, getRegister(Reg, VT), Glue };
return getNode(ISD::CopyFromReg, dl, VTs,
- ArrayRef<SDValue>(Ops, Glue.getNode() ? 3 : 2));
+ makeArrayRef(Ops, Glue.getNode() ? 3 : 2));
}
SDValue getCondCode(ISD::CondCode Cond);
const ConstantSDNode *Cst1,
const ConstantSDNode *Cst2);
+ SDValue FoldConstantVectorArithmetic(unsigned Opcode, SDLoc DL,
+ EVT VT, ArrayRef<SDValue> Ops,
+ const SDNodeFlags *Flags = nullptr);
+
/// Constant fold a setcc to true or false.
SDValue FoldSetCC(EVT VT, SDValue N1,
SDValue N2, ISD::CondCode Cond, SDLoc dl);
/// other positive zero.
bool isEqualTo(SDValue A, SDValue B) const;
+ /// Return true if A and B have no common bits set. As an example, this can
+ /// allow an 'add' to be transformed into an 'or'.
+ bool haveNoCommonBitsSet(SDValue A, SDValue B) const;
+
/// Utility function used by legalize and lowering to
/// "unroll" a vector operation by splitting out the scalars and operating
/// on each element individually. If the ResNE is 0, fully unroll the vector