Phase behavior of polymer blends under equilibrium and nonequilibrium conditions