From b21155754fcccc8980d5e696969229bb20375da5 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 23 Jan 2002 07:39:30 -0500 Subject: [PATCH] function.c (assign_parms): Don't put args of inline functions into registers when not optimizing. * function.c (assign_parms): Don't put args of inline functions into registers when not optimizing. * cp/decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. From-SVN: r49131 --- gcc/ChangeLog | 5 +++++ gcc/cp/ChangeLog | 2 ++ gcc/cp/decl2.c | 4 ---- gcc/function.c | 6 ++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c5da99da5a..7d0e69cb7bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-01-23 Jason Merrill + + * function.c (assign_parms): Don't put args of inline functions + into registers when not optimizing. + 2002-01-23 Nick Clifton * config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7c88cace7fd..ff79b133827 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2002-01-22 Jason Merrill + * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. + * parse.y (function_body): Suppress the block for the outermost curly braces. * decl.c (pushdecl): Don't try to skip it. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index c384f86ccfc..1c7b579a9ec 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -983,10 +983,6 @@ grokclassfn (ctype, function, flags, quals) qual_type = cp_build_qualified_type (type, this_quals); parm = build_artificial_parm (this_identifier, qual_type); c_apply_type_quals_to_decl (this_quals, parm); - - /* We can make this a register, so long as we don't - accidentally complain if someone tries to take its address. */ - DECL_REGISTER (parm) = 1; TREE_CHAIN (parm) = last_function_parms; last_function_parms = parm; } diff --git a/gcc/function.c b/gcc/function.c index bf294ea7c34..d304b309c4e 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4650,8 +4650,7 @@ assign_parms (fndecl) SET_DECL_RTL (parm, stack_parm); } else if (! ((! optimize - && ! DECL_REGISTER (parm) - && ! DECL_INLINE (fndecl)) + && ! DECL_REGISTER (parm)) || TREE_SIDE_EFFECTS (parm) /* If -ffloat-store specified, don't put explicit float variables into registers. */ @@ -4751,8 +4750,7 @@ assign_parms (fndecl) can safely live in a register, put it in one. */ if (passed_pointer && TYPE_MODE (TREE_TYPE (parm)) != BLKmode && ! ((! optimize - && ! DECL_REGISTER (parm) - && ! DECL_INLINE (fndecl)) + && ! DECL_REGISTER (parm)) || TREE_SIDE_EFFECTS (parm) /* If -ffloat-store specified, don't put explicit float variables into registers. */ -- 2.30.2