The first thing you should do — whether you’ve just spilled the liquid in your glass, or you’ve spilled the glass and caused it to break — is to let a staff member at the bar know. Nothing is ruder than a spilled drink left on the floor to be discovered later.
If you’ve simply spilled the drink, and nothing has been broken, it’s a nice gesture to try and help clean up the spill. However, if the staff indicates they’ve got everything under control there’s no need to continue trying to clean.
In the event the glass has broken and there are shards on the floor or table, you should leave the cleaning up to the staff. Trying to clean up broken glass is not a good idea for obvious reasons, even if you feel it’s a gesture worth making. You don’t want the bar staff to have to clean up the glass and break out their first aid kit.