mbox series

[v1,0/9] SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement

Message ID DBBPR83MB0613BBA796665747527379E0F8922@DBBPR83MB0613.EURPRD83.prod.outlook.com
Headers show
Series SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement | expand

Message

Evgeny Karpov Sept. 2, 2024, 12:55 p.m. UTC
The main focus of this work is resolving issues in the aarch64-w64-mingw32
target related to enabling optimization with -O2, -O3, and LTO, fixing
relocations, and adding debugging information.

This patch series is supported by the binutils patch series.
https://sourceware.org/pipermail/binutils/2024-August/136481.html

The patches included in this series implement and resolve the
following areas:

1. Support weak references.
2. Add debugging information.
3. Add minimal C++ support.
4. Exclude symbols using GOT from code models.
5. Resolve relocation and small code model issues. Before the change,
the code model could not address more than 1MB due to relocation
issues. After the fix, the SMALL code model can address 4GB properly.
6. Fix optimization issues, mostly related to relocation issues.
7. Add LTO support.
8. Support large alignment.
9. Extend the number of tests from 309k to 605k by adding minimal C++
to the target, and improve the pass rate from 72% to 89% with fixes
in the patch series targeting armv8 without optional extensions 
such as SVE.

What is next?
1. The patch series 4. Partial or full SEH implementation, variadic
functions fixes, call stack support for debugging, bug fixing, and
improving unit tests pass rate.
2. The patch series 5. The rest of SEH, C++ exceptions, Boost
library unit testing, bug fixing, and improving unit tests pass rate.
3. In terms of the contribution window for GCC 15 it will be great
to have architecture target armv8-a in the best quality it can be 
achieved. The patch series to extend architecture target from armv8-a
to "armv8.2-a + sve" might be also prepared before GCC 15 release.
However it is unknown yet if it lands in GCC 15 release or in the
next development cycle.

Thank you for your review!

Prepared, refactored and validated by
Radek Barton <radek.barton@microsoft.com> and
Evgeny Karpov <evgeny.karpov@microsoft.com>

Contributor: Zac Walker <zacwalker@microsoft.com>

Special thanks to Linaro, especially Christophe Lyon, 
for the internal review!

Regards,
Evgeny

Comments

Richard Sandiford Sept. 2, 2024, 3:43 p.m. UTC | #1
Evgeny Karpov <Evgeny.Karpov@microsoft.com> writes:
> The main focus of this work is resolving issues in the aarch64-w64-mingw32
> target related to enabling optimization with -O2, -O3, and LTO, fixing
> relocations, and adding debugging information.
>
> This patch series is supported by the binutils patch series.
> https://sourceware.org/pipermail/binutils/2024-August/136481.html

Thanks for submitting this.  I've responded with minor comments to
some individual patches, but the rest (1, 2, 7, and 8) look good to
me as-is.

On patch 1, do you have a reference for how AArch64 and x86 handle weak
references for MinGW?  The code looks good, but I didn't really follow
why it was doing what it was doing.

Richard

>
> The patches included in this series implement and resolve the
> following areas:
>
> 1. Support weak references.
> 2. Add debugging information.
> 3. Add minimal C++ support.
> 4. Exclude symbols using GOT from code models.
> 5. Resolve relocation and small code model issues. Before the change,
> the code model could not address more than 1MB due to relocation
> issues. After the fix, the SMALL code model can address 4GB properly.
> 6. Fix optimization issues, mostly related to relocation issues.
> 7. Add LTO support.
> 8. Support large alignment.
> 9. Extend the number of tests from 309k to 605k by adding minimal C++
> to the target, and improve the pass rate from 72% to 89% with fixes
> in the patch series targeting armv8 without optional extensions 
> such as SVE.
>
> What is next?
> 1. The patch series 4. Partial or full SEH implementation, variadic
> functions fixes, call stack support for debugging, bug fixing, and
> improving unit tests pass rate.
> 2. The patch series 5. The rest of SEH, C++ exceptions, Boost
> library unit testing, bug fixing, and improving unit tests pass rate.
> 3. In terms of the contribution window for GCC 15 it will be great
> to have architecture target armv8-a in the best quality it can be 
> achieved. The patch series to extend architecture target from armv8-a
> to "armv8.2-a + sve" might be also prepared before GCC 15 release.
> However it is unknown yet if it lands in GCC 15 release or in the
> next development cycle.
>
> Thank you for your review!
>
> Prepared, refactored and validated by
> Radek Barton <radek.barton@microsoft.com> and
> Evgeny Karpov <evgeny.karpov@microsoft.com>
>
> Contributor: Zac Walker <zacwalker@microsoft.com>
>
> Special thanks to Linaro, especially Christophe Lyon, 
> for the internal review!
>
> Regards,
> Evgeny
Evgeny Karpov Sept. 5, 2024, 11:54 a.m. UTC | #2
Monday, September 2, 2024
Richard Sandiford <richard.sandiford@arm.com> wrote:

> Thanks for submitting this.  I've responded with minor comments to
> some individual patches, but the rest (1, 2, 7, and 8) look good to
> me as-is.

Thank you for the review. The patch series v2 will be submitted after
the validation.

Regards,
Evgeny