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/IPA] Fix ipa-polymorphic-call when size of Pmode is not the size of pointers in user code


On Wed, Nov 19, 2014 at 4:54 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
>   For ILP32 on AARCH64, we have ptr_mode != Pmode (we have ptr_mode
> being SImode while Pmode is DImode and POINTER_SIZE is 32).  This
> breaks ipa-polymorphic-call assumption that Pmode is the correct mode
> for pointers.  Right now before this patch we get many testcase
> failures in the C++ testsuite due to this.  Some of the tests fail due
> to the wrong devirtualization happening (using the base class rather
> the current class).
>
> This patch fixes the issue by using POINTER_SIZE in place of
> GET_MODE_BITSIZE (Pmode) all over the file.
>
> OK?  Bootstrapped and tested on x86_64 and cross built and tested for
> aarch64-elf with no regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> ipa/63981
> * ipa-polymorphic-call.c (possible_placement_new):
> Use POINTER_SIZE instead of GET_MODE_BITSIZE (Pmode).
> (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
> (extr_type_from_vtbl_ptr_store): Likewise.

Does Pmode affect class layout?


-- 
H.J.


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