Adaptive clock gating for shift register based circuits