Riding my bike on empty pavement when the road is busy UK I often find myself in the situation that I'm riding my bike on the road, holding up several cars whom I can tell are getting impatient (there are oncoming cars so its hard to overtake safely). A lot of the time the pavement is completely empty. Would I be wrong to then switch to the pavement in order to (1) allow the cars to pass (2) reduce the risk of impatient drivers carelessly overtaking me? Where does the law stand on this? Moreover if it is allowed, does the pavement have to be completely empty?

Edit: Clarification - I'm more asking what more experienced bike riders do in this situation, rather than the exact legislation. If you've had any encounters with the police with such a situation, then that would be even more helpful.
It is illegal to ride a bicycle on pavement in UK by the law. It is covered by 1835 Highways Act and Highway Code Rule 64: "You MUST not cycle on a pavement". Penalty is £50.

But it makes common sense and cops generally put a blind eye as long as you are not doing anything dangerous. But at the end of the day it will depend on individual officer opinion.