mirror of git://gcc.gnu.org/git/gcc.git
re PR target/45299 (Dwarf information is wrong with optimised code.)
* config/picochip/picochip.c (reorder_var_tracking_notes): This
function was dropping debug insns which caused PR45299.
From-SVN: r163617
This commit is contained in:
parent
ee9dd92eea
commit
179ba6b882
|
|
@ -1,5 +1,9 @@
|
||||||
2010-08-28 Uros Bizjak <ubizjak@gmail.com>
|
2010-08-28 Hariharan Sandanagobalane <hariharan@picochip.com>
|
||||||
|
|
||||||
|
* config/picochip/picochip.c (reorder_var_tracking_notes): This
|
||||||
|
function was dropping debug insns which caused PR45299.
|
||||||
|
|
||||||
|
2010-08-28 Uros Bizjak <ubizjak@gmail.com>
|
||||||
* config/i386/sse.md (extsuffix): New code attribute.
|
* config/i386/sse.md (extsuffix): New code attribute.
|
||||||
(sse4_1_<code>v8qiv8hi2): Macroize insn from sse4_1_extendv8qiv8hi2
|
(sse4_1_<code>v8qiv8hi2): Macroize insn from sse4_1_extendv8qiv8hi2
|
||||||
and sse4_1_zero_extendv8qiv8hi2 using any_extend code iterator.
|
and sse4_1_zero_extendv8qiv8hi2 using any_extend code iterator.
|
||||||
|
|
|
||||||
|
|
@ -3138,16 +3138,42 @@ static void
|
||||||
reorder_var_tracking_notes (void)
|
reorder_var_tracking_notes (void)
|
||||||
{
|
{
|
||||||
basic_block bb;
|
basic_block bb;
|
||||||
|
|
||||||
FOR_EACH_BB (bb)
|
FOR_EACH_BB (bb)
|
||||||
{
|
{
|
||||||
rtx insn, next;
|
rtx insn, next, last_insn = NULL_RTX;
|
||||||
|
rtx vliw_start = NULL_RTX;
|
||||||
rtx queue = NULL_RTX;
|
rtx queue = NULL_RTX;
|
||||||
|
|
||||||
for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = next)
|
/* Iterate through the bb and find the last non-debug insn */
|
||||||
|
for (insn = BB_HEAD (bb); insn != NEXT_INSN(BB_END (bb)); insn = NEXT_INSN(insn))
|
||||||
|
{
|
||||||
|
if (NONDEBUG_INSN_P(insn))
|
||||||
|
last_insn = insn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In all normal cases, queue up notes and emit them just before a TImode
|
||||||
|
instruction. For the last instruction, emit the queued notes just after
|
||||||
|
the last instruction. */
|
||||||
|
for (insn = BB_HEAD (bb); insn != NEXT_INSN(BB_END (bb)); insn = next)
|
||||||
{
|
{
|
||||||
next = NEXT_INSN (insn);
|
next = NEXT_INSN (insn);
|
||||||
|
|
||||||
if (NONDEBUG_INSN_P (insn))
|
if (insn == last_insn)
|
||||||
|
{
|
||||||
|
while (queue)
|
||||||
|
{
|
||||||
|
rtx next_queue = PREV_INSN (queue);
|
||||||
|
PREV_INSN (NEXT_INSN(insn)) = queue;
|
||||||
|
NEXT_INSN(queue) = NEXT_INSN(insn);
|
||||||
|
PREV_INSN(queue) = insn;
|
||||||
|
NEXT_INSN(insn) = queue;
|
||||||
|
queue = next_queue;
|
||||||
|
}
|
||||||
|
/* There is no more to do for this bb. break*/
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (NONDEBUG_INSN_P (insn))
|
||||||
{
|
{
|
||||||
/* Emit queued up notes before the first instruction of a bundle. */
|
/* Emit queued up notes before the first instruction of a bundle. */
|
||||||
if (GET_MODE (insn) == TImode)
|
if (GET_MODE (insn) == TImode)
|
||||||
|
|
@ -3172,6 +3198,8 @@ reorder_var_tracking_notes (void)
|
||||||
queue = insn;
|
queue = insn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Make sure we are not dropping debug instructions.*/
|
||||||
|
gcc_assert (queue == NULL_RTX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue