On 11/23/2015 08:53 AM, Pierre-Marie de Rodat wrote:
Do you think the other patches could make it before the branch? (if they could, I will rebase+retest them as quick as possible).
Probably, yes. I can't find the DW_AT_static_link patch, though; it doesn't seem to have been attached to your initial mail.
+ /* If we already met this node, there is nothing to compute anymore. */ + if (visited.contains (l)) + { +#if ENABLE_CHECKING + /* Make sure that the stack size is consistent wherever the execution + flow comes from. */ + gcc_assert ((unsigned) l->dw_loc_frame_offset == frame_offset_); +#endif + break; + } + visited.add (l);
The 'add' function returns whether or not the set already contained the entry, so you don't need to also call 'contains'.
+ /* The called DWARF procedure consumes one stack slot per argument + and returns one stack slot. */ + tree func + = lookup_dwarf_proc_decl (l->dw_loc_oprnd1.v.val_die_ref.die); + + frame_offset += 1; + for (tree args = DECL_ARGUMENTS (func); + args != NULL; + args = DECL_CHAIN (args)) + frame_offset_--;
Can you avoid the new hash table by counting the DW_TAG_formal_parameters instead of the DECL_ARGUMENTS?
Jason