With flag_wrapv, -TYPE_MIN_VALUE = TYPE_MIN_VALUE which is
unrepresentable. We currently special case this in the ABS folding
routine, but are missing similar treatment in operator_abs::op1_range.
Tested on x86-64 Linux.
PR tree-optimization/101938
gcc/ChangeLog:
* range-op.cc (operator_abs::op1_range): Special case
-TYPE_MIN_VALUE for flag_wrapv.
gcc/testsuite/ChangeLog:
* gcc.dg/pr101938.c: New test.
This adds the testcase from the fix for the PR.
2021-08-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/101868
* gcc.dg/lto/pr101868_0.c: New testcase.
* gcc.dg/lto/pr101868_1.c: Likewise.
* gcc.dg/lto/pr101868_2.c: Likewise.
* gcc.dg/lto/pr101868_3.c: Likewise.
As Richi pointed out, currently for BB reductions we don't
actually build a SLP node with IFN_REDUC_* information,
ideally we may end up with that eventually.
For now, it's costed as shuffles and reduc operations, it
misses the cost of lane extraction. This patch is to add
one time of vec_to_scalar cost for lane extraction, it's to
make the costings consistent and conservative for now.
gcc/ChangeLog:
* tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Add the cost for
value extraction.
This patch implements the OpenMP 5.1 scope construct, which is similar
to worksharing constructs in many regards, but isn't one of them.
The body of the construct is encountered by all threads though, it can
be nested in itself or intermixed with taskgroup and worksharing etc.
constructs can appear inside of it (but it can't be nested in
worksharing etc. constructs). The main purpose of the construct
is to allow reductions (normal and task ones) without the need to
close the parallel and reopen another one.
If it doesn't have task reductions, it can be implemented without
any new library support, with nowait it just does the privatizations
at the start if any and reductions before the end of the body, with
without nowait emits a normal GOMP_barrier{,_cancel} at the end too.
For task reductions, we need to ensure only one thread initializes
the task reduction library data structures and other threads copy from that,
so a new GOMP_scope_start routine is added to the library for that.
It acts as if the start of the scope construct is a nowait worksharing
construct (that is ok, it can't be nested in other worksharing
constructs and all threads need to encounter the start in the same
order) which does the task reduction initialization, but as the body
can have other scope constructs and/or worksharing constructs, that is
all where we use this dummy worksharing construct. With task reductions,
the construct must not have nowait and ends with a GOMP_barrier{,_cancel},
followed by task reductions followed by GOMP_workshare_task_reduction_unregister.
Only C/C++ FE support is done.
2021-08-17 Jakub Jelinek <jakub@redhat.com>
gcc/
* tree.def (OMP_SCOPE): New tree code.
* tree.h (OMP_SCOPE_BODY, OMP_SCOPE_CLAUSES): Define.
* tree-nested.c (convert_nonlocal_reference_stmt,
convert_local_reference_stmt, convert_gimple_call): Handle
GIMPLE_OMP_SCOPE.
* tree-pretty-print.c (dump_generic_node): Handle OMP_SCOPE.
* gimple.def (GIMPLE_OMP_SCOPE): New gimple code.
* gimple.c (gimple_build_omp_scope): New function.
(gimple_copy): Handle GIMPLE_OMP_SCOPE.
* gimple.h (gimple_build_omp_scope): Declare.
(gimple_has_substatements): Handle GIMPLE_OMP_SCOPE.
(gimple_omp_scope_clauses, gimple_omp_scope_clauses_ptr,
gimple_omp_scope_set_clauses): New inline functions.
(CASE_GIMPLE_OMP): Add GIMPLE_OMP_SCOPE.
* gimple-pretty-print.c (dump_gimple_omp_scope): New function.
(pp_gimple_stmt_1): Handle GIMPLE_OMP_SCOPE.
* gimple-walk.c (walk_gimple_stmt): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* gimplify.c (is_gimple_stmt): Handle OMP_MASTER.
(gimplify_scan_omp_clauses): For task reductions, handle OMP_SCOPE
like ORT_WORKSHARE constructs. Adjust diagnostics for %<scope%>
allowing task reductions. Reject inscan reductions on scope.
(omp_find_stores_stmt): Handle GIMPLE_OMP_SCOPE.
(gimplify_omp_workshare, gimplify_expr): Handle OMP_SCOPE.
* tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_SCOPE.
(estimate_num_insns): Likewise.
* omp-low.c (build_outer_var_ref): Look through GIMPLE_OMP_SCOPE
contexts if var isn't privatized there.
(check_omp_nesting_restrictions): Handle GIMPLE_OMP_SCOPE.
(scan_omp_1_stmt): Likewise.
(maybe_add_implicit_barrier_cancel): Look through outer
scope constructs.
(lower_omp_scope): New function.
(lower_omp_task_reductions): Handle OMP_SCOPE.
(lower_omp_1): Handle GIMPLE_OMP_SCOPE.
(diagnose_sb_1, diagnose_sb_2): Likewise.
* omp-expand.c (expand_omp_single): Support also GIMPLE_OMP_SCOPE.
(expand_omp): Handle GIMPLE_OMP_SCOPE.
(omp_make_gimple_edges): Likewise.
* omp-builtins.def (BUILT_IN_GOMP_SCOPE_START): New built-in.
gcc/c-family/
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
* c-pragma.c (omp_pragmas): Add scope construct.
* c-omp.c (omp_directives): Uncomment scope directive entry.
gcc/c/
* c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
(c_parser_omp_scope): New function.
(c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
gcc/cp/
* parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
(cp_parser_omp_scope): New function.
(cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_SCOPE.
* pt.c (tsubst_expr): Handle OMP_SCOPE.
gcc/testsuite/
* c-c++-common/gomp/nesting-2.c (foo): Add scope and masked
construct tests.
* c-c++-common/gomp/scan-1.c (f3): Add scope construct test..
* c-c++-common/gomp/cancel-1.c (f2): Add scope and masked
construct tests.
* c-c++-common/gomp/reduction-task-2.c (bar): Add scope construct
test. Adjust diagnostics for the addition of scope.
* c-c++-common/gomp/loop-1.c (f5): Add master, masked and scope
construct tests.
* c-c++-common/gomp/clause-dups-1.c (f1): Add scope construct test.
* gcc.dg/gomp/nesting-1.c (f1, f2, f3): Add scope construct tests.
* c-c++-common/gomp/scope-1.c: New test.
* c-c++-common/gomp/scope-2.c: New test.
* g++.dg/gomp/attrs-1.C (bar): Add scope construct tests.
* g++.dg/gomp/attrs-2.C (bar): Likewise.
* gfortran.dg/gomp/reduction4.f90: Adjust expected diagnostics.
* gfortran.dg/gomp/reduction7.f90: Likewise.
libgomp/
* Makefile.am (libgomp_la_SOURCES): Add scope.c
* Makefile.in: Regenerated.
* libgomp_g.h (GOMP_scope_start): Declare.
* libgomp.map: Add GOMP_scope_start@@GOMP_5.1.
* scope.c: New file.
* testsuite/libgomp.c-c++-common/scope-1.c: New test.
* testsuite/libgomp.c-c++-common/task-reduction-16.c: New test.
The following patch implements C++20 # __VA_OPT__ (...) support.
Testcases cover what I came up with myself and what LLVM has for #__VA_OPT__
in its testsuite and the string literals are identical between the two
compilers on the va-opt-5.c testcase.
2021-08-17 Jakub Jelinek <jakub@redhat.com>
libcpp/
* macro.c (vaopt_state): Add m_stringify member.
(vaopt_state::vaopt_state): Initialize it.
(vaopt_state::update): Overwrite it.
(vaopt_state::stringify): New method.
(stringify_arg): Replace arg argument with first, count arguments
and add va_opt argument. Use first instead of arg->first and
count instead of arg->count, for va_opt add paste_tokens handling.
(paste_tokens): Fix up len calculation. Don't spell rhs twice,
instead use %.*s to supply lhs and rhs spelling lengths. Don't call
_cpp_backup_tokens here.
(paste_all_tokens): Call it here instead.
(replace_args): Adjust stringify_arg caller. For vaopt_state::END
if stringify is true handle __VA_OPT__ stringification.
(create_iso_definition): Handle # __VA_OPT__ similarly to # macro_arg.
gcc/testsuite/
* c-c++-common/cpp/va-opt-5.c: New test.
* c-c++-common/cpp/va-opt-6.c: New test.
This fixes value-numbering breaking reverse storage order accesses
due to a missed check. It adds a new overload for
reverse_storage_order_for_component_p and sets reversed on the
VN IL ops for component and array accesses accordingly.
It also compares the reversed reference ops flag on reference
lookup.
2021-08-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/101925
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Set
reverse on COMPONENT_REF and ARRAY_REF according to
what reverse_storage_order_for_component_p does.
(vn_reference_eq): Compare reversed on reference ops.
(reverse_storage_order_for_component_p): New overload.
(vn_reference_lookup_3): Check reverse_storage_order_for_component_p
on the reference looked up.
* gcc.dg/sso-16.c: New testcase.
Similar to the H8/300H patch, this improves SImode shifts for the H8/S.
It's not as big a win on the H8/S since we can shift two positions at a
time. But that also means that we can handle more residuals with minimal
ode growth after a special shift-by-16 or shift-by-24 sequence.
I think there's more to do here, but this seemed like as good a checkpoint
as any. Tested without regressions.
gcc/
* config/h8300/h8300.c (shift_alg_si): Avoid loops for most SImode
shifts on the H8/S.
(h8300_option_override): Use loops on H8/S more often when optimizing
for size.
(get_shift_alg): Handle new "special" cases on H8/S. Simplify
accordingly. Handle various arithmetic right shifts with special
sequences that we couldn't handle before.
This testcase is used to detect reuse of perm mask in the main loop,
in epilog, vpermi2b can still be used, so add the option
--param=vect-epilogues-nomask=0.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr82460-2.c: Adjust testcase by adding
--param=vect-epilogues-nomask=0
The expression ctx._M_indent is not a constant expression when ctx is a
reference parameter, even though _M_indent is an enumerator. Rename it
to _S_indent to be consistent with our conventions, and refer to it as
PrintContext::_S_indent to be valid C++ code (at least until P2280 is
accepted as a DR).
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
PR libstdc++/101937
* src/c++11/debug.cc (PrintContext::_M_indent): Replace with a
static data member.
(print_word): Use qualified-id to access it.
The additional libraries installed by --enable-libstdcxx-debug are built
without optimization to aid debugging, but the Python pretty printers
are not installed alongside them. This means that you can step through
the unoptimized library code, but at the expense of pretty printing the
library types.
This remedies the situation by installing another copy of the GDB hooks
alongside the debug version of libstdc++.so.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* python/Makefile.am [GLIBCXX_BUILD_DEBUG] (install-data-local):
Install another copy of the GDB hook.
* python/Makefile.in: Regenerate.
If -fprofile-update=atomic is used, then the target must provide atomic
operations for the counters of the type returned by get_gcov_type().
This is a 64-bit type for targets which have a 64-bit long long type.
On 32-bit targets this could be an issue since they may not provide
64-bit atomic operations. Allow targets to override the default type
size with the new TARGET_GCOV_TYPE_SIZE target hook.
If a 32-bit gcov type size is used, then there is currently a warning in
libgcov-driver.c in a dead code block due to
sizeof (counter) == sizeof (gcov_unsigned_t):
libgcc/libgcov-driver.c: In function 'dump_counter':
libgcc/libgcov-driver.c:401:46: warning: right shift count >= width of type [-Wshift-count-overflow]
401 | dump_unsigned ((gcov_unsigned_t)(counter >> 32), dump_fn, arg);
| ^~
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define
__LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
gcc/
* config/sparc/rtemself.h (SPARC_GCOV_TYPE_SIZE): Define.
* config/sparc/sparc.c (sparc_gcov_type_size): New.
(TARGET_GCOV_TYPE_SIZE): Redefine if SPARC_GCOV_TYPE_SIZE is defined.
* coverage.c (get_gcov_type): Use targetm.gcov_type_size().
* doc/tm.texi (TARGET_GCOV_TYPE_SIZE): Add hook under "Misc".
* doc/tm.texi.in: Regenerate.
* target.def (gcov_type_size): New target hook.
* targhooks.c (default_gcov_type_size): New.
* targhooks.h (default_gcov_type_size): Declare.
* tree-profile.c (gimple_gen_edge_profiler): Use precision of
gcov_type_node.
(gimple_gen_time_profiler): Likewise.
libgcc/
* libgcov.h (gcov_type): Define using __LIBGCC_GCOV_TYPE_SIZE.
(gcov_type_unsigned): Likewise.
add_scalar_info can directly generate a reference to an existing DIE for a
scalar attribute, e.g the upper bound of a VLA, but it does so only if this
existing DIE has a location or is a constant:
if (get_AT (decl_die, DW_AT_location)
|| get_AT (decl_die, DW_AT_data_member_location)
|| get_AT (decl_die, DW_AT_const_value))
Now, in DWARF 5, members of a structure that are bitfields no longer have a
DW_AT_data_member_location but a DW_AT_data_bit_offset attribute instead, so
the condition is bypassed.
gcc/
* dwarf2out.c (add_scalar_info): Deal with DW_AT_data_bit_offset.
PR tree-optimization/100393
gcc/ChangeLog:
* tree-switch-conversion.c (group_cluster::dump): Use
get_comparison_count.
(jump_table_cluster::find_jump_tables): Pre-compute number of
comparisons and then decrement it. Cache also max_ratio.
(jump_table_cluster::can_be_handled): Change signature.
* tree-switch-conversion.h (get_comparison_count): New.
Given the latest work in the compiler and debugger, we no longer need to use
most GNAT-specific encodings in the debug info generated for an Ada program,
so the attached patch disables them, except with -fgnat-encodings=all.
gcc/
* dwarf2out.c (add_data_member_location_attribute): Use GNAT
encodings only when -fgnat-encodings=all is specified.
(add_bound_info): Likewise.
(add_byte_size_attribute): Likewise.
(gen_member_die): Likewise.
... and further simplify related things a bit.
Fix-up/clean-up for recent commit e2a58ed6dc
"openacc: Middle-end worker-partitioning support".
gcc/
* omp-oacc-neuter-broadcast.cc (field_map): Move variable into...
(execute_omp_oacc_neuter_broadcast): ... here.
(install_var_field, build_receiver_ref, build_sender_ref): Take
'field_map_t *' parameter. Adjust all users.
(worker_single_copy, neuter_worker_single): Take a
'record_field_map_t *' parameter. Adjust all users.
PR ipa/100600
gcc/ChangeLog:
* ipa-icf-gimple.c (func_checker::compare_ssa_name): Do not
consider equal SSA_NAMEs when one is a param.
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/pr100600.c: New test.
--with-multilib-generator was only support for different ISA/ABI
combination, however code model is effect the code gen a lots it
should able to handled in multilib mechanism.
Adding `--cmodel=` option to `--with-multilib-generator` to generating
multilib combination with different code model.
E.g.
--with-multilib-generator="rv64ima-lp64--;--cmodel=medlow,medany"
will generate 3 multi-lib suppport:
1) rv64ima with lp64
2) rv64ima with lp64 and medlow code model
3) rv64ima with lp64 and medany code model
gcc/
* config/riscv/multilib-generator: Support code model option for
multi-lib.
* doc/install.texi: Add document of new option for
--with-multilib-generator.
gcc/fortran/ChangeLog:
PR fortran/99351
* match.c (sync_statement): Replace %v code by %e in gfc_match to
allow for function references as STAT and ERRMSG arguments.
* resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
being definable arguments. Function references with a data
pointer result are accepted.
* trans-stmt.c (gfc_trans_sync): Adjust assertion.
gcc/testsuite/ChangeLog:
PR fortran/99351
* gfortran.dg/coarray_sync.f90: New test.
* gfortran.dg/coarray_3.f90: Adjust error messages.
64bit XCOFF files will generated TLS access, with local-exec or
global-exec models, by an access to R13. Thus, there isn't
any reference to a TLS symbol.
The problem is that it allows programs with TLS to be compiled and
linked even without -pthread. Most of the time, it will result in
a segfault when trying to access a TLS variable. But sometimes, it
might create a memory corruption.
This patch forces a reference to __tls_get_addr() to ensure link
will fail without -pthread.
gcc/ChangeLog:
2021-08-11 Clément Chigot <clement.chigot@atos.net>
* config/rs6000/rs6000.c (xcoff_tls_exec_model_detected): New.
(rs6000_legitimize_tls_address_aix): Use it.
(rs6000_xcoff_file_end): Add ".ref __tls_get_addr" when
xcoff_tls_exec_model_detected is true.
As I've mentioned before, the H8/300H can only shift a single bit position at a time. Naturally this means many shifts are implemented as loops. There's a variety of special cases that we can do without loops by using rotates, sub-word moves, etc. The general guidance for the port has been to only use inline or special sequences if they're shorter or just one instruction longer than the loop.
This was pretty reasonable guidance for QI/HI mode. It was relaxed a bit about 10 years ago for HImode in particular where the kpit team realized they could save 50-100 cycles for some shifts by allowing 2 instructions of code growth over the loop implementation.
But they only re-tuned HImode shifts. There's even bigger benefits for re-tuning SImode shifts. There's cases where we can save close to 200 cycles by allowing 2 additional instructions.
This patch re-tunes SImode shifts on the H8/300H primarily by inlining more often or using a special sequence + inlining for residuals. Both cases were already supported and this just uses those existing capabilities more often, so it was trivial to implement. I think there's some cases were entirely new special sequences could be used, but I haven't tried those yet.
gcc/
* config/h8300/h8300.c (shift_alg_si): Retune H8/300H shifts
to allow a bit more code growth, saving many dozens of cycles.
(h8300_option_override): Adjus shift_alg_si if optimizing for
code size.
(get_shift_alg): Use special + inline shifts for residuals
in more cases.
When linking gcc runtime objects into large binaries the link may fail
with the below errors. This will happen even if we are building with
-mcmodel=large.
/home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `deregister_tm_clones':
crtstuff.c:(.text+0x3c): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_deregisterTMCloneTable'
/home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `register_tm_clones':
crtstuff.c:(.text+0xc0): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_registerTMCloneTable'
This patch builds the gcc crtstuff binaries always with the
-mcmodel=large option to ensure they can be linked into large binaries.
libgcc/ChangeLog:
PR target/99783
* config.host (or1k-*, tmake_file): Add or1k/t-crtstuff.
* config/or1k/t-crtstuff: New file.
When building libgeos we get an error with:
linux-uclibc/9.3.0/crtbeginS.o: in function `__do_global_dtors_aux':
crtstuff.c:(.text+0x118): relocation truncated to fit: R_OR1K_GOT16 against symbol `__cxa_finalize' defined in .text section in
/home/shorne/work/openrisc/3eb9f9d0f6d8274b2d19753c006bd83f7d536e3c/output/host/or1k-buildroot-linux-uclibc/sysroot/lib/libc.so.
This is caused by GOT code having a limit of 64k. In OpenRISC this
looks to be the only relocation code pattern to be limited to 64k.
This patch allows specifying a new option -mcmodel=large which can be
used to generate 2 more instructions to construct 32-bit addresses for
up to 4G GOTs.
gcc/ChangeLog:
PR target/99783
* config/or1k/or1k-opts.h: New file.
* config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc):
Support generating gotha relocations if -mcmodel=large is
specified.
* config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE):
New macros.
* config/or1k/or1k.opt (mcmodel=): New option.
* doc/invoke.texi (OpenRISC Options): Document mcmodel.
Resolves:
PR middle-end/101791 - missing warning on a mismatch between scalar and array forms of new and delete
gcc/ChangeLog:
PR middle-end/101791
* gimple-ssa-warn-access.cc (new_delete_mismatch_p): Use new argument
to valid_new_delete_pair_p.
* tree.c (valid_new_delete_pair_p): Add argument.
* tree.h (valid_new_delete_pair_p): Same.
gcc/testsuite/ChangeLog:
PR middle-end/101791
* g++.dg/warn/Wmismatched-new-delete-6.C: New test.
* g++.dg/warn/Wmismatched-new-delete-7.C: New test.
The testcase shows another problem, for TARGET_AVX512BW we have a single insn
doing broadcast from the first element, but don't have one for broadcast
of 2nd+ element (so for d->perm[0] we must return false), but for
TARGET_AVX512F && !TARGET_AVX512BW we don't even have support for that other
broadcast. V64QImode case was just added to the AVX2 cases which had
gcc_assert (!TARGET_AVX2 || d->perm[0]);
but for V64QImode we actually need
gcc_assert (!TARGET_AVX512BW || d->perm[0]);
2021-08-14 Jakub Jelinek <jakub@redhat.com>
PR target/101896
* config/i386/i386-expand.c (expand_vec_perm_broadcast_1)
<case E_V64QImode>: For this mode assert
!TARGET_AVX512BW || d->perm[0] rather than !TARGET_AVX2 || d->perm[0].
* gcc.target/i386/avx512f-pr101896.c: New test.
I noticed that the xxeval built-in function used the altivec_register_operand
predicate. Since it takes vsx registers, this might force the register
allocate to issue a move when it could use a traditional floating point
register. This patch fixes that.
2021-08-13 Michael Meissner <meissner@linux.ibm.com>
gcc/
PR target/99921
* config/rs6000/altivec.md (xxeval): Use register_predicate
instead of altivec_register_predicate.
... for 'gcc/gimplify.c:gimplify_scan_omp_clauses' changes in recent
commit d0befed793 "openmp: Add support
for OpenMP 5.1 masked construct".
libgomp/
* testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Adjust.
PR ipa/101261
gcc/ChangeLog:
* symtab.c (symtab_node::noninterposable_alias): Do not create
local aliases for target_clone functions as the clonning pass
rejects aliases.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr101261.c: New test.
this patch add EAF_NOREAD (as disucssed on IRC already) and fixes meaning
of EAF_UNUSED to be really unused and not "does not escape, is not clobbered,
read or returned" since we have separate flags for each of the properties
now.
Since number of flags has grown I refactored the code a bit to avoid
repeated uses of complex flag combinations and also simplified the logic of
merging.
Merging is bit tricky since we have flags that implies other flags
(like NOESCAPE implies NODIRECTESCAPE) but code that sets only NOESCAPE.
Perhaps it would make sense to update fnspecs to always set flag along with
all the implications, but for now I am handlingit in merge.
I made only trivial update to tree-ssa-structalias to handle EAF_NORETURN in
normal function handling, but not in pure functions. The problem is that the
way constraints are generated for pure functions makes this difficult.
I think logical step is to track whether function reads/stores global memory
and rewrite the constraint generation so we can handle normal, pure and const
in unified manner.
Bootstrapped/regtested x86_64-linux, plan to commit it after furhter testing.
The patch improves alias oracle stats for cc1plus somewhat.
From:
Alias oracle query stats:
refs_may_alias_p: 72380497 disambiguations, 82649832 queries
ref_maybe_used_by_call_p: 495184 disambiguations, 73366950 queries
call_may_clobber_ref_p: 259312 disambiguations, 263253 queries
nonoverlapping_component_refs_p: 0 disambiguations, 38006 queries
nonoverlapping_refs_since_match_p: 21157 disambiguations, 65698 must overlaps, 87756 queries
aliasing_component_refs_p: 63141 disambiguations, 2164695 queries
TBAA oracle: 25975753 disambiguations 61449632 queries
12138220 are in alias set 0
11316663 queries asked about the same object
144 queries asked about the same alias set
0 access volatile
10472885 are dependent in the DAG
1545967 are aritificially in conflict with void *
Modref stats:
modref use: 23857 disambiguations, 754515 queries
modref clobber: 1392162 disambiguations, 17753512 queries
3450241 tbaa queries (0.194341 per modref query)
534816 base compares (0.030125 per modref query)
PTA query stats:
pt_solution_includes: 12394915 disambiguations, 20235925 queries
pt_solutions_intersect: 1365299 disambiguations, 14638068 queries
To:
Alias oracle query stats:
refs_may_alias_p: 72629640 disambiguations, 82903333 queries
ref_maybe_used_by_call_p: 502474 disambiguations, 73612186 queries
call_may_clobber_ref_p: 261806 disambiguations, 265659 queries
nonoverlapping_component_refs_p: 0 disambiguations, 38007 queries
nonoverlapping_refs_since_match_p: 21139 disambiguations, 65772 must overlaps, 87816 queries
aliasing_component_refs_p: 63144 disambiguations, 2164330 queries
TBAA oracle: 26059018 disambiguations 61571714 queries
12158033 are in alias set 0
11326115 queries asked about the same object
144 queries asked about the same alias set
0 access volatile
10484493 are dependent in the DAG
1543911 are aritificially in conflict with void *
Modref stats:
modref use: 24008 disambiguations, 712712 queries
modref clobber: 1395917 disambiguations, 17163694 queries
3465657 tbaa queries (0.201918 per modref query)
537591 base compares (0.031321 per modref query)
PTA query stats:
pt_solution_includes: 12468934 disambiguations, 20295402 queries
pt_solutions_intersect: 1391917 disambiguations, 14665265 queries
I think it is mostly due to better heandling of EAF_NODIRECTESCAPE.
Honza
gcc/ChangeLog:
2021-08-12 Jan Hubicka <hubicka@ucw.cz>
* ipa-modref.c (dump_eaf_flags): Dump EAF_NOREAD.
(implicit_const_eaf_flags, implicit_pure_eaf_flags,
ignore_stores_eaf_flags): New constants.
(remove_useless_eaf_flags): New function.
(eaf_flags_useful_p): Use it.
(deref_flags): Add EAF_NOT_RETURNED if flag is unused;
handle EAF_NOREAD.
(modref_lattice::init): Add EAF_NOREAD.
(modref_lattice::add_escape_point): Do not reacord escape point if
result is unused.
(modref_lattice::merge): EAF_NOESCAPE implies EAF_NODIRECTESCAPE;
use remove_useless_eaf_flags.
(modref_lattice::merge_deref): Use ignore_stores_eaf_flags.
(modref_lattice::merge_direct_load): Add EAF_NOREAD
(analyze_ssa_name_flags): Fix handling EAF_NOT_RETURNED
(analyze_parms): Use remove_useless_eaf_flags.
(ipa_merge_modref_summary_after_inlining): Use ignore_stores_eaf_flags.
(modref_merge_call_site_flags): Add caller and ecf_flags parameter;
use remove_useless_eaf_flags.
(modref_propagate_flags_in_scc): Update.
* ipa-modref.h: Turn eaf_flags_t back to char.
* tree-core.h (EAF_NOT_RETURNED): Fix.
(EAF_NOREAD): New constant
* tree-ssa-alias.c: (ref_maybe_used_by_call_p_1): Check for
EAF_NOREAD.
* tree-ssa-structalias.c (handle_rhs_call): Handle new flags.
(handle_pure_call): Likewise.
gcc/testsuite/ChangeLog:
2021-08-12 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/tree-ssa/modref-6.c: Update.