This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] type promotion pass
On Fri, Sep 15, 2017 at 10:56:04AM -0600, Jeff Law wrote:
> Yes, these are some of the things we kicked around. One of the most
> interesting conclusions was that for these target issues we'd really
> like a target.pd file to handle this class of transformations just prior
> to rtl expansion.
But often combine will need to know about which bits you actually care
about (and other passes too, but combine is the biggie).
> Essentially early type promotion/demotion would be concerned with cases
> where we can eliminate operations in a target independent manner and
> narrow operands as much as possible. Late promotion/demotion would deal
> with stuff like the target's desire to work on specific sized hunks in
> specific contexts.
> I'm greatly oversimplifying here. Type promotion/demotion is fairly
> complex to get right.
Maybe the best thing is to promote really early, but to keep track of which
bits matter. And then adjust some passes to take that into account. Not a
trivial amount of work.