Remove unnecessary barriers.