[LLVMdev] visitBIT_CONVERT (previous Shouldn't DAGCombine insert legal nodes?)

Mondada Gabriele g.mondada at etel.ch
Tue Mar 10 06:14:37 PDT 2009


> how about this instead: modify the DAGCombiner so that before
> operations
> have been legalized, the DAGCombiner is allowed to produce nodes
> satisfying
> isOperationLegalOrCustom, while after operations have been legalized it
> is
> only allowed to produce nodes satisfying isOperationLegal.

Yes, it should be good to modify DAGCombiner in order to avoid generating "unselectable" nodes. For the short-term, I plan to "uncombine" the DAG during selection as described before.
Once again, I think it is not good to replace nodes by "Custom" ones in an optimization (combine) pass. It is better to keep the DAG as it is. So, in my opinion, there is no advantage to use isOperationLegalOrCustom(), even before legalization. The usage of isOperationLegal() should be enough.

Gabriele





More information about the llvm-dev mailing list