[llvm-dev] SDNodeFlags and getNode() reasoning?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] SDNodeFlags and getNode() reasoning?

David Jones via llvm-dev
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?
 
--
Kevin P. Neal
SAS/C and SAS/C++ Compiler
Host Research and Development
SAS Institute, Inc.
 
 
 
 

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev