aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexander Popov <alex.popov@linux.com>2020-07-10 14:10:16 -0600
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:17:19 -0300
commitf45f17fa88513da64922e6e764877e2ed24b678c (patch)
treea9ead2f33c43c32ca73e8329c50d416ec7cc12d6 /gcc
parent5235f61785017f0c398c2916824bc021bbefcdf8 (diff)
downloadgcc-f45f17fa88513da64922e6e764877e2ed24b678c.zip
gcc-f45f17fa88513da64922e6e764877e2ed24b678c.tar.gz
gcc-f45f17fa88513da64922e6e764877e2ed24b678c.tar.bz2
Improve shrink wrapping debug output
Currently if requires_stack_frame_p() returns true for some insn, the shrink-wrapping debug output contains only the number of a block containing that insn. But it is very useful to see the particular insn that requires the prologue. Let's call print_rtl_single to display that insn in the following pass dump. gcc/ * shrink-wrap.c (try_shrink_wrapping): Improve debug output.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/shrink-wrap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 775db9c..d70635e 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl-iter.h"
#include "valtrack.h"
#include "function-abi.h"
+#include "print-rtl.h"
/* Return true if INSN requires the stack frame to be set up.
PROLOGUE_USED contains the hard registers used in the function
@@ -735,7 +736,11 @@ try_shrink_wrapping (edge *entry_edge, rtx_insn *prologue_seq)
set_up_by_prologue.set))
{
if (dump_file)
- fprintf (dump_file, "Block %d needs the prologue.\n", bb->index);
+ {
+ fprintf (dump_file, "Block %d needs prologue due to insn %d:\n",
+ bb->index, INSN_UID (insn));
+ print_rtl_single (dump_file, insn);
+ }
pro = nearest_common_dominator (CDI_DOMINATORS, pro, bb);
break;
}