Hello,

Jeff Law <jeffreya...@gmail.com> writes:

> On 6/19/23 22:52, Tamar Christina wrote:
>
>>> It's a bit hackish, but could we reject the stack pointer for operand1 in 
>>> the
>>> stack-tie?  And if we do so, does it help?
>> Yeah this one I had to defer until later this week to look at closer because 
>> what I'm
>> wondering about is whether the optimization should apply to frame related
>> RTX as well.
>> Looking at the description of RTX_FRAME_RELATED_P that this optimization may
>> end up de-optimizing RISC targets by creating an offset that is larger than 
>> offset
>> which can be used from a SP making reload having to spill.  i.e. sometimes 
>> the
>> move was explicitly done. So perhaps it should not apply it to
>> RTX_FRAME_RELATED_P in find_oldest_value_reg and copyprop_hardreg_forward_1?
>> Other parts of this pass already seems to bail out in similar situations. So 
>> I needed
>> to
>> write some testcases to check what would happen in these cases hence the 
>> deferral.
>> to later in the week.
> Rejecting for RTX_FRAME_RELATED_P would seem reasonable and probably better 
> in general to
> me.  The cases where we're looking to clean things up aren't really in the
> prologue/epilogue, but instead in the main body after register elimination 
> has turned fp
> into sp + offset, thus making all kinds of things no longer valid.

The problems I reported were fixed by commits:

580b74a79146 "aarch64: Robustify stack tie handling"
079f31c55318 "aarch64: Fix gcc.target/aarch64/sve/pcs failures"

Thanks!

But unfortunately I'm still seeing bootstrap failures (ICE segmentation
fault) in today's trunk with build config bootstrap-lto in both
armv8l-linux-gnueabihf and aarch64-linux-gnu.

If I revert commit 6a2e8dcbbd4b "cprop_hardreg: Enable propagation of
the stack pointer if possible" from trunk then both bootstraps succeed.

Here's the command I'm using to build on armv8l:

~/src/configure \
    SHELL=/bin/bash \
    --with-gnu-as \
    --with-gnu-ld \
    --disable-libmudflap \
    --enable-lto \
    --enable-shared \
    --without-included-gettext \
    --enable-nls \
    --with-system-zlib \
    --disable-sjlj-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --disable-libstdcxx-pch \
    --enable-c99 \
    --enable-clocale=gnu \
    --enable-libstdcxx-debug \
    --enable-long-long \
    --with-cloog=no \
    --with-ppl=no \
    --with-isl=no \
    --disable-multilib \
    --with-float=hard \
    --with-fpu=neon-fp-armv8 \
    --with-mode=thumb \
    --with-arch=armv8-a \
    --enable-threads=posix \
    --enable-multiarch \
    --enable-libstdcxx-time=yes \
    --enable-gnu-indirect-function \
    --disable-werror \
    --enable-checking=yes \
    --enable-bootstrap \
    --with-build-config=bootstrap-lto \
    --enable-languages=c,c++,fortran,lto \
    && make \
        profiledbootstrap \
        SHELL=/bin/bash \
        -w \
        -j 40 \
        CFLAGS_FOR_BUILD="-pipe -g -O2" \
        CXXFLAGS_FOR_BUILD="-pipe -g -O2" \
        LDFLAGS_FOR_BUILD="-static-libgcc" \
        MAKEINFOFLAGS=--force \
        BUILD_INFO="" \
        MAKEINFO=echo

And here's the slightly different one for aarch64-linux:

~/src/configure \
    SHELL=/bin/bash \
    --with-gnu-as \
    --with-gnu-ld \
    --disable-libmudflap \
    --enable-lto \
    --enable-shared \
    --without-included-gettext \
    --enable-nls \
    --with-system-zlib \
    --disable-sjlj-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --disable-libstdcxx-pch \
    --enable-c99 \
    --enable-clocale=gnu \
    --enable-libstdcxx-debug \
    --enable-long-long \
    --with-cloog=no \
    --with-ppl=no \
    --with-isl=no \
    --disable-multilib \
    --enable-fix-cortex-a53-835769 \
    --enable-fix-cortex-a53-843419 \
    --with-arch=armv8-a \
    --enable-threads=posix \
    --enable-multiarch \
    --enable-libstdcxx-time=yes \
    --enable-gnu-indirect-function \
    --disable-werror \
    --enable-checking=yes \
    --enable-bootstrap \
    --with-build-config=bootstrap-lto \
    --enable-languages=c,c++,fortran,lto \
    && make \
        profiledbootstrap \
        SHELL=/bin/bash \
        -w \
        -j 40 \
        LDFLAGS_FOR_TARGET="-Wl,-fix-cortex-a53-843419" \
        CFLAGS_FOR_BUILD="-pipe -g -O2" \
        CXXFLAGS_FOR_BUILD="-pipe -g -O2" \
        LDFLAGS_FOR_BUILD="-static-libgcc" \
        MAKEINFOFLAGS=--force \
        BUILD_INFO="" \
        MAKEINFO=echo

-- 
Thiago

Reply via email to