Rav Shlomo Miller (contemporary), in his work Shabbat Shlomo (p. 230; listen to audio recording for precise citation), addresses the question of whether one may apply ice to an injury in order to reduce swelling on Shabbat. He writes that this is permissible, for two reasons. Firstly, the Halachic authorities generally permit procedures on Shabbat that serve to merely limit the infection, as opposed to curing it. This leniency is cited (in Sha’ar Ha’siyun) in the name of the Hayeh Adam (Rav Abraham Danzig of Vilna, 1748-1820). Therefore, since the ice does not heal the injury, but merely limits the swelling, it may be applied on Shabbat.
Secondly, Rav Miller adds, the Rabbinic enactment forbidding medicine on Shabbat was made out of the concern of “Shehikat Samemanim” – that people might grind herbs to produce medication. As such, some authorities understood that this prohibition is limited to procedures that normally involve “Samemanim” – actual medicine. It would not apply to the application of ice to reduce swelling, as this type of medical care does not ordinarily include the use of “Samemanim.”
Summary: It is permissible to apply ice to an injury on Shabbat to reduce swelling.