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] |
On 02/12/15 00:01, Bin.Cheng wrote:
match.pd really feels like a meta-language which describes how to combine gimple or generic statements.Cool that we are trying to simplify type conversion using generic match facility. I have thought about type promotion in match.pd too.
In theory, given VRP information attached to an SSA_NAME you could query that information in the conditional part of the match.pd pattern.For example, (unsigned long long)(unsigned long)(int_expr), if we can prove int_expr is always positive (in my case, this is from vrp information), then the first conversion can be saved. This is another way for (and related? I didn't look at the code) the sign/zero extension elimination work using VRP I suppose?
Another patch I'm working on is best described as detecting cases where an outer bit-and masks off all the bits outside the innermost operand's type. Under the right conditions, this also allows for narrowing.
Jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |