@@ -2870,11 +2870,10 @@ void Scheduling::verify_good_schedule( Block *b, const char *msg ) {
2870
2870
int n_op = n->Opcode ();
2871
2871
if ( n_op == Op_MachProj && n->ideal_reg () == MachProjNode::fat_proj ) {
2872
2872
// Fat-proj kills a slew of registers
2873
- RegMask rm = n->out_RegMask ();// Make local copy
2874
- while ( rm.is_NotEmpty () ) {
2875
- OptoReg::Name kill = rm.find_first_elem ();
2876
- rm.Remove (kill );
2877
- verify_do_def ( n, kill , msg );
2873
+ RegMaskIterator rmi (n->out_RegMask ());
2874
+ while (rmi.has_next ()) {
2875
+ OptoReg::Name kill = rmi.next ();
2876
+ verify_do_def (n, kill , msg);
2878
2877
}
2879
2878
} else if ( n_op != Op_Node ) { // Avoid brand new antidependence nodes
2880
2879
// Get DEF'd registers the normal way
@@ -3061,11 +3060,10 @@ void Scheduling::ComputeRegisterAntidependencies(Block *b) {
3061
3060
// This can add edges to 'n' and obscure whether or not it was a def,
3062
3061
// hence the is_def flag.
3063
3062
fat_proj_seen = true ;
3064
- RegMask rm = n->out_RegMask ();// Make local copy
3065
- while ( rm.is_NotEmpty () ) {
3066
- OptoReg::Name kill = rm.find_first_elem ();
3067
- rm.Remove (kill );
3068
- anti_do_def ( b, n, kill , is_def );
3063
+ RegMaskIterator rmi (n->out_RegMask ());
3064
+ while (rmi.has_next ()) {
3065
+ OptoReg::Name kill = rmi.next ();
3066
+ anti_do_def (b, n, kill , is_def);
3069
3067
}
3070
3068
} else {
3071
3069
// Get DEF'd registers the normal way
@@ -3080,11 +3078,10 @@ void Scheduling::ComputeRegisterAntidependencies(Block *b) {
3080
3078
for (DUIterator_Fast imax, i = n->fast_outs (imax); i < imax; i++) {
3081
3079
Node* use = n->fast_out (i);
3082
3080
if (use->is_Proj ()) {
3083
- RegMask rm = use->out_RegMask ();// Make local copy
3084
- while ( rm.is_NotEmpty () ) {
3085
- OptoReg::Name kill = rm.find_first_elem ();
3086
- rm.Remove (kill );
3087
- anti_do_def ( b, n, kill , false );
3081
+ RegMaskIterator rmi (use->out_RegMask ());
3082
+ while (rmi.has_next ()) {
3083
+ OptoReg::Name kill = rmi.next ();
3084
+ anti_do_def (b, n, kill , false );
3088
3085
}
3089
3086
}
3090
3087
}
0 commit comments