diff mbox

gcc::context creation

Message ID 20170524112436.GB8499@tucnak
State New
Headers show

Commit Message

Jakub Jelinek May 24, 2017, 11:24 a.m. UTC
On Wed, May 24, 2017 at 12:57:28PM +0200, Jakub Jelinek wrote:
> So, first question, where should we order the -fdump-lang-* dumps, shall
> they go before .original/.gimple/.nested, or in between .original and
> .gimple/.nested, or after those 3 (the last option looks just wrong to me)?
> Shall the 3 standard dumps be registered like any others?
> Shall the number of lang dumps affect the numbering, i.e. is it desirable
> that with C and C++ you get different numbers for *t.cfg dump, or *t.gimple?
> In many cases it would be better if the numbering was consistent between C
> and C++.

If we wanted to order the dumps .original, .gimple, .nested, then 0-n *l.*
dumps, then the rest, then something like the following would work.
But I don't think we want to order .gimple before the *l.* dumps, and I'd
appreciate stable dump offsets between languages, so one can
./cc1 -fdump-tree-all 1.c
./cc1plus -fdump-tree-all 2.c
and diff -up {1,2}.c.074t.whatever instead of figuring out what different
numbers they have.

2017-05-24  Jakub Jelinek  <jakub@redhat.com>

	* dumpfile.c (dump_files): Use num 1, 2, 3 instead of 3, 4, 5
	for .original, .gimple and .nested.
	(FIRST_AUTO_NUMBERED_DUMP): Increase to 4.



	Jakub
diff mbox

Patch

--- gcc/dumpfile.c.jj	2017-05-22 20:49:02.000000000 +0200
+++ gcc/dumpfile.c	2017-05-24 12:30:17.205182094 +0200
@@ -73,10 +73,10 @@  static struct dump_file_info dump_files[
   dump_file_info (".cgraph", "ipa-cgraph", DK_ipa, 0),
   dump_file_info (".type-inheritance", "ipa-type-inheritance", DK_ipa, 0),
   dump_file_info (".ipa-clones", "ipa-clones", DK_ipa, 0),
-  dump_file_info (".original", "tree-original", DK_tree, 3),
-  dump_file_info (".gimple", "tree-gimple", DK_tree, 4),
-  dump_file_info (".nested", "tree-nested", DK_tree, 5),
-#define FIRST_AUTO_NUMBERED_DUMP 3
+  dump_file_info (".original", "tree-original", DK_tree, 1),
+  dump_file_info (".gimple", "tree-gimple", DK_tree, 2),
+  dump_file_info (".nested", "tree-nested", DK_tree, 3),
+#define FIRST_AUTO_NUMBERED_DUMP 4
 
   dump_file_info (NULL, "lang-all", DK_lang, 0),
   dump_file_info (NULL, "tree-all", DK_tree, 0),