This discussion has been around as long as there has been a choice between auto and manual transmissions. Unfortunately the answer is that there IS NO ONE ANSWER because there are too many variables. The two biggest in my opinion are 1) the skill of the driver of the manual transmission (and I've ridden with some real incompetents) and 2) the thermal efficiency map of a given engine type. Without knowing the efficiency map, you simply can not choose operating conditions optimally. You may ASSUME that you "know" how the engine responds, but I'm pretty sure that with current technology engines (direct injection, variable valve timing, closed-loop stoichiometric mixtures, etc) you just don't. Your intuition might tell you, for instance, that 5th on this long slight upgrade achieves better efficiency, when actually 4th and higher engine rpm yield a few % better.
Problem is that only the engineers at the car companies have the efficiency maps. That is, unless someone with access to an engine dyno wants to remove one from a vehicle and make the plots for himself. I haven't ever seen any though.
Anyway, the engineers at the car companies have those efficiency maps in front of them when they choose operating parameters for the automatic transmissions. No doubt the principal input to the programming process is the EPA fuel mileage test cycle.