[PATCH] SelectionDAG: Share ISD::MUL lowering code between the SelectionDAGLegalize and DAGTypeLegalizer

Tom Stellard tom at stellard.net
Fri Feb 7 14:12:13 PST 2014


Hi,

The attached patches allow the SelectionDAGLegalizer to reuse ISD:MUL
lowering code from the DAGTypeLegalizer.

The first patch moves the DAGTypeLegalizer ISD:MUL lowering code into a public
SelectionDAG function called expandMUL() and the second patch modifies
the SelectionDAGLegalizer to use this code.

I think there may be other opportunities to share code between these two classes,
so I'm wondering if the approach I've taken would work for other operations too.
I'm interested in hearing what other people think.

-Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SelectionDAG-Factor-ISD-MUL-lowering-code-out-of-DAG.patch
Type: text/x-diff
Size: 10091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140207/9372799a/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-SelectionDAG-Use-helper-function-to-improve-legaliza.patch
Type: text/x-diff
Size: 5854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140207/9372799a/attachment-0001.patch>


More information about the llvm-commits mailing list