[gcc r15-6477] LoongArch: Implement vector cbranch optab for LSX and LASX
https://gcc.gnu.org/g:81d4707a00a2d74a9caf2d806e5b0ebe13e1247c commit r15-6477-g81d4707a00a2d74a9caf2d806e5b0ebe13e1247c Author: Jiahao Xu Date: Wed Dec 25 17:59:36 2024 +0800 LoongArch: Implement vector cbranch optab for LSX and LASX In order to support vectorization of loops with multiple exits, this patch adds the implementation of the conditional branch optab for LoongArch LSX/LASX instructions. This patch causes the gen-vect-{2,25}.c tests to fail. This is because the support for vectorizing loops with multiple exits has vectorized the loop checking the results. The failure is due to an issue in the test case's own implementation. gcc/ChangeLog: * config/loongarch/simd.md (cbranch4): New expander. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_vect_early_break_hw, check_effective_target_vect_early_break): Support LoongArch LSX. * gcc.target/loongarch/vector/lasx/lasx-vseteqz.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vseteqz.c: New test. Co-authored-by: Deng Jianbo Diff: --- gcc/config/loongarch/simd.md | 30 ++ .../loongarch/vector/lasx/lasx-vseteqz.c | 14 ++ .../gcc.target/loongarch/vector/lsx/lsx-vseteqz.c | 15 +++ gcc/testsuite/lib/target-supports.exp | 2 ++ 4 files changed, 61 insertions(+) diff --git a/gcc/config/loongarch/simd.md b/gcc/config/loongarch/simd.md index fc3d98a43402..4d0069027535 100644 --- a/gcc/config/loongarch/simd.md +++ b/gcc/config/loongarch/simd.md @@ -516,6 +516,36 @@ DONE; }) +;; cbranch +(define_expand "cbranch4" + [(set (pc) + (if_then_else + (match_operator 0 "equality_operator" + [(match_operand:IVEC 1 "register_operand") +(match_operand:IVEC 2 "reg_or_vector_same_val_operand")]) + (label_ref (match_operand 3 "")) + (pc)))] + "" +{ + RTX_CODE code = GET_CODE (operands[0]); + rtx tmp = operands[1]; + rtx const0 = CONST0_RTX (SImode); + + /* If comparing against a non-zero vector we have to do a comparison first +so we can have a != 0 comparison with the result. */ + if (operands[2] != CONST0_RTX (mode)) +{ + tmp = gen_reg_rtx (mode); + emit_insn (gen_xor3 (tmp, operands[1], operands[2])); +} + + if (code == NE) +emit_jump_insn (gen__bnz_v_b (operands[3], tmp, const0)); + else +emit_jump_insn (gen__bz_v_b (operands[3], tmp, const0)); + DONE; +}) + ; The LoongArch SX Instructions. (include "lsx.md") diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-vseteqz.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-vseteqz.c new file mode 100644 index ..1f69a80a784e --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-vseteqz.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mlasx" } */ +/* { dg-final { scan-assembler "\txvset.*.v\t" } } */ +/* { dg-final { scan-assembler "bcnez" } } */ + +int +foo (int N) +{ + for (int i = 0; i <= N; i++) +if (i * i == N) + return i; + return -1; +} + diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vseteqz.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vseteqz.c new file mode 100644 index ..2536bb7945eb --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vseteqz.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mlsx" } */ +/* { dg-final { scan-assembler "\tvset.*.v\t" } } */ +/* { dg-final { scan-assembler "bcnez" } } */ + +int +foo (int N) +{ + for (int i = 0; i <= N; i++) +if (i * i == N) + return i; + + return -1; +} + diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a16e9534ccdd..30ee528d2308 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -4431,6 +4431,7 @@ proc check_effective_target_vect_early_break { } { || [check_effective_target_sse4] || [istarget amdgcn-*-*] || [check_effective_target_riscv_v] + || [check_effective_target_loongarch_sx] }}] } @@ -4447,6 +4448,7 @@ proc check_effective_target_vect_early_break_hw { } { || [check_sse4_hw_available] || [istarget amdgcn-*-*] || [check_effective_target_riscv_v_ok] + || [check_effective_target_loongarch_sx_hw] }}] }
[gcc r15-6481] Fortran: Grammar/markup fixes in intrinsics documentation
https://gcc.gnu.org/g:2c5761025a96e78921ef17d83fc8e7a11b2d1115 commit r15-6481-g2c5761025a96e78921ef17d83fc8e7a11b2d1115 Author: Sandra Loosemore Date: Fri Dec 27 20:45:14 2024 + Fortran: Grammar/markup fixes in intrinsics documentation Continuing a series of patches to tidy the Fortran manual, this installment fixes problems with inappropriate use of future tense and adds some missing markup I noticed in passing. gcc/fortran/ChangeLog * intrinsic.texi: Grammar and markup fixes throughout the file. Diff: --- gcc/fortran/intrinsic.texi | 100 ++--- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index d11d37761d92..b47180126caa 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -348,10 +348,10 @@ another kind, which have more precision. On typical target architectures supported by @command{gfortran}, this kind type parameter is @code{KIND=8}. Hence, @code{REAL(KIND=8)} and @code{DOUBLE PRECISION} are equivalent. In the description of generic intrinsic procedures, the kind type parameter -will be specified by @code{KIND=*}, and in the description of specific -names for an intrinsic procedure the kind type parameter will be explicitly +is specified by @code{KIND=*}, and in the description of specific +names for an intrinsic procedure the kind type parameter is explicitly given (e.g., @code{REAL(KIND=4)} or @code{REAL(KIND=8)}). Finally, for -brevity the optional @code{KIND=} syntax will be omitted. +brevity the optional @code{KIND=} syntax is omitted. Many of the intrinsic procedures take one or more optional arguments. This document follows the convention used in the Fortran 95 standard, @@ -380,8 +380,8 @@ the applicable standard for each intrinsic procedure is noted. @table @asis @item @emph{Description}: @code{ABORT} causes immediate termination of the program. On operating -systems that support a core dump, @code{ABORT} will produce a core dump. -It will also print a backtrace, unless @code{-fno-backtrace} is given. +systems that support a core dump, @code{ABORT} produces a core dump. +It also prints a backtrace, unless @code{-fno-backtrace} is given. @item @emph{Standard}: GNU extension @@ -759,7 +759,7 @@ Inverse function: @* @table @asis @item @emph{Description}: -@code{ADJUSTL(STRING)} will left adjust a string by removing leading spaces. +@code{ADJUSTL(STRING)} left adjusts a string by removing leading spaces. Spaces are inserted at the end of the string as needed. @item @emph{Standard}: @@ -805,7 +805,7 @@ end program test_adjustl @table @asis @item @emph{Description}: -@code{ADJUSTR(STRING)} will right adjust a string by removing trailing spaces. +@code{ADJUSTR(STRING)} right adjusts a string by removing trailing spaces. Spaces are inserted at the start of the string as needed. @item @emph{Standard}: @@ -929,7 +929,7 @@ expression indicating the kind parameter of the result. @item @emph{Return value}: The return value is of type @code{REAL} with the kind type parameter of the argument if the optional @var{KIND} is absent; otherwise, the kind -type parameter will be given by @var{KIND}. If the magnitude of +type parameter is given by @var{KIND}. If the magnitude of @var{X} is less than one, @code{AINT(X)} returns zero. If the magnitude is equal to or greater than one then it returns the largest whole number that does not exceed its magnitude. The sign is the same @@ -967,7 +967,7 @@ end program test_aint @code{ALARM(SECONDS, HANDLER [, STATUS])} causes external subroutine @var{HANDLER} to be executed after a delay of @var{SECONDS} by using @code{alarm(2)} to set up a signal and @code{signal(2)} to catch it. If @var{STATUS} is -supplied, it will be returned with the number of seconds remaining until +supplied, it is returned with the number of seconds remaining until any previously scheduled alarm was due to be delivered, or zero if there was no previously scheduled alarm. @@ -1002,7 +1002,7 @@ program test_alarm call sleep(10) end program test_alarm @end smallexample -This will cause the external routine @var{handler_print} to be called +This causes the external routine @var{handler_print} to be called after 3 seconds. @end table @@ -1211,7 +1211,7 @@ expression indicating the kind parameter of the result. @item @emph{Return value}: The return value is of type real with the kind type parameter of the argument if the optional @var{KIND} is absent; otherwise, the kind -type parameter will be given by @var{KIND}. If @var{A} is greater than +type parameter is given by @var{KIND}. If @var{A} is greater than zero, @code{ANINT(A)} returns @code{AINT(X+0.5)}. If @var{A} is less than or equal to zero then it returns @code{AINT(X-0.5)}. @@ -1577,7 +1577,7 @@ if @var{Y} is present, @var{X} shall be REAL. @item @emph{Return value}: The r
[gcc r15-6483] Fortran: Fix Texinfo warnings building the manual.
https://gcc.gnu.org/g:f8cd181e2d1d5541681ea7e3e92c8da46b048979 commit r15-6483-gf8cd181e2d1d5541681ea7e3e92c8da46b048979 Author: Sandra Loosemore Date: Sat Dec 28 16:29:44 2024 + Fortran: Fix Texinfo warnings building the manual. gcc/fortran/ChangeLog * gfortran.texi (Function ABI Documentation): Make menu ordering consistent with subsection ordering. Diff: --- gcc/fortran/gfortran.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index eb17aff7e381..4509f080ba45 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -4197,9 +4197,9 @@ future implementation of teams. It is about to change without further notice. * _gfortran_caf_send:: Sending data from a local image to a remote image * _gfortran_caf_get:: Getting data from a remote image * _gfortran_caf_sendget:: Sending data between remote images -* _gfortran_caf_get_by_ct:: Getting data from a remote image using a remote side accessor * _gfortran_caf_send_by_ref:: Sending data from a local image to a remote image using enhanced references * _gfortran_caf_get_by_ref:: Getting data from a remote image using enhanced references +* _gfortran_caf_get_by_ct:: Getting data from a remote image using a remote side accessor * _gfortran_caf_sendget_by_ref:: Sending data between remote images using enhanced references * _gfortran_caf_lock:: Locking a lock variable * _gfortran_caf_unlock:: Unlocking a lock variable
[gcc(refs/users/mikael/heads/refactor_descriptor_v01)] Introduction gfc_copy_sequence_descriptor
https://gcc.gnu.org/g:8381350ec58eb4117804007bdb08f0ac6e1ffe07 commit 8381350ec58eb4117804007bdb08f0ac6e1ffe07 Author: Mikael Morin Date: Tue Dec 31 15:27:35 2024 +0100 Introduction gfc_copy_sequence_descriptor Diff: --- gcc/fortran/trans-array.cc | 26 +- gcc/fortran/trans-expr.cc | 43 +++ gcc/fortran/trans.h| 1 + 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index 5b5365a6905f..840f5e17f57e 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -9797,31 +9797,7 @@ gfc_conv_array_parameter (gfc_se *se, gfc_expr *expr, bool g77, conv_shift_descriptor (&block, se->expr, expr->rank); tmp = gfc_class_data_get (ctree); - if (expr->rank > 1 && CLASS_DATA (fsym)->as->rank != expr->rank - && CLASS_DATA (fsym)->as->type == AS_EXPLICIT && !no_pack) - { - tree arr = gfc_create_var (TREE_TYPE (tmp), "parm"); - gfc_conv_descriptor_data_set (&block, arr, - gfc_conv_descriptor_data_get ( - se->expr)); - gfc_conv_descriptor_lbound_set (&block, arr, gfc_index_zero_node, - gfc_index_zero_node); - gfc_conv_descriptor_ubound_set ( - &block, arr, gfc_index_zero_node, - gfc_conv_descriptor_size (se->expr, expr->rank)); - gfc_conv_descriptor_stride_set ( - &block, arr, gfc_index_zero_node, - gfc_conv_descriptor_stride_get (se->expr, gfc_index_zero_node)); - gfc_add_modify (&block, gfc_conv_descriptor_dtype (arr), - gfc_conv_descriptor_dtype (se->expr)); - gfc_add_modify (&block, gfc_conv_descriptor_rank (arr), - build_int_cst (signed_char_type_node, 1)); - gfc_conv_descriptor_span_set (&block, arr, - gfc_conv_descriptor_span_get (arr)); - gfc_conv_descriptor_offset_set (&block, arr, gfc_index_zero_node); - se->expr = arr; - } - gfc_class_array_data_assign (&block, tmp, se->expr, true); + gfc_copy_sequence_descriptor (block, tmp, se->expr); /* Handle optional. */ if (fsym && fsym->attr.optional && sym && sym->attr.optional) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 8b4fd2876788..49cce806a235 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -837,6 +837,49 @@ descriptor_rank (tree descriptor) } +void +gfc_copy_sequence_descriptor (stmtblock_t &block, tree lhs_desc, tree rhs_desc) +{ + int lhs_rank = descriptor_rank (lhs_desc); + int rhs_rank = descriptor_rank (rhs_desc); + tree desc; + + if (lhs_rank == rhs_rank) +desc = rhs_desc; + else +{ + tree arr = gfc_create_var (TREE_TYPE (lhs_desc), "parm"); + gfc_conv_descriptor_data_set (&block, arr, + gfc_conv_descriptor_data_get (rhs_desc)); + gfc_conv_descriptor_lbound_set (&block, arr, gfc_index_zero_node, + gfc_index_zero_node); + tree size = gfc_conv_descriptor_size (rhs_desc, rhs_rank); + gfc_conv_descriptor_ubound_set (&block, arr, gfc_index_zero_node, size); + gfc_conv_descriptor_stride_set ( + &block, arr, gfc_index_zero_node, + gfc_conv_descriptor_stride_get (rhs_desc, gfc_index_zero_node)); + for (int i = 1; i < lhs_rank; i++) + { + gfc_conv_descriptor_lbound_set (&block, arr, gfc_rank_cst[i], + gfc_index_zero_node); + gfc_conv_descriptor_ubound_set (&block, arr, gfc_rank_cst[i], + gfc_index_zero_node); + gfc_conv_descriptor_stride_set (&block, arr, gfc_rank_cst[i], size); + } + gfc_add_modify (&block, gfc_conv_descriptor_dtype (arr), + gfc_conv_descriptor_dtype (rhs_desc)); + gfc_add_modify (&block, gfc_conv_descriptor_rank (arr), + build_int_cst (signed_char_type_node, lhs_rank)); + gfc_conv_descriptor_span_set (&block, arr, + gfc_conv_descriptor_span_get (arr)); + gfc_conv_descriptor_offset_set (&block, arr, gfc_index_zero_node); + desc = arr; +} + + gfc_class_array_data_assign (&block, lhs_desc, desc, true); +} + + void gfc_class_array_data_assign (stmtblock_t *block, tree lhs_desc, tree rhs_desc, bool) diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 4679ea0d6e1c..1450a71fb15a 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -465,6 +465,7 @@ void gfc_finalize_tree_expr (gfc_se *, gfc_symbol *, symbol_attribute, int); bool gfc_assignm
[gcc r15-6480] Documentation: Fix Machine-Dependent Options ordering
https://gcc.gnu.org/g:26226ace87f5b68219ffb74724f6ae3438d4d217 commit r15-6480-g26226ace87f5b68219ffb74724f6ae3438d4d217 Author: Sandra Loosemore Date: Mon Dec 30 19:53:50 2024 + Documentation: Fix Machine-Dependent Options ordering Per comments in invoke.texi, target option groups in the Option Summary section are supposed to be alphabetized and in the same order as the documentation sections they refer to. "M32C Options" was misordered in the Option Summary. "Cygwin and MinGW Options" was ordered incorrectly in both places, which also caused Texinfo diagnostics because the ordering in the menu (which was correctly alphabetized) didn't match the node order. I also added a reference to the appropriate section to each entry in the Option Summary so that you can go directly to the detailed description for that set of target options. I'm not real happy with the formatting of the tables in that section but the experiments I tried all looked worse. :-( gcc/ChangeLog * doc/invoke.texi (Option Summary): Put "M32C Options" and "Cygwin and MinGW Options" in alphabetical order. Add cross-references. (Cygwin and MinGW Options): Likewise move the section to its correct alphabetical location. * config/lynx.opt.urls: Regenerated. * config/mingw/cygming.opt.urls: Regenerated. Diff: --- gcc/config/lynx.opt.urls | 2 +- gcc/config/mingw/cygming.opt.urls | 2 +- gcc/doc/invoke.texi | 335 +++--- 3 files changed, 170 insertions(+), 169 deletions(-) diff --git a/gcc/config/lynx.opt.urls b/gcc/config/lynx.opt.urls index b547138f7ffa..2b5f44eb6c45 100644 --- a/gcc/config/lynx.opt.urls +++ b/gcc/config/lynx.opt.urls @@ -1,5 +1,5 @@ ; Autogenerated by regenerate-opt-urls.py from gcc/config/lynx.opt and generated HTML mthreads -UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mthreads-1) +UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mthreads) diff --git a/gcc/config/mingw/cygming.opt.urls b/gcc/config/mingw/cygming.opt.urls index af11c4997609..fd5502c246e0 100644 --- a/gcc/config/mingw/cygming.opt.urls +++ b/gcc/config/mingw/cygming.opt.urls @@ -10,7 +10,7 @@ mnop-fun-dllimport UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mnop-fun-dllimport) mthreads -UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mthreads-1) +UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mthreads) mwin32 UrlSuffix(gcc/Cygwin-and-MinGW-Options.html#index-mwin32) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 400d192795b0..1572348b1308 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -808,7 +808,7 @@ Objective-C and Objective-C++ Dialects}. @c Try and put the significant identifier (CPU or system) first, @c so users have a clue at guessing where the ones they want will be. -@emph{AArch64 Options} +@emph{AArch64 Options} (@ref{AArch64 Options}) @gccoptlist{-mabi=@var{name} -mbig-endian -mlittle-endian -mgeneral-regs-only -mcmodel=tiny -mcmodel=small -mcmodel=large @@ -829,7 +829,7 @@ Objective-C and Objective-C++ Dialects}. -mstack-protector-guard-offset=@var{offset} -mtrack-speculation -moutline-atomics -mearly-ldp-fusion -mlate-ldp-fusion} -@emph{Adapteva Epiphany Options} +@emph{Adapteva Epiphany Options} (@ref{Adapteva Epiphany Options}) @gccoptlist{-mhalf-reg-file -mprefer-short-insn-regs -mbranch-cost=@var{num} -mcmove -mnops=@var{num} -msoft-cmpsf -msplit-lohi -mpost-inc -mpost-modify -mstack-offset=@var{num} @@ -837,10 +837,10 @@ Objective-C and Objective-C++ Dialects}. -mfp-mode=@var{mode} -mvect-double -max-vect-align=@var{num} -msplit-vecmove-early -m1reg-@var{reg}} -@emph{AMD GCN Options} +@emph{AMD GCN Options} (@ref{AMD GCN Options}) @gccoptlist{-march=@var{gpu} -mtune=@var{gpu} -mstack-size=@var{bytes}} -@emph{ARC Options} +@emph{ARC Options} (@ref{ARC Options}) @gccoptlist{-mbarrel-shifter -mjli-always -mcpu=@var{cpu} -mA6 -mARC600 -mA7 -mARC700 -mdpfp -mdpfp-compact -mdpfp-fast -mno-dpfp-lrsr @@ -860,7 +860,7 @@ Objective-C and Objective-C++ Dialects}. -munalign-prob-threshold=@var{probability} -mmpy-option=@var{multo} -mdiv-rem -mcode-density -mll64 -mfpu=@var{fpu} -mrf16 -mbranch-index} -@emph{ARM Options} +@emph{ARM Options} (@ref{ARM Options}) @gccoptlist{-mapcs-frame -mno-apcs-frame -mabi=@var{name} -mapcs-stack-check -mno-apcs-stack-check @@ -903,7 +903,7 @@ Objective-C and Objective-C++ Dialects}. -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}] [+@var{bti}]|@var{bti}[+@var{pac-ret}[+@var{leaf}]]} -@emph{AVR Options} +@emph{AVR Options} (@ref{AVR Options}) @gccoptlist{-mmcu=@var{mcu} -mabsdata -maccumulate-args -mbranch-cost=@var{cost} -mfuse-add=@var{level} -mfuse-move=@var{level} -mcall-prologues -mgas-isr-prologues -mint8 -mflmap @@ -914,7 +914,7 @@ Object
[gcc r15-6482] Fortran: Fix that/which usage in the manual.
https://gcc.gnu.org/g:d0542de068e79ee222394a45552577c07b1e6b1b commit r15-6482-gd0542de068e79ee222394a45552577c07b1e6b1b Author: Sandra Loosemore Date: Sat Dec 28 03:51:50 2024 + Fortran: Fix that/which usage in the manual. In English usage, "that" introduces a restrictive clause while "which" introduces a non-restrictive or descriptive clause. "That" is almost never preceded by a comma while "which" often is. The Fortran manual had many instances where these uses were reversed, or where a comma was used with "that"; this patch fixes them. In some cases I have substituted less convoluted wording instead. gcc/fortran/ChangeLog * gfortran.texi: Clean up that/which usage throughout the file. * intrinsic.texi: Likewise. * invoke.texi: Likewise. Diff: --- gcc/fortran/gfortran.texi | 66 +++--- gcc/fortran/intrinsic.texi | 32 +++--- gcc/fortran/invoke.texi| 38 +- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 47b89ea726c7..eb17aff7e381 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -705,7 +705,7 @@ the modes are the same as for the @code{CONVERT} specifier: for unformatted files. @item @code{BIG_ENDIAN} Use the big-endian format for unformatted files. @end itemize -For POWER systems which support @option{-mabi=ieeelongdouble}, +For POWER systems that support @option{-mabi=ieeelongdouble}, there are additional options, which can be combined with the others with commas. Those are @itemize @w{} @@ -800,7 +800,7 @@ The default value is 131072. @chapter Compiler Characteristics This chapter describes certain characteristics of the GNU Fortran -compiler, that are not specified by the Fortran standard, but which +compiler that are not specified by the Fortran standard, but which might in some way or another become visible to the programmer. @menu @@ -1140,7 +1140,7 @@ end program main Asynchronous I/O is supported if the program is linked against the POSIX thread library. If that is not the case, all I/O is performed -as synchronous. On systems which do not support pthread condition +as synchronous. On systems that do not support pthread condition variables, such as AIX, I/O is also performed as synchronous. On some systems, such as Darwin or Solaris, the POSIX thread library @@ -1305,7 +1305,7 @@ are: DATA i/1/, j/2/, x/3*0.,1./ @end smallexample -Note that variables which are explicitly initialized in declarations +Note that variables that are explicitly initialized in declarations or in @code{DATA} statements automatically acquire the @code{SAVE} attribute. @@ -1776,7 +1776,7 @@ for unformatted files. @item @code{CONVERT='BIG_ENDIAN'} Use the big-endian representation for unformatted files. @end itemize -On POWER systems which support @option{-mabi=ieeelongdouble}, +On POWER systems that support @option{-mabi=ieeelongdouble}, there are additional options, which can be combined with the others with commas. Those are @itemize @w{} @@ -2049,7 +2049,7 @@ rules and exceptions: Otherwise they may contain no specifiers. @item Structures may contain a special field with the name @code{%FILL}. -This creates an anonymous component which cannot be accessed but occupies +This creates an anonymous component that cannot be accessed but occupies space just as if a component of the same type was declared in its place, useful for alignment purposes. As an example, the following structure consists of at least sixteen bytes: @@ -2622,7 +2622,7 @@ c ... Code that sets A, B and C @subsection Variable @code{FORMAT} expressions @cindex @code{FORMAT} -A variable @code{FORMAT} expression is format statement which includes +A variable @code{FORMAT} expression is format statement that includes angle brackets enclosing a Fortran expression: @code{FORMAT(I)}. GNU Fortran does not support this legacy extension. The effect of variable format expressions can be reproduced by using the more powerful (and @@ -2719,7 +2719,7 @@ reading from the position marked previously. @section Experimental features future Fortran versions @cindex Future Fortran versions -GNU Fortran supports some experimental features which have been +GNU Fortran supports some experimental features that have been proposed and accepted by the J3 standards committee. These exist to give users a chance to try them out, and to provide a reference implementation. @@ -2784,7 +2784,7 @@ as index variables in @code{DO} loops and as array indices. Unsigned numbers can be read and written using list-directed, formatted and unformatted I/O. For formatted I/O, the @samp{B}, @samp{I}, @samp{O} and @samp{Z} descriptors are valid. Negative -values and values which would overflow are rejected with +values and values that would overflow are r
[gcc r15-6479] libstdc++: Delete further Profile Mode leftovers
https://gcc.gnu.org/g:60ef4b9cc9828ba994189c4bf1324e70cb5f3c7f commit r15-6479-g60ef4b9cc9828ba994189c4bf1324e70cb5f3c7f Author: Gerald Pfeifer Date: Wed Jan 1 09:05:02 2025 +0800 libstdc++: Delete further Profile Mode leftovers Commit 544be2beb1fa in 2019 remove Profile Mode and associated docs. Now also remove generated HTML files. libstdc++-v3: * doc/html/manual/profile_mode.html: Delete. * doc/html/manual/profile_mode_api.html: Ditto. * doc/html/manual/profile_mode_cost_model.html: Ditto. * doc/html/manual/profile_mode_design.html: Ditto. * doc/html/manual/profile_mode_devel.html: Ditto. * doc/html/manual/profile_mode_impl.html: Ditto. Diff: --- libstdc++-v3/doc/html/manual/profile_mode.html | 145 - libstdc++-v3/doc/html/manual/profile_mode_api.html | 9 -- .../doc/html/manual/profile_mode_cost_model.html | 17 --- .../doc/html/manual/profile_mode_design.html | 121 - .../doc/html/manual/profile_mode_devel.html| 67 -- .../doc/html/manual/profile_mode_impl.html | 50 --- 6 files changed, 409 deletions(-) diff --git a/libstdc++-v3/doc/html/manual/profile_mode.html b/libstdc++-v3/doc/html/manual/profile_mode.html deleted file mode 100644 index 39c732180ac7.. --- a/libstdc++-v3/doc/html/manual/profile_mode.html +++ /dev/null @@ -1,145 +0,0 @@ - -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>http://www.w3.org/1999/xhtml";>Chapter 19. Profile ModeChapter 19. Profile ModePrev Part III. - Extensions - - NextChapter 19. Profile ModeTable of ContentsIntroUsing the Profile ModeTuning the Profile ModeDesignWrapper ModelInstrumentationRun Time BehaviorAnalysis and DiagnosticsCost ModelReportsTestingExtensions for Custom ContainersEmpirical Cost ModelImplementation IssuesStack TracesSymbolization of Instruction AddressesConcurrencyUsing the Standard Library in the Instrumentation ImplementationMalloc HooksConstruction and Destruction of Global ObjectsDeveloper InformationBig PictureHow To Add A DiagnosticDiagnosticsDiagnostic TemplateContainersHashtable Too SmallHashtable Too LargeInefficient HashVector Too SmallVector Too LargeVector to HashtableHashtable to VectorVector to List< dt>List to VectorList to Forward List (Slist)Ordered to Unordered Associative ContainerAlgorithmsSort Algorithm PerformanceData LocalityNeed Software PrefetchLinked Structure LocalityMultithreaded Data AccessData Dependence Violations at Container LevelFalse SharingStatisticsBibliographyIntro - Goal: Give performance improvement advice based on - recognition of suboptimal usage patterns of the standard library. - - Method: Wrap the standard library code. Insert - calls to an instrumentation library to record the internal state of - various components at interesting entry/exit points to/from the standard - library. Process trace, recognize suboptimal patterns, give advice. - For details, see the - https://ieeexplore.ieee.org/document/4907670/"; target="_top">Perflint - paper presented at CGO 2009. - - Strengths: - - Unintrusive solution. The application code does not require any - modification. - The advice is call context sensitive, thus capable of - identifying precisely interesting dynamic performance behavior. - - The overhead model is pay-per-view. When you turn off a diagnostic class - at compile time, its overhead disappears. - - - Drawbacks: - - You must recompile the application code with custom options. - You must run the application on representative input. - The advice is input dependent. - - The execution time will increase, in some cases by factors. - - Using the Profile Mode - This is the anticipated common workflow for program foo.cc: - -$ cat foo.cc -#include-int main() { - vector v; - for (int k = 0; k < 1024; ++k) v.insert(v.begin(), k); -} - -$ g++ -D_GLIBCXX_PROFILE foo.cc -$ ./a.out -$ cat libstdcxx-profile.txt -vector-to-list: improvement = 5: call stack = 0x804842c ... -: advice = change std::vector to std::list -vector-size: improvement = 3: call stack = 0x804842c ... -: advice = change initial container size from 0 to 1024 - - - Anatomy of a warning: - - Warning id. This is a short descriptive string for the class - that this warning belongs to. E.g., "vector-to-list". - - Estimated improvement. This is an approximation of the benefit expected - from implementing the change suggested by the warning. It is given on - a log10 scale. Negative values mean that the alternative would actually - do worse than the current choice. - In the example above, 5 comes from the fact that the overhead of - inserting at the beginning of a vector vs. a list is around 1024 * 1024 / 2, - which is around 10e5. The improvement from setting the initial size to - 1024 is in the range of 10