From: Gabriele S. <gab...@gm...> - 2009-12-14 09:57:37
|
2009/12/14 Thierry LAFAGE <thi...@in...>: > Ok. Thanks. > I'll try to comply with those quite annoying formatting rules (have to > better tune my IDE). Yes, it's the easiest thing to avoid problems, also ensure that the editor always trims trailing spaces when saving files, there a few places in GCCs were trailing spaces were left and nobody modified them for a long time in order not to make merges harder (yeah, it's completely crazy). > Concerning location information directly from gimple, I hope that this > information will be correct and accurate in 4.5 since it does not seem to be > the case at the moment (for this reason I had to pick it into the tree > representation). If the gimple2cil pass is rewritten to comply with version > 4.5 then I'll make my code comply to it too. I have checked in GCC trunk's svn history and apparently gimple_to_tree() has already been removed so 4.5 won't have the GIMPLE->TREE->RTL scheme anymore (GIMPLE->TREE->CLI). I was wondering how they do get proper location information on the other hand because the TREE from which you extract the source location has been built from GIMPLE statements. Looking at the old code apparently source location information was converted from GIMPLE back into the TREE representation at the bottom of the gimple_to_tree() function in cfgexpand.c. Here's the relevant snippet: /* Set EXPR_LOCATION in all the embedded expressions. */ loc = gimple_location (stmt); walk_tree (&t, set_expr_location_r, (void *) &loc, NULL); Ciao! Gabriele |