libdw: Add an inlined fast path for __libdw_form_val_len
Quite a few DW_FORMs have a fixed length for their data, and we can
easily represent these in a small lookup table. The rest of the forms
are left in the old function to compute as needed. Combined with
inlining, this takes care of many forms with fewer branches and without
any call. (It's conceivable that a smart compiler could make a similar
lookup transformation from the large switch itself, but GCC doesn't.)
Signed-off-by: Josh Stone <jistone@redhat.com>
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 79bb4b5..a2e4b14 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-09 Josh Stone <jistone@redhat.com>
+
+ * libdw_form.c (__libdw_form_val_compute_len): Renamed function from
+ __libdw_form_val_len, now handling only non-constant form lengths.
+ * libdwP.h (__libdw_form_val_len): New inlined function.
+
2013-12-09 Mark Wielaard <mjw@redhat.com>
* dwarf_getlocation.c (__libdw_intern_expression): Handle empty