[LLVMdev] Shouldn't DAGCombine insert legal nodes?
Duncan Sands
baldrick at free.fr
Tue Jan 20 00:24:13 PST 2009
On Tuesday 20 January 2009 07:52:37 Evan Cheng wrote:
> Right. DAGCombine will insert *illegal* nodes before legalize.
There are two stages of legalization: legalization of types,
followed by legalization of operations. Before type legalization
DAGCombine is allowed to create nodes with illegal types and illegal
operations. After type legalization but before operation legalization
it is allowed to create nodes with illegal operations, but all types
must be legal. After operation legalization it is only allowed to
create fully legal nodes.
Inside DAGCombine this is specified by two flags:
LegalTypes being true means that all nodes must have legal types.
LegalOperations being true means that all nodes must have legal
operations (as well as types: LegalTypes will also be true).
So if LegalTypes is true and nonetheless a constant with an
illegal type is being created then that is a DAG combiner bug.
Ciao,
Duncan.
More information about the llvm-dev
mailing list