Go to file
David Malcolm 2162235ef6 Move global state in timevar.c to a new "timer" class
gcc/ChangeLog:
	* timevar.c (timevar_enable): Delete in favor of...
	(g_timer): New global.
	(struct timevar_def): Move to timevar.h inside class timer.
	(struct timevar_stack_def): Likewise.
	(timevars): Delete global in favor of field "m_timevars" within
	class timer in timevar.h
	(stack): Likewise, in favor of field "m_stack".
	(unused_stack_instances): Likewise, in favor of field
	"m_unused_stack_instances".
	(start_time): Likewise, in favor of field "m_start_time".
	(get_time): Eliminate check for timevar_enable.
	(timer::timer): New function, built from part of timevar_init.
	(timevar_init): Rewrite idempotency test from using
	"timevar_enable" bool to using dynamic allocation of "g_timer".
	Move rest of implementation into timer's constructor.
	(timevar_push_1): Rename to...
	(timer::push): ...this, adding "m_" prefixes to variables that
	are now fields of timer.
	(timevar_pop_1): Likewise, rename to...
	(timer::pop): ...this, and add "m_" prefixes.
	(timevar_start): Replace test for "timevar_enable" with one for
	"g_timer", and move bulk of implementation to...
	(timer::start): ...here, adding "m_" prefixes.
	(timevar_stop): Likewise, from here...
	(timer::stop): ...to here.
	(timevar_cond_start): Likewise, from here...
	(timer::cond_start): ...to here.
	(timevar_cond_stop): Likewise, from here...
	(timer::cond_stop): ...to here.
	(validate_phases): Rename to...
	(timer::validate_phases): ...this, and add "m_" prefixes.  Make
	locals "total" and "tv" const.
	(timevar_print): Rename to...
	(timer::print): ...this, and add "m_" prefixes.  Make locals
	"total" and "tv" const.  Eliminate test for timevar_enable.
	* timevar.h (timevar_enable): Eliminate.
	(g_timer): New declaration.
	(timevar_push_1): Eliminate.
	(timevar_pop_1): Eliminate.
	(timevar_print): Eliminate.
	(class timer): New class.
	(timevar_push): Rewrite to use g_timer.
	(timevar_pop): Likewise.
	* toplev.c (toplev::~toplev): Likewise.

From-SVN: r223092
2015-05-12 17:29:32 +00:00
boehm-gc
config Improve the test in bitfields.m4 2015-05-05 03:41:53 +00:00
contrib check_GNU_style.sh: Fix tab size in 80 characters check 2015-05-12 16:23:38 +00:00
fixincludes fixincludes update for musl support 2015-04-22 14:18:16 +00:00
gcc Move global state in timevar.c to a new "timer" class 2015-05-12 17:29:32 +00:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcilkrts
libcpp lex.c (lex_string): Add -Wc++11-compat warning. 2015-05-09 00:50:10 -04:00
libdecnumber
libffi
libgcc libgcov-util.c: Add space between string literal and macro name. 2015-05-12 16:40:49 +02:00
libgfortran libstdc++, libgfortran gthr workaround for musl 2015-04-22 14:24:11 +00:00
libgo runtime: Fix runtime/pprof test when libgo is not optimized. 2015-05-11 16:19:23 +00:00
libgomp openacc.h (__GOACC_NOTHROW): Fix noexcept syntax. 2015-05-09 00:50:35 -04:00
libiberty libiberty/mkstemps.c: Include <time.h> if <sys/time.h> not available. 2015-05-08 17:14:26 +00:00
libitm libitm fixes for musl support 2015-04-22 14:11:25 +00:00
libjava
libmpx configure.ac: Drop AC_PROG_CXX and friends, since libmpx has no C++ sources. 2015-04-27 15:02:46 +00:00
libobjc Improve the test in bitfields.m4 2015-05-05 03:41:53 +00:00
liboffloadmic
libquadmath
libsanitizer
libssp
libstdc++-v3 synopsis.cc: Add _GLIBCXX14_CONSTEXPR. 2015-05-09 20:46:12 -04:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitignore
ABOUT-NLS
ChangeLog * MAINTAINERS (Write After Approval): Add myself. 2015-05-11 20:09:43 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure.ac: Fix typo. 2015-05-11 20:09:35 +02:00
configure.ac configure.ac: Fix typo. 2015-05-11 20:09:35 +02:00
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 * MAINTAINERS (Write After Approval): Add myself. 2015-05-11 20:09:43 +02:00
Makefile.def
Makefile.in Makefile.tpl: Remove surplus whitespace throughout. 2015-04-22 20:32:18 +02:00
Makefile.tpl Makefile.tpl: Remove surplus whitespace throughout. 2015-04-22 20:32:18 +02:00
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.