]>
git.ipfire.org Git - thirdparty/gcc.git/log
kubaneko [Tue, 9 May 2023 20:10:59 +0000 (20:10 +0000)]
fixed typo
Honza [Tue, 9 May 2023 14:26:00 +0000 (16:26 +0200)]
Add parameters to control histogram profiling and peeling
Honza [Sun, 7 May 2023 19:47:26 +0000 (21:47 +0200)]
Minor heuristics improvements
Honza [Sun, 7 May 2023 19:45:42 +0000 (21:45 +0200)]
Do not use params to determine histogram sizes
Honza [Sun, 7 May 2023 19:44:46 +0000 (21:44 +0200)]
Do not use params for determining histogram sizes
Honza [Sun, 7 May 2023 19:44:07 +0000 (21:44 +0200)]
Fix reading of histograms.
Honza [Sun, 7 May 2023 19:42:59 +0000 (21:42 +0200)]
Fix bug in identifying number of exits of the loop.
Honza [Sun, 7 May 2023 15:58:54 +0000 (17:58 +0200)]
Better -fopt-info
kubaneko [Tue, 2 May 2023 20:03:19 +0000 (20:03 +0000)]
constrained the parameters
kubaneko [Tue, 2 May 2023 18:24:16 +0000 (18:24 +0000)]
divided histogram_counters.hist into two .exp and .lin, changed histogram maintaining so exp does not try to recover lin and added some cleanup to histogram versioning
Honza [Mon, 1 May 2023 22:39:34 +0000 (00:39 +0200)]
Clear profile in vectorizer.
Honza [Mon, 1 May 2023 22:18:57 +0000 (00:18 +0200)]
Fix use of estimates.
Honza [Mon, 1 May 2023 22:13:52 +0000 (00:13 +0200)]
Use histogram in loop vectorizer heuristics
Honza [Mon, 1 May 2023 21:50:31 +0000 (23:50 +0200)]
Do not instrument loops with known number of iterations and with no instrumentable exits.
Honza [Mon, 1 May 2023 19:52:20 +0000 (21:52 +0200)]
Add histogram based loop versioning.
kubaneko [Tue, 25 Apr 2023 08:09:35 +0000 (08:09 +0000)]
added modulo histogram and improved garbage collection
kubaneko [Mon, 24 Apr 2023 07:54:30 +0000 (07:54 +0000)]
changed from total size to exponential size
Honza [Sat, 22 Apr 2023 10:49:51 +0000 (12:49 +0200)]
Add -fuse-histogram-in-peeling
Honza [Sat, 22 Apr 2023 09:28:41 +0000 (11:28 +0200)]
Merge final fix for copy header from master
Honza [Sat, 22 Apr 2023 09:05:01 +0000 (11:05 +0200)]
Improve optimization info on peeling.
kubaneko [Fri, 21 Apr 2023 15:34:54 +0000 (15:34 +0000)]
hubicka bug fix
kubaneko [Thu, 20 Apr 2023 14:48:35 +0000 (14:48 +0000)]
aggresive histogram
kubaneko [Tue, 18 Apr 2023 15:36:45 +0000 (15:36 +0000)]
division bugfix
kubaneko [Sat, 15 Apr 2023 20:32:57 +0000 (20:32 +0000)]
bug fix
kubaneko [Sat, 15 Apr 2023 15:32:31 +0000 (15:32 +0000)]
gnu formating
kubaneko [Fri, 14 Apr 2023 14:46:41 +0000 (14:46 +0000)]
fixed warnings
kubaneko [Thu, 13 Apr 2023 16:56:13 +0000 (16:56 +0000)]
remove histograms when the sum is 0
kubaneko [Thu, 13 Apr 2023 15:31:32 +0000 (15:31 +0000)]
fixed some bugs
kubaneko [Sat, 8 Apr 2023 11:32:48 +0000 (11:32 +0000)]
peeling bug, copy header, precision adjusting
kubaneko [Sat, 8 Apr 2023 08:08:13 +0000 (08:08 +0000)]
memory management of peeling
kubaneko [Fri, 7 Apr 2023 21:45:09 +0000 (21:45 +0000)]
fixed peeling bug
kubaneko [Fri, 7 Apr 2023 19:34:43 +0000 (19:34 +0000)]
repaired copy header for histograms
kubaneko [Fri, 7 Apr 2023 18:04:30 +0000 (18:04 +0000)]
extracted adjust_loop_estimates_minus
kubaneko [Fri, 7 Apr 2023 10:20:08 +0000 (10:20 +0000)]
fixed a bug
kubaneko [Fri, 7 Apr 2023 08:26:52 +0000 (08:26 +0000)]
added adjusted flag
kubaneko [Wed, 5 Apr 2023 15:50:26 +0000 (15:50 +0000)]
fixed bug
kubaneko [Wed, 5 Apr 2023 15:42:12 +0000 (15:42 +0000)]
worst case adjusted
kubaneko [Wed, 5 Apr 2023 14:50:16 +0000 (14:50 +0000)]
renaming and comments
kubaneko [Wed, 5 Apr 2023 14:44:52 +0000 (14:44 +0000)]
fixed bugs
kubaneko [Mon, 3 Apr 2023 13:42:46 +0000 (13:42 +0000)]
fixed bug
kubaneko [Sun, 2 Apr 2023 15:03:07 +0000 (15:03 +0000)]
change of peeled probabilities
kubaneko [Wed, 29 Mar 2023 13:40:21 +0000 (13:40 +0000)]
peeling improvements
kubaneko [Wed, 29 Mar 2023 12:30:20 +0000 (12:30 +0000)]
fixed histogram loading
kubaneko [Tue, 28 Mar 2023 18:18:51 +0000 (18:18 +0000)]
better peeling prototype
kubaneko [Mon, 27 Mar 2023 15:59:53 +0000 (15:59 +0000)]
changed where iterations between linear portion and the next pow2 go
kubaneko [Wed, 15 Mar 2023 21:09:45 +0000 (21:09 +0000)]
fixed byg
kubaneko [Wed, 15 Mar 2023 08:16:04 +0000 (08:16 +0000)]
some minor divise fixes
kubaneko [Wed, 15 Mar 2023 00:21:44 +0000 (00:21 +0000)]
fixed up fix-up functions
kubaneko [Tue, 14 Mar 2023 17:23:00 +0000 (17:23 +0000)]
added param range
kubaneko [Mon, 13 Mar 2023 21:31:03 +0000 (21:31 +0000)]
some refactoring and added lto-streaming for histograms
kubaneko [Tue, 7 Mar 2023 20:09:11 +0000 (20:09 +0000)]
maintaining histogram prototype
kubaneko [Wed, 1 Mar 2023 20:30:09 +0000 (20:30 +0000)]
fixed error and improved peeling
kubaneko [Mon, 27 Feb 2023 15:18:25 +0000 (15:18 +0000)]
change typo
kubaneko [Sun, 26 Feb 2023 19:17:42 +0000 (19:17 +0000)]
Added histogram params to libgcov
kubaneko [Thu, 23 Feb 2023 17:04:31 +0000 (17:04 +0000)]
added primitive peeling and stuff
kubaneko [Wed, 22 Feb 2023 13:28:25 +0000 (13:28 +0000)]
removed hist_size
kubaneko [Wed, 22 Feb 2023 10:19:34 +0000 (10:19 +0000)]
corrected shift
kubaneko [Sat, 14 Jan 2023 22:04:29 +0000 (22:04 +0000)]
fixed vector allocation
kubaneko [Sun, 8 Jan 2023 18:59:31 +0000 (18:59 +0000)]
changed vector from gc to heap
kubaneko [Mon, 2 Jan 2023 14:54:29 +0000 (14:54 +0000)]
vector for histogram_counters not working yet
kubaneko [Sat, 31 Dec 2022 21:31:38 +0000 (21:31 +0000)]
started with conversion to parametric histograms
kubaneko [Tue, 22 Nov 2022 16:33:13 +0000 (16:33 +0000)]
new create_iv
kubaneko [Tue, 22 Nov 2022 16:32:49 +0000 (16:32 +0000)]
redo stuff
kubaneko [Tue, 22 Nov 2022 13:12:55 +0000 (13:12 +0000)]
fixed memory allocation for histogram_counters
kubaneko [Tue, 8 Nov 2022 15:27:20 +0000 (15:27 +0000)]
added histogram_counters structure
kubaneko [Tue, 1 Nov 2022 19:36:38 +0000 (19:36 +0000)]
temporary log fix
kubaneko [Tue, 1 Nov 2022 17:48:30 +0000 (17:48 +0000)]
messed with logarithms
kubaneko [Tue, 1 Nov 2022 14:46:59 +0000 (14:46 +0000)]
added atomic counter
kubaneko [Sun, 23 Oct 2022 21:54:39 +0000 (21:54 +0000)]
removed wild fprint removed redundant struct fields
kubaneko [Tue, 11 Oct 2022 16:42:27 +0000 (16:42 +0000)]
one histogram per loop, commit edges after deleting fake ones
kubaneko [Tue, 27 Sep 2022 12:47:59 +0000 (12:47 +0000)]
add loop_optimizer_init
kubaneko [Mon, 26 Sep 2022 21:51:35 +0000 (21:51 +0000)]
fixed loading found another bug
kubaneko [Thu, 22 Sep 2022 19:05:13 +0000 (19:05 +0000)]
squashed 2 commits
fixed function calls and tried to load histogram
tried to add loading and failed
kubaneko [Sun, 18 Sep 2022 16:23:28 +0000 (16:23 +0000)]
fixed what I broke
Ondrej Kubanek [Sat, 20 Aug 2022 21:37:39 +0000 (23:37 +0200)]
adding histogram for empty bbs
Ondrej Kubanek [Sat, 20 Aug 2022 20:21:31 +0000 (22:21 +0200)]
Revert "Revert "tried fix create_iv and failed""
This reverts commit
da5b7fc0fdf0227aa8347ffab1568198ccc58c43 .
Ondrej Kubanek [Sat, 20 Aug 2022 20:21:00 +0000 (22:21 +0200)]
deleted an assert to to test the if preheaders are needed in this case
Ondrej Kubanek [Sat, 20 Aug 2022 20:19:09 +0000 (22:19 +0200)]
Revert "tried fix create_iv and failed"
This reverts commit
082a5ebc956de41baf9d45ed609542ddd520df2d .
Ondrej Kubanek [Sat, 20 Aug 2022 20:14:46 +0000 (22:14 +0200)]
tried fix create_iv and failed
Ondrej Kubanek [Thu, 18 Aug 2022 21:44:08 +0000 (23:44 +0200)]
added myself to maintainers
Ondrej Kubanek [Thu, 18 Aug 2022 21:39:58 +0000 (23:39 +0200)]
Revert "test commit added myself to MAINTAINERS"
This reverts commit
79707034dca6941cf2b625f45ba0a08d3cd6753d .
Ondrej Kubanek [Wed, 27 Jul 2022 12:02:24 +0000 (14:02 +0200)]
fixed logarithm
Ondrej Kubanek [Wed, 27 Jul 2022 12:00:47 +0000 (14:00 +0200)]
loop counter prototype
Ondrej Kubanek [Wed, 13 Jul 2022 12:52:42 +0000 (14:52 +0200)]
test commit added myself to MAINTAINERS
Ondrej Kubanek [Tue, 12 Jul 2022 13:22:29 +0000 (15:22 +0200)]
added histogram profiler and added it to division
Jakub Jelinek [Thu, 23 Feb 2023 16:17:05 +0000 (17:17 +0100)]
testsuite: Fix up modules.exp [PR108899]
On Wed, Feb 22, 2023 at 02:33:42PM -0300, Alexandre Oliva via Gcc-patches wrote:
> When a multi-source module is found to be unsupported, we fail
> module_cmi_p and subsequent sources. Override proc unsupported to
> mark the result in module_do, and test it to skip module_cmp_p and
> subsequent related tests.
>
> for gcc/testsuite/ChangeLog
>
> * g++.dg/modules/modules.exp: Override unsupported to update
> module_do, and test it after dg-test.
This patch breaks testing with more than one set of options in
target board, like
make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp'
yields:
...
=== g++ Summary for unix/-m32 ===
# of expected passes 7217
# of unexpected failures 1
# of expected failures 18
# of unsupported tests 2
Running target unix/-m64
...
ERROR: tcl error sourcing /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp.
ERROR: tcl error code TCL OPERATION RENAME TARGET_EXISTS
ERROR: can't rename to "saved-unsupported": command already exists
while executing
"rename unsupported saved-unsupported"
(file "/home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp" line 322)
invoked from within
"source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp"
invoked from within
"catch "uplevel #0 source $test_file_name" msg"
In other spots where we in *.exp files rename some routine, we guard that
and the following patch does that for modules.exp too.
Tested with running
make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp'
again which now works properly again.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108899
* g++.dg/modules/modules.exp: Only override unsupported if it
exists and saved-unsupported doesn't.
Richard Biener [Thu, 23 Feb 2023 13:09:04 +0000 (14:09 +0100)]
Fix memory leak in PTA
When handle_lhs_call calls .create on the passed in vector it leaks
any previous allocated storage. Avoid doing that and instead rely
on the caller for memory management, just truncate the vector.
* tree-ssa-structalias.cc (handle_lhs_call): Do not
re-create rhsc, only truncate it.
Jakub Jelinek [Thu, 23 Feb 2023 14:27:31 +0000 (15:27 +0100)]
c++: Fix up -fcontracts option description [PR108890]
This translation PR mentioned the description is a little bit weird.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR translation/108890
* c.opt (fcontracts): Fix description.
Jakub Jelinek [Thu, 23 Feb 2023 14:24:43 +0000 (15:24 +0100)]
ipa-prop: Fix another case of missing BUILT_IN_UNREACHABLE_TRAP handling [PR106258]
There is another spot that handles in IPA just BUILT_IN_UNREACHABLE and
not BUILT_IN_UNREACHABLE_TRAP.
This patch fixes that.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/106258
* ipa-prop.cc (try_make_edge_direct_virtual_call): Handle
BUILT_IN_UNREACHABLE_TRAP like BUILT_IN_UNREACHABLE.
Matthias Kretz [Tue, 21 Feb 2023 09:43:13 +0000 (10:43 +0100)]
libstdc++: Test that integral simd reductions are precise
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* testsuite/experimental/simd/tests/reductions.cc: Introduce
max_distance as the type-dependent max error.
Matthias Kretz [Tue, 21 Feb 2023 09:31:55 +0000 (10:31 +0100)]
libstdc++: Fix -Wsign-compare issue
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* include/experimental/bits/simd_builtin.h (_S_set): Compare as
int. The actual range of these indexes is very small.
Matthias Kretz [Mon, 20 Feb 2023 16:35:59 +0000 (17:35 +0100)]
libstdc++: Add missing constexpr on simd shift implementation
Resolves -Wtautological-compare warnings about `if
(__builtin_is_constant_evaluated())` in the implementations of these
functions.
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* include/experimental/bits/simd_x86.h (_S_bit_shift_left)
(_S_bit_shift_right): Declare constexpr. The implementation was
already expecting constexpr evaluation.
Matthias Kretz [Mon, 20 Feb 2023 10:13:44 +0000 (11:13 +0100)]
libstdc++: Fix simd build failure on clang
Clang does not support __attribute__ on lambdas. Therefore, only set
_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA if __clang__ is not defined.
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
PR libstdc++/108030
* include/experimental/bits/simd_detail.h
(_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA): Define as empty for
__clang__.
Matthias Kretz [Sat, 14 Jan 2023 22:32:38 +0000 (23:32 +0100)]
libstdc++: Simplify three helper functions into one
Broadcast is a very common function. This should reduce compile-time
effort.
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
PR libstdc++/108030
* include/experimental/bits/simd.h (__vector_broadcast):
Implement via __vector_broadcast_impl instead of
__call_with_n_evaluations + 2 lambdas.
(__vector_broadcast_impl): New.
Richard Biener [Thu, 23 Feb 2023 10:05:47 +0000 (11:05 +0100)]
Fix memory leak in if-conversion
The following fixes if-conversion failing to release data-references
and the data-reference vector.
* tree-if-conv.cc (tree_if_conversion): Properly manage
memory of refs and the contained data references.
Richard Biener [Thu, 23 Feb 2023 10:03:03 +0000 (11:03 +0100)]
tree-optimization/108888 - call if-conversion
The following makes sure to only predicate calls necessary.
PR tree-optimization/108888
* tree-if-conv.cc (if_convertible_stmt_p): Set PLF_2 on
calls to predicate.
(predicate_statements): Only predicate calls with PLF_2.
* g++.dg/torture/pr108888.C: New testcase.
Takayuki 'January June' Suwa [Thu, 23 Feb 2023 03:42:32 +0000 (12:42 +0900)]
xtensa: Fix missing mode warnings in machine description
gcc/ChangeLog:
* config/xtensa/xtensa.md
(zero_cost_loop_start, zero_cost_loop_end, loop_end):
Add missing "SI:" to PLUS RTXes.
Max Filippov [Thu, 23 Feb 2023 06:08:21 +0000 (22:08 -0800)]
xtensa: fix PR target/108876
In commit
b2ef02e8cbbaf95fee98be255f697f47193960ec , the sibling call
insn included (use (reg:SI A0_REG)) to fix the problem, which added
a USE chain unconditionally to the data flow of register A0 during
the sibling call.
As a result, df_regs_ever_live_p (A0_REG) returns true, so even if
register A0 is not used outside of the sibling call insn, saves and
restores to stack slots are emitted in pro/epilogue, and finally
code size increases.
(This is why I never included (use A0) in sibling calls)
/* example */
extern int foo(int);
int test(int a) {
return foo(a * 3 + 1);
}
;; before
test:
addi sp, sp, -16 ;; unneeded stack frame allocation (induced)
s32i.n a0, sp, 12 ;; unneeded saving of register A0
l32i.n a0, sp, 12 ;; unneeded restoration of register A0
addx2 a2, a2, a2
addi.n a2, a2, 1
addi sp, sp, 16 ;; unneeded stack frame freeing (induced)
j.l foo, a9 ;; sibling call (truly needs register A0)
The essential cause is that we emit (use A0) *before* the insns that
does the stack pointer adjustment during epilogue expansion, so the
liveness of register A0 ends early, so register A0 is reused afterwards.
This patch fixes the problem and avoids such regression by doing the
emit of (use A0) in the sibling call epilogue expansion at the end.
;; after
test:
addx2 a2, a2, a2
addi.n a2, a2, 1
j.l foo, a9
>From RTL-pass "315r.rnreg" by
"gfortran -O3 -funroll-loops -mabi=call0 -S -da gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":
;; Function selector_init (__selectors_MOD_selector_init, funcdef_no=2, decl_uid=987, cgraph_uid=3, symbol_order=4)
...
(insn 3807 3806 3808 121 (set (reg:SI 15 a15)
(mem/c:SI (plus:SI (reg/f:SI 1 sp)
(const_int 268 [0x10c])) [31 S4 A32])) "gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":35:30 53 {movsi_internal}
(nil))
(insn 3808 3807 3809 121 (set (reg:SI 7 a7)
(const_int 288 [0x120])) "gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":35:30 53 {movsi_internal}
(nil))
(insn 3809 3808 3810 121 (set (reg/f:SI 1 sp)
(plus:SI (reg/f:SI 1 sp)
(reg:SI 7 a7))) "gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":35:30 1 {addsi3}
(expr_list:REG_DEAD (reg:SI 9 a9)
(nil)))
(insn 3810 3809 721 121 (use (reg:SI 0 a0)) "gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":35:30 -1
(expr_list:REG_DEAD (reg:SI 0 a0)
(nil)))
(call_insn/j 721 3810 722 121 (call (mem:SI (symbol_ref:SI ("free") [flags 0x41] <function_decl 0x7f7c885f6000 __builtin_free>) [0 __builtin_free S4 A32])
(const_int 0 [0])) "gcc-gnu/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90":35:30 discrim 1 106 {sibcall_internal}
(expr_list:REG_DEAD (reg:SI 2 a2)
(expr_list:REG_CALL_DECL (symbol_ref:SI ("free") [flags 0x41] <function_decl 0x7f7c885f6000 __builtin_free>)
(expr_list:REG_EH_REGION (const_int 0 [0])
(nil))))
(expr_list:SI (use (reg:SI 2 a2))
(nil)))
(IMHO the "rnreg" pass doesn't take REG_ALLOC_ORDER into account;
it just seems to allocate registers in fixed_regs index order,
which may have hurt register A0 that became allocatable in the recent
patch)
gcc/ChangeLog:
PR target/108876
* config/xtensa/xtensa.cc (xtensa_expand_epilogue):
Emit (use (reg:SI A0_REG)) at the end in the sibling call
(i.e. the same place as (return) in the normal call).
Max Filippov [Thu, 23 Feb 2023 06:07:58 +0000 (22:07 -0800)]
Revert "gcc: xtensa: fix PR target/108876"
This reverts commit
b2ef02e8cbbaf95fee98be255f697f47193960ec .
Arsen Arsenović [Thu, 23 Feb 2023 01:06:49 +0000 (02:06 +0100)]
docs: Reorder @opindex before corresponding options
gcc/d/ChangeLog:
* gdc.texi: Reorder @opindex commands to precede @items they
relate to.
gcc/ChangeLog:
* doc/cppdiropts.texi: Reorder @opindex commands to precede
@items they relate to.
* doc/cppopts.texi: Ditto.
* doc/cppwarnopts.texi: Ditto.
* doc/invoke.texi: Ditto.
* doc/lto.texi: Ditto.
gcc/fortran/ChangeLog:
* invoke.texi: Reorder @opindex commands to precede @items they
relate to.