gdb: move cheap pointer equality check earlier in types_equal
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 24 Mar 2021 17:48:27 +0000 (17:48 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 7 Apr 2021 11:49:12 +0000 (12:49 +0100)
I noticed that in types equal we start with a cheap pointer equality
check, then resolve typedefs, then do a series of (semi-)expensive
checks, including checking type names, before, finally performing
another pointer equality check.

We should hoist the second pointer equality check to immediately after
we have resolved typedefs.  This would save performing the more
expensive checks.

This isn't going to give any noticable performance improvement, I just
spotted this in passing and figured I might as well commit the fix.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* gdbtypes.c (types_equal): Move pointer equality check earlier in
the function.


No differences found
This page took 0.025321 seconds and 4 git commands to generate.