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] Conservative alignment tracking (2nd try)


On Wed, Aug 11, 2010 at 5:32 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This is a refresh of the conservative alignment tracking patch which
> uses bit-CCP to generate and propagate alignment information for
> SSA name pointers. ?Alongside annotating pointers by amending
> the SSA_NAME_PTR_INFO structure this patch makes get_pointer_alignment
> conservative and thus always "trustable" (a single call to
> can_trust_pointer_alignment () is remaining - that in cp/call.c,
> for whatever reason that is concerned). ?get_pointer_alignment ()
> is mostly used from within string and memory routine expanders,
> I adjusted the only other caller, get_builtin_sync_mem, to force
> a minimum alignment (even though that alignment requirement isn't
> documented(?) sync primitives on data that eventually overlaps
> with a cache-line boundary are not going to work(?)).
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, bootstrapped
> on ia64-linux with alignment traps enabled, testing is in progress there.
>
> I'll install this tomorrow if nobody has serious concerns.
>
> Thanks,
> Richard.
>
> 2010-08-06 ?Richard Guenther ?<rguenther@suse.de>
>
> ? ? ? ?* tree-flow.h (struct ptr_info_def): Add align and misalign fields.
> ? ? ? ?* tree-ssa-alias.c (get_ptr_info): Move ...
> ? ? ? ?* tree-ssanames.c (get_ptr_info): ... here. ?Initialize
> ? ? ? ?align and misalign fields conservatively.
> ? ? ? ?* tree-ssa-ccp.c (ccp_finalize): From partially constant pointers
> ? ? ? ?derive alignment information.
> ? ? ? ?(evaluate_stmt): Derive alignment information from memory
> ? ? ? ?allocation functions.
> ? ? ? ?* tree.h (get_pointer_alignment): Make unsigned.
> ? ? ? ?* builtins.c (get_object_alignment): Use alignment information we
> ? ? ? ?have computed for pointers.
> ? ? ? ?(get_pointer_alignment): Likewise. ?Make conservative, return
> ? ? ? ?and unsigned value.
> ? ? ? ?(expand_builtin_strlen): Adjust.
> ? ? ? ?(expand_builtin_memcmp): Likewise.
> ? ? ? ?(expand_builtin_strcmp): Likewise.
> ? ? ? ?(expand_builtin_strncmp): Likewise.
> ? ? ? ?(get_builtin_sync_mem): Use at least mode alignment.
> ? ? ? ?(fold_builtin_memset): Adjust.
> ? ? ? ?(fold_builtin_memory_op): Likewise.
> ? ? ? ?* gimple-pretty-print.c (dump_gimple_phi): Alongside alias
> ? ? ? ?information also dump pointer alignment knowledge.
> ? ? ? ?(dump_gimple_stmt): Likewise.
>

It breaks bootstrap on Linux/i386:

../../src-trunk/gcc/builtins.c: In function 'fold_builtin_memory_op':
../../src-trunk/gcc/builtins.c:8402:9: error: comparison between
signed and unsigned integer expressions [-Werror=sign-compare]



-- 
H.J.


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