On 11/10/2016 06:08 AM, Martin Liška wrote:
Hello.
Following patch fixes indentation of print_node when printing a constructor
that has some equal elements. Current implementation caches tree to prevent deep
debug outputs. Such behavior is undesired for ctor elements. Apart from that,
I switch to hash_set for a table that is used for tree node caching.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Before:
<constructor 0x7ffff6a3e438
...
constant static lngt 5
idx <integer_cst 0x7ffff68a30a8 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 1>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char>
constant 120>
idx <integer_cst 0x7ffff695cb88 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 2> val <integer_cst 0x7ffff6a3e408 120>
idx <integer_cst 0x7ffff6a3e048 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 3> val <integer_cst 0x7ffff6a3e408 120>
idx <integer_cst 0x7ffff695cb28 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 4> val <integer_cst 0x7ffff6a3e408 120>
idx <integer_cst 0x7ffff6a3e3d8 type <integer_type 0x7ffff688a2a0 bitsizetype> constant
5> val <integer_cst 0x7ffff6a3e408 120>>
After:
<constructor 0x7ffff6a3e438
type <array_type 0x7ffff6a60a80
...
constant static lngt 5
idx <integer_cst 0x7ffff68a30a8 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 1>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char>
constant 120>
idx <integer_cst 0x7ffff695cb88 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 2>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char>
constant 120>
idx <integer_cst 0x7ffff6a3e048 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 3>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char>
constant 120>
idx <integer_cst 0x7ffff695cb28 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 4>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char>
constant 120>
idx <integer_cst 0x7ffff6a3e3d8 type <integer_type 0x7ffff688a2a0 bitsizetype>
constant 5>
val <integer_cst 0x7ffff6a3e408 type <integer_type 0x7ffff688a5e8 char> constant
120>>
Ready to be installed?
Martin
0001-Fix-print_node-for-CONSTRUCTORs.patch
From 6d18ff00ec1d8e6a8a154fbb70af25b2dda8165e Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 9 Nov 2016 16:28:52 +0100
Subject: [PATCH] Fix print_node for CONSTRUCTORs
gcc/ChangeLog:
2016-11-10 Martin Liska <mli...@suse.cz>
* print-tree.c (struct bucket): Remove.
(print_node): Add new argument which drives whether a tree node
is printed briefly or not.
(debug_tree): Replace a custom hash table with hash_set<T>.
* print-tree.h (print_node): Add the argument.
OK.
jeff