This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH to shorten_compare -Wtype-limits handling


On 11/20/2015 11:04 AM, Manuel LÃpez-IbÃÃez wrote:
On 20 November 2015 at 17:42, Jeff Law <law@redhat.com> wrote:
So we have to detangle the operand shortening from warning detection. Kai's
idea was to first make the shortening code "pure" in the sense that it would
have no side effects other than to generate the warnings.  Canonicalization
and other transformations would still occur internally, but not be reflected
in the IL.

That was the overall plan and he posted a patch for that.  But that patch
didn't do the due diligence to verify that once the shortening code was made
"pure" that we didn't regress on the quality of the code we generated.

I thought that the original plan was to make the warning code also use
match.pd. That is, that all folding, including FE folding, will be
match.pd-based. Has this changed?
I don't think that's changed.

Detangling the two is the first step. Once detangled we can then look to move the warning to a more suitable location -- right now it's in the C/C++ front-ends, firing way too early. Instead it ought to be checked in gimple form, after match.pd canonicalization and simplifications.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]