This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][store-merging] Use store order as tie-breaker in sort_by_bitpos
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Sep 2017 15:44:29 +0200
- Subject: Re: [PATCH][store-merging] Use store order as tie-breaker in sort_by_bitpos
- Authentication-results: sourceware.org; auth=none
- References: <59B92C58.6070204@foss.arm.com>
On Wed, Sep 13, 2017 at 3:02 PM, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> As Alexander pointed out in the thread starting at [1] the sort_by_bitpos
> sorting function
> was behaving badly when we had multiple stores at the same position. He
> fixed that (thanks!)
> but we can do better by not returning zero when the bitpositions are equal
> but by falling back
> to comparing the order the stores appear in, which is guaranteed to be
> unique (barring other
> bugs elsewhere).
>
> This patch does that.
>
> Bootstrapped and tested on aarch64-none-linux-gnu.
>
> Ok for trunk?
Ok.
Richard.
> Thanks,
> Kyrill
>
> [1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00895.html
>
> 2017-09-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
> when bitposition is the same.