[PATCH] [SDAG] When performing post-legalize DAG combining, run the legalizer over each node in the worklist prior to combining.

Chandler Carruth chandlerc at google.com
Thu Jul 17 12:15:33 PDT 2014


On Thu, Jul 17, 2014 at 3:11 PM, Tom Stellard <tom at stellard.net> wrote:

> On Thu, Jul 17, 2014 at 04:55:00PM +0000, Chandler Carruth wrote:
> > Hi hfinkel, grosbach,
> >
> > This allows the combiner to produce new nodes which need to go back
> > through legalization. This is particularly useful when generating
> > operands to target specific nodes in a post-legalize DAG combine where
> > the operands are significantly easier to express as pre-legalized
> > operations. My immediate use case will be PSHUFB formation where we need
> > to build a constant shuffle mask with a build_vector node.
> >
>
> Since the post-legalize DAG combiner is now doing combining and
> legalizing, do we still need to run legalize as a separate pass.
> Can we instead just do:
>
> combine -> legalize types -> combine w/ legalize ops


I'm specifically going to try this, but wanted to get at least the meat of
the patch out there to make sure folks were still OK with the general
direction and the necessary changes I had to make to the legalization
engine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140717/e1f13eb8/attachment.html>


More information about the llvm-commits mailing list