This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libdw: Don't reassign result pointer in dwarf_peel_type.


On Tue, 2015-09-15 at 11:02 +0200, Mark Wielaard wrote:
> GCC6 will warn about the reassignement of the nonnull result pointer.
> The reassignment is indeed a little questionable. The compiler cannot
> see that the pointer will not actually be reassigned since the function
> will just return the same pointer value except when the dwarf_formref_die
> function fails. In which case we don't use the result anymore. So the
> compiler has to pessimistically assume the pointer will need to be
> reloaded in the loop every time. Help the compiler generate slightly
> better code by just checking whether the function fails directly instead
> of reusing the pointer value for this.

I pushed this to master.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]