aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@casey.soma.redhat.com>2000-06-09 16:23:47 +0000
committerJason Merrill <jason@gcc.gnu.org>2000-06-09 12:23:47 -0400
commitea11ca7ec12df7f53d437a738f984e26ef7ab85b (patch)
tree0298128e12299bf28f76cc3ef5ad263e2fa59173 /gcc/cp
parent6efa15825eea54fa389d7b385f4f87e689ab61bc (diff)
downloadgcc-ea11ca7ec12df7f53d437a738f984e26ef7ab85b.zip
gcc-ea11ca7ec12df7f53d437a738f984e26ef7ab85b.tar.gz
gcc-ea11ca7ec12df7f53d437a738f984e26ef7ab85b.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl.c3
-rw-r--r--gcc/cp/optimize.c5
-rw-r--r--gcc/cp/semantics.c5
-rw-r--r--gcc/cp/tinfo2.cc4
5 files changed, 22 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 79995c5..b05f339 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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 @'
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 22bdb9d..73e5a61 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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,
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 52292ff..b446207 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -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);
}
}
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 505c487..7d9e1da 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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);
}
diff --git a/gcc/cp/tinfo2.cc b/gcc/cp/tinfo2.cc
index f89980a..39fe98c 100644
--- a/gcc/cp/tinfo2.cc
+++ b/gcc/cp/tinfo2.cc
@@ -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