Go to file
Kewen Lin 2d9588bac5 predcom: Refactor more using auto_vec
This patch follows Martin's suggestion at the link[1] to do more
refactorings by:
  - Adding m_ prefix for class pcom_worker member variables.
  - Using auto_vec instead of vec among class pcom_worker,
    chain, component and comp_ptrs.

The changes in tree-data-ref.[ch] is required, without it the
destruction of auto_vec instance could try to double free the
memory pointed by m_vec.

Bootstrapped and regtested on powerpc64le-linux-gnu P9,
x86_64-redhat-linux and aarch64-linux-gnu, also
bootstrapped on ppc64le P9 with bootstrap-O3 config.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573424.html

gcc/ChangeLog:

	* tree-data-ref.c (free_dependence_relations): Adjust to pass vec
	by reference.
	(free_data_refs): Likewise.
	* tree-data-ref.h (free_dependence_relations): Likewise.
	(free_data_refs): Likewise.
	* tree-predcom.c (struct chain): Use auto_vec instead of vec for
	members.
	(struct component): Likewise.
	(pcom_worker::pcom_worker): Adjust for auto_vec and renaming changes.
	(pcom_worker::~pcom_worker): Likewise.
	(pcom_worker::release_chain): Adjust as auto_vec changes.
	(pcom_worker::loop): Rename to ...
	(pcom_worker::m_loop): ... this.
	(pcom_worker::datarefs): Rename to ...
	(pcom_worker::m_datarefs): ... this.  Use auto_vec instead of vec.
	(pcom_worker::dependences): Rename to ...
	(pcom_worker::m_dependences): ... this.  Use auto_vec instead of vec.
	(pcom_worker::chains): Rename to ...
	(pcom_worker::m_chains): ... this.  Use auto_vec instead of vec.
	(pcom_worker::looparound_phis): Rename to ...
	(pcom_worker::m_looparound_phis): ... this.  Use auto_vec instead of
	vec.
	(pcom_worker::cache): Rename to ...
	(pcom_worker::m_cache): ... this.  Use auto_vec instead of vec.
	(pcom_worker::release_chain): Adjust for auto_vec changes.
	(pcom_worker::release_chains): Adjust for auto_vec and renaming
	changes.
	(release_component): Remove.
	(release_components): Adjust for release_component removal.
	(component_of): Adjust to use vec.
	(merge_comps): Likewise.
	(pcom_worker::aff_combination_dr_offset): Adjust for renaming changes.
	(pcom_worker::determine_offset): Likewise.
	(class comp_ptrs): Remove.
	(pcom_worker::split_data_refs_to_components): Adjust for renaming
	changes, for comp_ptrs removal with auto_vec.
	(pcom_worker::suitable_component_p): Adjust for renaming changes.
	(pcom_worker::filter_suitable_components): Adjust for release_component
	removal.
	(pcom_worker::valid_initializer_p): Adjust for renaming changes.
	(pcom_worker::find_looparound_phi): Likewise.
	(pcom_worker::add_looparound_copies): Likewise.
	(pcom_worker::determine_roots_comp): Likewise.
	(pcom_worker::single_nonlooparound_use): Likewise.
	(pcom_worker::execute_pred_commoning_chain): Likewise.
	(pcom_worker::execute_pred_commoning): Likewise.
	(pcom_worker::try_combine_chains): Likewise.
	(pcom_worker::prepare_initializers_chain): Likewise.
	(pcom_worker::prepare_initializers): Likewise.
	(pcom_worker::prepare_finalizers_chain): Likewise.
	(pcom_worker::prepare_finalizers): Likewise.
	(pcom_worker::tree_predictive_commoning_loop): Likewise.
2021-07-21 00:22:56 -05:00
c++tools
config
contrib Daily bump. 2021-07-21 00:16:54 +00:00
fixincludes
gcc predcom: Refactor more using auto_vec 2021-07-21 00:22:56 -05:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp
libdecnumber
libffi
libgcc Daily bump. 2021-07-16 00:16:25 +00:00
libgfortran
libgo runtime: remove direct assignments to memory locations 2021-07-09 19:48:53 -07:00
libgomp Daily bump. 2021-07-21 00:16:54 +00:00
libiberty
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer Daily bump. 2021-07-21 00:16:54 +00:00
libssp
libstdc++-v3 Daily bump. 2021-07-21 00:16:54 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el dir-locals: Use https for bug references 2021-07-20 11:40:34 +01:00
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-07-21 00:16:54 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS add myself to DCO section 2021-07-15 01:16:51 -04:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.