- // Sort CSR aliases acording to the CSR ordering.
- if (CSRAlias.size() >= 2)
- array_pod_sort(CSRAlias.begin(), CSRAlias.end());
+ // CSR aliases go after the volatile registers, preserve the target's order.
+ std::copy(CSRAlias.begin(), CSRAlias.end(), &RCI.Order[N]);
+
+ // Register allocator stress test. Clip register class to N registers.
+ if (StressRA && RCI.NumRegs > StressRA)
+ RCI.NumRegs = StressRA;