From: Paul Brook <paul@nowt.org>
To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: [gfortran] Fix inlining
Date: Sun, 30 Nov 2003 14:56:00 -0000 [thread overview]
Message-ID: <200311301343.07183.paul@nowt.org> (raw)
Patch below sets the tree inlining flags in the same way as the C frontend.
I haven't checked if inlining actually works, but it doesn't seem to break
anything.
Tested on i686-linux.
Applied to tree-ssa branch.
Paul
2003-11-30 Paul Brook <paul@nowt.org>
* f95-lang.c (gfc_post_options): Move ...
* options.c (gfc_post_options): .. to here. Handle inlining options.
* gfortran.h (gfc_post_options): Add prototype.
diff -urpxCVS clean/tree-ssa/gcc/fortran/f95-lang.c new-gcc/gcc/fortran/
f95-lang.c
--- clean/tree-ssa/gcc/fortran/f95-lang.c
+++ new-gcc/gcc/fortran/f95-lang.c
@@ -326,24 +326,6 @@ gfc_init (void)
}
-/* Finalize commandline options. */
-
-static bool
-gfc_post_options (const char **pfilename)
-{
- const char *filename = *pfilename;
-
- /* Verify the input file name. */
- if (!filename || strcmp (filename, "-") == 0)
- {
- filename = "";
- }
-
- gfc_option.source = filename;
-
- return false;
-}
-
static void
gfc_finish (void)
{
diff -urpxCVS clean/tree-ssa/gcc/fortran/gfortran.h new-gcc/gcc/fortran/
gfortran.h
--- clean/tree-ssa/gcc/fortran/gfortran.h
+++ new-gcc/gcc/fortran/gfortran.h
@@ -1333,6 +1333,7 @@ void gfc_done_2 (void);
/* options.c */
unsigned int gfc_init_options (unsigned int, const char **);
int gfc_handle_option (size_t, const char *, int);
+bool gfc_post_options (const char **);
/* iresolve.c */
char * gfc_get_string (const char *, ...) ATTRIBUTE_PRINTF_1;
diff -urpxCVS clean/tree-ssa/gcc/fortran/options.c new-gcc/gcc/fortran/
options.c
--- clean/tree-ssa/gcc/fortran/options.c
+++ new-gcc/gcc/fortran/options.c
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */
#include "intl.h"
#include "opts.h"
#include "options.h"
+#include "tree-inline.h"
#include "gfortran.h"
@@ -76,6 +77,40 @@ gfc_init_options (unsigned int argc ATTR
}
+/* Finalize commandline options. */
+
+bool
+gfc_post_options (const char **pfilename)
+{
+ const char *filename = *pfilename;
+
+ /* Verify the input file name. */
+ if (!filename || strcmp (filename, "-") == 0)
+ {
+ filename = "";
+ }
+
+ gfc_option.source = filename;
+
+ flag_inline_trees = 1;
+
+ /* Use tree inlining if possible. Function instrumentation is only
+ done in the RTL level, so we disable tree inlining. */
+ if (! flag_instrument_function_entry_exit)
+ {
+ if (!flag_no_inline)
+ flag_no_inline = 1;
+ if (flag_inline_functions)
+ {
+ flag_inline_trees = 2;
+ flag_inline_functions = 0;
+ }
+ }
+
+ return false;
+}
+
+
/* Set the options for -Wall. */
static void
reply other threads:[~2003-11-30 13:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200311301343.07183.paul@nowt.org \
--to=paul@nowt.org \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).