On 10/20/2015 04:13 PM, Pierre-Marie de Rodat wrote:

Sorry about the slow review on these patches. In future please feel free to ping me as often as once a week.

+  /* DWARF operations all work on signed integers.

Note that this will no longer be the case in DWARF 5, where stack elements have associated types. Let's add a comment about that so perhaps we can remove the workaround in a future release.

+  /* ??? Set of all DW_OP_nop operations we remove: is it really a good thing
+     to free them, or should we instead let the garbage collect do it?  */

Might as well free them if we know they're garbage, it lets us reuse that memory sooner.

+  /* Trailing nops from loc_descritor_from_tree (if any) cannot be removed

missing 'p' in loc_descriptor_from_tree.

+  /* When translating a function into a DWARF procedure, contains the frame
+     offset *before* evaluating this operation.  It is -1 when not yet
+     initialized.  */
+  int dw_loc_frame_offset;
+  /* For DW_OP_call* operations: contains the number of stack slots that were
+     added overall when returning from the procedure (so it's negative if the
+     procedure removes slots).  */
+  int dw_loc_frame_offset_increment;

I'm not excited about adding another couple of words to every loc insn for uses that occur so rarely.

dw_loc_frame_offset seems to be primarily used for checking, can we make it conditional on ENABLE_CHECKING and use a hash_set to remember already visited nodes?

Instead of dw_loc_frame_offset_increment, can we look up the number of arguments from the callee?

+  /* Return a type to used in the debug info instead of TYPE, or NULL_TREE to

"to use"

+         /* Arbitrary scale factors cannot be describe in standard DWARF,

"described"

Jason

Reply via email to