I’m looking at SelectionDAG’s getNode() members, and I notice some of them take a SDNodeFlags argument and some don’t.
Some uses of those Flags avoid memoizing new nodes, others don’t. Unless I misunderstand. And some places in the vector legalizer drop it in some cases. I don’t know why. Is there a reason?
I ask because I need a getNode() that takes a list of SDValues, a list of EVT, and a Flags argument. No such function exists. I need to create a node that is chained, and that’s why I think I need the list of EVT. And the list of SDValue operands seems
cleanest in the caller. The Flags argument is the spoiler.
So what’s the story with the Flags argument? Do we have reasons for dropping it when we do? Is it safe to drop? Is it safe to always keep it? If I add a new getNode() do I need to deal with memoizing?