[PATCH] SelectionDAG: Share ISD::MUL lowering code between the SelectionDAGLegalize and DAGTypeLegalizer
Hal Finkel
hfinkel at anl.gov
Fri Feb 7 14:20:52 PST 2014
----- Original Message -----
> From: "Tom Stellard" <tom at stellard.net>
> To: llvm-commits at cs.uiuc.edu
> Sent: Friday, February 7, 2014 4:12:13 PM
> Subject: [PATCH] SelectionDAG: Share ISD::MUL lowering code between the SelectionDAGLegalize and DAGTypeLegalizer
>
> 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.
I've not yet looked at the patch, but I'll add: There is also expansion logic hidden away in the legalization code that could be used by *ISelLowering in the various targets, and I think that moving things into utility functions in SelectionDAG will help with reuse there as well (GatherAllAliases comes to mind, for example). So, generally speaking, I think this kind of refactoring is a good idea.
-Hal
>
> -Tom
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list