This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vta] get ia64 to pass bootstrap-debug and bootstrap4-debug(-g0)
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Jan 2008 06:28:28 -0200
- Subject: [vta] get ia64 to pass bootstrap-debug and bootstrap4-debug(-g0)
This is the only ia64-specific patch I needed for ia64-linux-gnu to
generate the same code for host and target directories in a full
bootstrap with all languages. An additional patch for gas is needed
for target libraries to compare identical, because of uninitialized
assembler memory that would hold the unwind personality address. I
posted the fix to the binutils list the other day.
It is possible that, in this patch, the hunks in variable_issue and
dfa_new_cycle are obviated by the debug-always-ready patch I've
recently installed, but I guess it's safer to keep them.
I'm checking it in the vta branch, closing tonight's (oops,
toomorning's :-) session of posting and installing last year's
patches.
Now I'm going to focus on implementing the last bit of functionality
(turning debug insns into var location notes, in var-tracking), and
then I'll do another merge and see what breaks. Bug reports of
differences that compare-debug detects between objects for other
targets or different BOOT_CFLAGS options are welcome.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* config/ia64/ia64.c (ia64_safe_itanium_class): Ignore debug insns.
(group_barrier_needed): Not for debug insns.
(ia64_variable_issue): Always accept debug insns.
(ia64_dfa_new_cycle): Not because of debug insns.
(final_emit_insn_group_barriers): Don't emit a barrier after a
call just because of debug insns.
Index: gcc/config/ia64/ia64.c
===================================================================
--- gcc/config/ia64/ia64.c.orig 2007-12-23 04:27:15.000000000 -0200
+++ gcc/config/ia64/ia64.c 2007-12-28 15:24:36.000000000 -0200
@@ -5231,6 +5231,8 @@ ia64_safe_itanium_class (rtx insn)
{
if (recog_memoized (insn) >= 0)
return get_attr_itanium_class (insn);
+ else if (DEBUG_INSN_P (insn))
+ return ITANIUM_CLASS_IGNORE;
else
return ITANIUM_CLASS_UNKNOWN;
}
@@ -5940,6 +5942,7 @@ group_barrier_needed (rtx insn)
switch (GET_CODE (insn))
{
case NOTE:
+ case DEBUG_INSN:
break;
case BARRIER:
@@ -6564,6 +6570,9 @@ ia64_variable_issue (FILE *dump ATTRIBUT
pending_data_specs--;
}
+ if (DEBUG_INSN_P (insn))
+ return 1;
+
last_scheduled_insn = insn;
memcpy (prev_cycle_state, curr_state, dfa_state_size);
if (reload_completed)
@@ -6621,6 +6630,9 @@ ia64_dfa_new_cycle (FILE *dump, int verb
int setup_clocks_p = FALSE;
gcc_assert (insn && INSN_P (insn));
+ if (DEBUG_INSN_P (insn))
+ return 0;
+
if ((reload_completed && safe_group_barrier_needed (insn))
|| (last_scheduled_insn
&& (GET_CODE (last_scheduled_insn) == CALL_INSN
@@ -8289,6 +8301,21 @@ final_emit_insn_group_barriers (FILE *du
}
else if (need_barrier_p || group_barrier_needed (insn))
{
+ if (DEBUG_INSN_P (insn))
+ {
+ rtx next = NEXT_INSN (insn);
+
+ while (next != current_sched_info->next_tail
+ && DEBUG_INSN_P (next))
+ next = NEXT_INSN (next);
+
+ /* If everything after the barrier-needing insn is
+ debug insns, we wouldn't emit the barrier if they
+ weren't there. */
+ if (next == current_sched_info->next_tail)
+ continue;
+ }
+
if (TARGET_EARLY_STOP_BITS)
{
rtx last;
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}