Clean up attribute reprocessing
I ran across the attribute reprocessing code recently and noticed that
it unconditionally sets members of the CU when reading a DIE. Also,
each spot reading attributes needs to be careful to "reprocess" them
as a separate step.
This seemed excessive to me, because while reprocessing applies to any
DIE, setting the CU members is only necessary for the toplevel DIE in
any given CU.
This patch introduces a new read_toplevel_die function and changes a
few spots to call it. This is easily done because reading the
toplevel DIE is already special.
I left the reprocessing flag and associated checks in attribute. It
could be stripped out, but I am not sure it would provide much value
(maybe some iota of performance).
Regression tested on x86-64 Fedora 36.