You probably want to think about pools of money separately if they have separate time horizons or are otherwise not interchangeable.
A classic example is your emergency fund (which has a potentially-immediate time horizon) vs. your retirement savings. The emergency fund would be all in cash or very short-term bonds, and would not count in your retirement asset allocation. Since the emergency fund usually has a capped value (a certain amount of money you want to have for emergencies) rather than a percentage of net worth value, this especially makes sense; you have to treat the emergency fund separately or you'd have to keep changing your asset allocation percentages as your net worth rises (hopefully) with respect to the capped emergency amount.
Similarly, say you are saving for a car in 3 years; you'd probably invest that money very conservatively. Also, it could not go in tax-deferred retirement accounts, and when you buy the car the account will go to zero. So probably worth treating this separately.
On the other hand, say you have some savings in tax-deferred retirement accounts and some in taxable accounts, but in both cases you're expecting to use the money for retirement. In that case, you have the same time horizon and goals, and it can pay to think about the taxable and nontaxable accounts as a whole. In particular you can use "asset location" (put less-tax-efficient assets in tax-deferred accounts). In this case maybe you would end up with mostly bonds in the tax-deferred accounts and mostly equities in the taxable accounts, for tax reasons; the asset allocation would only make sense considering all the accounts, since the taxable account would be too equity-heavy and the tax-deferred one too bond-heavy.
There can be practical reasons to treat each account separately, too, though. For example if your broker has a convenient automatic rebalancing tool on their website, it probably only works within an account. Treating each account by itself would let you use the automatic rebalancing feature on the website, while a more complicated asset location strategy where you rebalance across multiple accounts might be too hard and in practice you wouldn't get around to it. Getting around to rebalancing could be more important than tax-motivated asset location.
You could also take a keep-it-simple attitude: as long as your asset allocation is pretty balanced (say 40% bonds) and includes a cash allocation that would cover emergencies, you could just put all your money in one big portfolio, and think of it as a whole. If you have an emergency, withdraw from the cash allocation and then rebuild it over time; if you have a major purchase, you could redeem some bonds and then rebuild the bond portion over time. (When I say "over time" I'm thinking you might start putting new contributions into the now-underallocated assets, or you might dollar-cost-average back into them by selling bits of the now-overallocated assets.)
Anyway there's no absolute rule, it depends on what's simple enough to be manageable for you in practice, and what separate shorter-horizon investing goals you have in addition to retirement.
You can always make things complex but remember that a simple plan that happens in real life is better than a complex plan you don't keep up with in practice (or a complex plan that takes away from activities you'd enjoy more).