Layoffs are nothing more than a shortened period of the status quo. The top performers should be promoted, and those contributing the least value should be sacked.
When we were reorganizing, I remember the leader of our organization said it best:
"Yes, we are reorganizing. I suspect the people that fear it most are the ones that have the least to worry about. If you are engaged in the company, productive in your work, and genuinely care about your team, you are probably already doing the things you need to be doing. if this doesn't apply to you, I have to ask you two questions: are you applying yourself? And if not, why did you bother applying here at all?"
In other words, be the best worker you can be. In the long run, it's the only strategy that'll work.
If you are making the cuts, the same advice should apply. Keep your best talent, regardless of function, and use the opportunity to simply accelerate the departure of your underperforming colleagues.
Typically, in a layoff situation, you have eliminate a certain number or percentage of positions. Remove the psiitons, then fill those positions with your best talent. For everybody else in this game of musical chairs, when the music stops, the people without a seat need to go home.
If your whole function is made redundant, top performers usually have connections in other departments, or if nothing else, in similar functions at other workplaces. If nothing else, you will have the satisfaction of knowing you did all you could.