db: give up handling function pointers if there are too many returns
Say you have a function pointer:
my_struct->frob();
But there are 100 different places which assign a different function to
the frob pointer. And say that each of these implementations has 3 return
statements. I means that you're trying to merge 300 return strees
together. It's not normal for individual functions to have 300 return
statements and actually if that were the case, we already have a bail out
clause for individual functions.
Then you have a few files where all they do is call one function pointer
after another:
my_struct->frob();
my_struct->frob_some_more();
my_struct->frob_again();
So it can become really slow.
This only became an issue recently when we fixed the ordering. Before that
all the returns were mangled together so we never saw the slowdown.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>