I've just done an ir after doing the cpl. You get ten hours of instrument flying with the cpl course if you do it this way round, which gives you a good heads up before starting...
However, if you need to build hours, doing an IMC before you start the cpl/ir is not a bad idea - you need to fly those hours anyway, so you're getting better value by paying slightly more for an instructor to teach you something new. just be aware of the number of P1 vs total hours you need to build, as the imc instruction will be logged as PUT obviously..