This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with GP on IA64
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 17 May 02 15:25:41 EDT
- Subject: Re: Problem with GP on IA64
It's possible I'm confused, and this is only used for preventing
interblock moves, but I didn't think so. I can't really tell
either way without seeing what you did, and looking at the test case.
Well that's what the comment says, though I think the issue is that
even though that insn isn't moving, other insns are moving in front of it.
What I tried is:
*** sched-deps.c 19 Feb 2002 02:53:10 -0000 1.34
--- sched-deps.c 17 May 2002 19:20:14 -0000
*************** sched_analyze_insn (deps, x, insn, loop_
*** 1200,1205 ****
|| dest_regno < FIRST_PSEUDO_REGISTER)
{
- set_sched_group_p (insn);
CANT_MOVE (insn) = 1;
}
else
--- 1200,1206 ----
|| dest_regno < FIRST_PSEUDO_REGISTER)
{
CANT_MOVE (insn) = 1;
+ if (! deps->call_in_previous_bb_p)
+ set_sched_group_p (insn);
}
else
*************** sched_analyze_insn (deps, x, insn, loop_
*** 1207,1210 ****
--- 1208,1212 ----
end_call_group:
deps->in_post_call_group_p = false;
+ deps->call_in_previous_bb_p = false;
}
}
*************** sched_analyze (deps, head, tail)
*** 1225,1228 ****
--- 1227,1239 ----
cselib_init ();
+ /* If the last real insn is a CALL_INSN, say we are in the post-call
+ group. */
+ if (prev_real_insn (head) != 0
+ && GET_CODE (prev_real_insn (head)) == CALL_INSN)
+ {
+ deps->in_post_call_group_p = true;
+ deps->call_in_previous_bb_p = true;
+ }
+
for (insn = head;; insn = NEXT_INSN (insn))
{
*************** init_deps (deps)
*** 1450,1453 ****
--- 1461,1465 ----
deps->sched_before_next_call = 0;
deps->in_post_call_group_p = false;
+ deps->call_in_previous_bb_p = false;
}
*** sched-int.h 28 Feb 2002 18:29:07 -0000 1.18.2.1
--- sched-int.h 17 May 2002 19:20:14 -0000
*************** struct deps
*** 83,86 ****
--- 83,87 ----
the call. */
bool in_post_call_group_p;
+ bool call_in_previous_bb_p;
/* The maximum register number for the following arrays. Before reload
The test case is to compile ada/make.adb with -O2 -gnatpga and look just
below the second call to read_library_info.
A last resort is to notice a set to pic_offset_table_rtx in
sched_analyze_1 and set reg_pending_barrier. I'd rather not
be quite so crude as hard coding that though.
Agreed.