|
|
On Jun 11, 2009, Jakub Jelinek <jakub@xxxxxxxxxx> wrote:
>> DW_OP_implicit_value 0x9e
>> DW_OP_stack_value 0x9f
> Using http://www.dwarfstd.org/doc/DWARF4-draft3-090522.pdf
> I've drafted up a preliminary support patch for these two.
> First patch is against trunk, second against VTA branch.
Thanks!
I'm testing it along with the patch below. The patch implements
expansion of SSA_NAMEs in debug stmts. I hadn't realized this had
regressed in a recent merge into the VTA branch. This pretty much
killed all VTA notes at expand time. No wonder people weren't exactly
amazed at the debug info quality :-)
The patch fixes the error you noticed in this function:
> void
> t4 (unsigned int i, unsigned int j)
> {
> fn3 (i, j);
> i = j;
> fn4 (i, j);
> fn4 (i + 4, j + 4);
> }
I'll check this patch in the VTA branch as soon as I finish testing it.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@xxxxxxxxxx>
* cfgexpand.c (expand_debug_expr): Map SSA_NAMEs to the
corresponding pseudos.
Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig 2009-06-11 09:20:54.000000000 -0300
+++ gcc/cfgexpand.c 2009-06-11 09:42:06.000000000 -0300
@@ -2735,12 +2735,21 @@ expand_debug_expr (tree exp)
/* ??? Maybe handle some builtins? */
return NULL;
- /* SSA names of optimized-away variables can survive un-SSA. */
case SSA_NAME:
+ {
+ int part = var_to_partition (SA.map, exp);
+
+ if (part == NO_PARTITION)
+ return NULL;
+
+ gcc_assert (part >= 0 && (unsigned)part < SA.map->num_partitions);
+
+ return SA.partition_to_pseudo[part];
+ }
+
case ERROR_MARK:
return NULL;
-
default:
flag_unsupported:
#if 0
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
|
|