* SKIP_PROLOGUE() and prologue insn scheduling
@ 2001-07-17 15:46 J.T. Conklin
2001-07-17 16:31 ` Daniel Jacobowitz
2001-07-18 14:21 ` Kevin Buettner
0 siblings, 2 replies; 4+ messages in thread
From: J.T. Conklin @ 2001-07-17 15:46 UTC (permalink / raw)
To: gdb
A coworker asked me what the prefered behavior of the SKIP_PROLOGUE()
macro when the compiler schedules the function prologue in with user
insns. I didn't have a good answer and the internals documentation
doesn't address this, so I'm shooting the question to the list.
The choice is whether SKIP_PROLOGUE() returns:
1) 1st user insn even though more prologue insns remain?
2) 1st user insn after final prologue insn?
Of these two, I think #1 is the most conservative choice. However,
gdb may may not be able to print function arguments correctly until
the user steps beyond the remainder of the prologue. While #2 does
not have that problem, having user insns execute as part of the
prologue could also be confusing --- Especially those that have
observable side effects (e.g. writes to a memory mapped device).
What is the common wisdom? At the very least, I think we need to
flesh out this issue in the internals document.
--jtc
--
J.T. Conklin
RedBack Networks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SKIP_PROLOGUE() and prologue insn scheduling
2001-07-17 15:46 SKIP_PROLOGUE() and prologue insn scheduling J.T. Conklin
@ 2001-07-17 16:31 ` Daniel Jacobowitz
2001-07-18 9:31 ` Greg McGary
2001-07-18 14:21 ` Kevin Buettner
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2001-07-17 16:31 UTC (permalink / raw)
To: J.T. Conklin; +Cc: gdb
On Tue, Jul 17, 2001 at 03:46:30PM -0700, J.T. Conklin wrote:
> A coworker asked me what the prefered behavior of the SKIP_PROLOGUE()
> macro when the compiler schedules the function prologue in with user
> insns. I didn't have a good answer and the internals documentation
> doesn't address this, so I'm shooting the question to the list.
>
> The choice is whether SKIP_PROLOGUE() returns:
> 1) 1st user insn even though more prologue insns remain?
> 2) 1st user insn after final prologue insn?
>
> Of these two, I think #1 is the most conservative choice. However,
> gdb may may not be able to print function arguments correctly until
> the user steps beyond the remainder of the prologue. While #2 does
> not have that problem, having user insns execute as part of the
> prologue could also be confusing --- Especially those that have
> observable side effects (e.g. writes to a memory mapped device).
>
> What is the common wisdom? At the very least, I think we need to
> flesh out this issue in the internals document.
IMO, #1 is the way to go. It's regrettable in that a whole lot of
tests start failing, since we will display arguments wrong. But if the
prologue is being scheduled, it's possible to schedule part of the
prologue on the interior of a large if statement (which encompasses the
rest of the body of the function, say). If we do #2, we may never stop
in the function at all.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SKIP_PROLOGUE() and prologue insn scheduling
2001-07-17 16:31 ` Daniel Jacobowitz
@ 2001-07-18 9:31 ` Greg McGary
0 siblings, 0 replies; 4+ messages in thread
From: Greg McGary @ 2001-07-18 9:31 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: J.T. Conklin, gdb
Daniel Jacobowitz <dmj+@andrew.cmu.edu> writes:
> > The choice is whether SKIP_PROLOGUE() returns:
> > 1) 1st user insn even though more prologue insns remain?
> > 2) 1st user insn after final prologue insn?
> [ ... ]
> IMO, #1 is the way to go. It's regrettable in that a whole lot of
> tests start failing, since we will display arguments wrong. But if the
> prologue is being scheduled, it's possible to schedule part of the
> prologue on the interior of a large if statement (which encompasses the
> rest of the body of the function, say). If we do #2, we may never stop
> in the function at all.
That particular pathology should not occur. First, the RTL for
prologue & epilogue is not generated until the flow2 pass, rather late
in the game, and after such code motion could occur. Second,
SKIP_PROLOGUE() must be written to stop scanning for prologue insns
when it reaches the end of the first basic block, as demarcated by a
jump or branch insn. Therefore, #2 remains a viable option as we
would never place the breakpoint in conditionally-executed code.
Greg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SKIP_PROLOGUE() and prologue insn scheduling
2001-07-17 15:46 SKIP_PROLOGUE() and prologue insn scheduling J.T. Conklin
2001-07-17 16:31 ` Daniel Jacobowitz
@ 2001-07-18 14:21 ` Kevin Buettner
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2001-07-18 14:21 UTC (permalink / raw)
To: jtc, gdb
On Jul 17, 3:46pm, J.T. Conklin wrote:
> A coworker asked me what the prefered behavior of the SKIP_PROLOGUE()
> macro when the compiler schedules the function prologue in with user
> insns. I didn't have a good answer and the internals documentation
> doesn't address this, so I'm shooting the question to the list.
>
> The choice is whether SKIP_PROLOGUE() returns:
> 1) 1st user insn even though more prologue insns remain?
> 2) 1st user insn after final prologue insn?
>
> Of these two, I think #1 is the most conservative choice. However,
> gdb may may not be able to print function arguments correctly until
> the user steps beyond the remainder of the prologue. While #2 does
> not have that problem, having user insns execute as part of the
> prologue could also be confusing --- Especially those that have
> observable side effects (e.g. writes to a memory mapped device).
>
> What is the common wisdom? At the very least, I think we need to
> flesh out this issue in the internals document.
In the prologue scanners that I've worked on, I've tried to implement
option #2.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-07-18 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 15:46 SKIP_PROLOGUE() and prologue insn scheduling J.T. Conklin
2001-07-17 16:31 ` Daniel Jacobowitz
2001-07-18 9:31 ` Greg McGary
2001-07-18 14:21 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox