summaryrefslogtreecommitdiff
path: root/gcc/c-dump.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-02 12:16:58 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-02 12:16:58 +0000
commit2fd956e61b52cef4b0b45a4c3bf7e6f96d72898a (patch)
tree23c0745f9141013fbdd206b748a7c2c6fad106d4 /gcc/c-dump.c
parent40f54c9570c09a1647935e5d3b39fb539addf4b8 (diff)
downloadgcc-2fd956e61b52cef4b0b45a4c3bf7e6f96d72898a.tar.gz
* c-common.h (TDI_inlined): New ast dump phase.
(dump_flag_name): New function. * c-dump.c (dump_files): Add inlined phase. (dump_flag_name): Define. * doc/invoke.texi (-fdump-ast-inlined): Document. cp: * optimize.c (optimize_inline_calls): New function, broken out of ... (optimize_function): ... here. Call it. Don't inline if it is a thunk. (dump_function): Print name of dump flag causing this dump. * semantics.c (expand_body): Move thunk inline check to optimize_function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-dump.c')
-rw-r--r--gcc/c-dump.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/c-dump.c b/gcc/c-dump.c
index 72de67c7479..095626699d4 100644
--- a/gcc/c-dump.c
+++ b/gcc/c-dump.c
@@ -799,9 +799,10 @@ struct dump_file_info
static struct dump_file_info dump_files[TDI_end] =
{
{".tu", "dump-translation-unit", 0, 0},
+ {".class", "dump-class-hierarchy", 0, 0},
{".original", "dump-ast-original", 0, 0},
{".optimized", "dump-ast-optimized", 0, 0},
- {".class", "dump-class-hierarchy", 0, 0},
+ {".inlined", "dump-ast-inlined", 0, 0},
};
/* Begin a tree dump for PHASE. Stores any user supplied flag in
@@ -835,16 +836,27 @@ dump_begin (phase, flag_ptr)
/* Returns non-zero if tree dump PHASE is enabled. */
-int dump_enabled_p (phase)
+int
+dump_enabled_p (phase)
enum tree_dump_index phase;
{
return dump_files[phase].state;
}
+/* Returns the switch name of PHASE. */
+
+const char *
+dump_flag_name (phase)
+ enum tree_dump_index phase;
+{
+ return dump_files[phase].swtch;
+}
+
/* Finish a tree dump for PHASE. STREAM is the stream created by
dump_begin. */
-void dump_end (phase, stream)
+void
+dump_end (phase, stream)
enum tree_dump_index phase ATTRIBUTE_UNUSED;
FILE *stream;
{
@@ -854,7 +866,8 @@ void dump_end (phase, stream)
/* Parse ARG as a dump switch. Return non-zero if it is, and store the
relevant details in the dump_files array. */
-int dump_switch_p (arg)
+int
+dump_switch_p (arg)
const char *arg;
{
unsigned ix;