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]

[PATCH] Make reference types be the same aliasing set as pointers in the C/C++ front-end


I noticed this while working on my tree combiner and I thought it was
wrong to give reference types a different aliasing set than the
pointer type would be given.

OK? Bootstrapped and tested on powerpc-apple-darwin.
Someone who is smart enough could even get a testcase which fails
on the mainline right now.

I also added two small speedups for c_common_get_alias_set as the
front-end get asked all the time for some aliasing sets for some
types.

Thanks,
Andrew Pinski

ChangeLog:

* c-common.c (c_common_get_alias_set): Cache aliasing set for common unsigned/signed types.
Build pointers types for references types and use that for getting
the aliasing set for the type.
Also cache the aliasing set too.
* tree.c (build_type_no_quals_pointers_only): New function, like
build_type_no_quals except build pointer type for reference types
too.
* tree.h (build_type_no_quals_pointers_only): Prototype.




Attachment: fixalias.diff.txt
Description: Text document


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