mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 15:40:55 +08:00
timevar.def: Add TV_EXPAND.
* timevar.def: Add TV_EXPAND. * timevar.c (timevar_print): Update timing information. * calls.c (try_to_integrate): Push to TV_INTEGRATION for inlining. * stmt.c (expand_return): Check for error_mark_node. cp/: * semantics.c (expand_body): Push to TV_EXPAND. * optimize.c (optimize_function): Push to TV_INTEGRATION. * decl.c (start_function): Always call announce_function. * tinfo2.cc: Just declare abort. From-SVN: r34470
This commit is contained in:
parent
6efa15825e
commit
ea11ca7ec1
@ -1,3 +1,11 @@
|
||||
2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
|
||||
|
||||
* timevar.def: Add TV_EXPAND.
|
||||
* timevar.c (timevar_print): Update timing information.
|
||||
* calls.c (try_to_integrate): Push to TV_INTEGRATION for inlining.
|
||||
|
||||
* stmt.c (expand_return): Check for error_mark_node.
|
||||
|
||||
2000-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* configure.in: Also avoid wrapping auto-build.h with IN_GCC.
|
||||
|
@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "toplev.h"
|
||||
#include "output.h"
|
||||
#include "tm_p.h"
|
||||
#include "timevar.h"
|
||||
|
||||
#ifndef ACCUMULATE_OUTGOING_ARGS
|
||||
#define ACCUMULATE_OUTGOING_ARGS 0
|
||||
@ -1733,7 +1734,7 @@ load_register_parameters (args, num_actuals, call_fusage, flags)
|
||||
}
|
||||
}
|
||||
|
||||
/* Try to integreate function. See expand_inline_function for documentation
|
||||
/* Try to integrate function. See expand_inline_function for documentation
|
||||
about the parameters. */
|
||||
|
||||
static rtx
|
||||
@ -1761,10 +1762,14 @@ try_to_integrate (fndecl, actparms, target, ignore, type, structure_value_addr)
|
||||
|
||||
before_call = get_last_insn ();
|
||||
|
||||
timevar_push (TV_INTEGRATION);
|
||||
|
||||
temp = expand_inline_function (fndecl, actparms, target,
|
||||
ignore, type,
|
||||
structure_value_addr);
|
||||
|
||||
timevar_pop (TV_INTEGRATION);
|
||||
|
||||
/* If inlining succeeded, return. */
|
||||
if (temp != (rtx) (HOST_WIDE_INT) - 1)
|
||||
{
|
||||
|
@ -1,3 +1,11 @@
|
||||
2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
|
||||
|
||||
* semantics.c (expand_body): Push to TV_EXPAND.
|
||||
* optimize.c (optimize_function): Push to TV_INTEGRATION.
|
||||
* decl.c (start_function): Always call announce_function.
|
||||
|
||||
* tinfo2.cc: Just declare abort.
|
||||
|
||||
2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
|
||||
|
||||
* lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
|
||||
|
@ -13649,8 +13649,7 @@ start_function (declspecs, declarator, attrs, flags)
|
||||
begin_stmt_tree (&DECL_SAVED_TREE (decl1));
|
||||
|
||||
/* Let the user know we're compiling this function. */
|
||||
if (processing_template_decl || !building_stmt_tree ())
|
||||
announce_function (decl1);
|
||||
announce_function (decl1);
|
||||
|
||||
/* Record the decl so that the function name is defined.
|
||||
If we already have a decl for this name, and it is a FUNCTION_DECL,
|
||||
|
@ -28,6 +28,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "input.h"
|
||||
#include "integrate.h"
|
||||
#include "varray.h"
|
||||
#include "timevar.h"
|
||||
|
||||
/* To Do:
|
||||
|
||||
@ -806,6 +807,8 @@ optimize_function (fn)
|
||||
tree prev_fn;
|
||||
struct saved_scope *s;
|
||||
|
||||
timevar_push (TV_INTEGRATION);
|
||||
|
||||
/* Clear out ID. */
|
||||
memset (&id, 0, sizeof (id));
|
||||
|
||||
@ -836,6 +839,8 @@ optimize_function (fn)
|
||||
/* Clean up. */
|
||||
VARRAY_FREE (id.fns);
|
||||
VARRAY_FREE (id.target_exprs);
|
||||
|
||||
timevar_pop (TV_INTEGRATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "ggc.h"
|
||||
#include "rtl.h"
|
||||
#include "output.h"
|
||||
#include "timevar.h"
|
||||
|
||||
/* There routines provide a modular interface to perform many parsing
|
||||
operations. They may therefore be used during actual parsing, or
|
||||
@ -2788,6 +2789,8 @@ expand_body (fn)
|
||||
return;
|
||||
}
|
||||
|
||||
timevar_push (TV_EXPAND);
|
||||
|
||||
/* Optimize the body of the function before expanding it. */
|
||||
optimize_function (fn);
|
||||
|
||||
@ -2838,4 +2841,6 @@ expand_body (fn)
|
||||
/* And restore the current source position. */
|
||||
lineno = saved_lineno;
|
||||
input_filename = saved_input_filename;
|
||||
|
||||
timevar_pop (TV_EXPAND);
|
||||
}
|
||||
|
@ -28,10 +28,12 @@
|
||||
// the GNU General Public License.
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h> // for abort
|
||||
#include "tinfo.h"
|
||||
#include "new" // for placement new
|
||||
|
||||
// We can't rely on having stdlib.h if we're freestanding.
|
||||
extern "C" void abort ();
|
||||
|
||||
using std::type_info;
|
||||
|
||||
#if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100
|
||||
|
@ -2844,7 +2844,9 @@ expand_return (retval)
|
||||
cleanups = 1;
|
||||
#endif
|
||||
|
||||
if (TREE_CODE (retval) == RESULT_DECL)
|
||||
if (retval == error_mark_node)
|
||||
retval_rhs = NULL_TREE;
|
||||
else if (TREE_CODE (retval) == RESULT_DECL)
|
||||
retval_rhs = retval;
|
||||
else if ((TREE_CODE (retval) == MODIFY_EXPR || TREE_CODE (retval) == INIT_EXPR)
|
||||
&& TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL)
|
||||
|
@ -405,10 +405,28 @@ timevar_print (fp)
|
||||
#if defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) || defined (HAVE_WALL_TIME)
|
||||
timevar_id_t id;
|
||||
struct timevar_time_def *total = &timevars[TV_TOTAL].elapsed;
|
||||
struct timevar_time_def now;
|
||||
|
||||
if (!TIMEVAR_ENABLE)
|
||||
return;
|
||||
|
||||
/* Update timing information in case we're calling this from GDB. */
|
||||
|
||||
if (fp == 0)
|
||||
fp = stderr;
|
||||
|
||||
/* What time is it? */
|
||||
get_time (&now);
|
||||
|
||||
/* If the stack isn't empty, attribute the current elapsed time to
|
||||
the old topmost element. */
|
||||
if (stack)
|
||||
timevar_accumulate (&stack->timevar->elapsed, &start_time, &now);
|
||||
|
||||
/* Reset the start time; from now on, time is attributed to
|
||||
TIMEVAR. */
|
||||
start_time = now;
|
||||
|
||||
fprintf (fp, "\nExecution times (seconds)\n");
|
||||
for (id = 0; id < TIMEVAR_LAST; ++id)
|
||||
{
|
||||
|
@ -41,6 +41,7 @@ DEFTIMEVAR (TV_DUMP , "dump files")
|
||||
|
||||
/* Timing in various stages of the compiler. */
|
||||
DEFTIMEVAR (TV_PARSE , "parser")
|
||||
DEFTIMEVAR (TV_EXPAND , "expand")
|
||||
DEFTIMEVAR (TV_VARCONST , "varconst")
|
||||
DEFTIMEVAR (TV_INTEGRATION , "integration")
|
||||
DEFTIMEVAR (TV_JUMP , "jump")
|
||||
|
Loading…
x
Reference in New Issue
Block a user