Chiral rings and phases of supersymmetric gauge theories