@@ -1023,7 +1023,14 @@ impl<'a, F: Function> Env<'a, F> {
10231023 Ok ( ( ) )
10241024 }
10251025
1026- fn alloc_def_op ( & mut self , op_idx : usize , op : Operand , operands : & [ Operand ] , block : Block , inst : Inst ) -> Result < ( ) , RegAllocError > {
1026+ fn alloc_def_op (
1027+ & mut self ,
1028+ op_idx : usize ,
1029+ op : Operand ,
1030+ operands : & [ Operand ] ,
1031+ block : Block ,
1032+ inst : Inst ,
1033+ ) -> Result < ( ) , RegAllocError > {
10271034 trace ! ( "Allocating def operand {op}" ) ;
10281035 if let OperandConstraint :: Reuse ( reused_idx) = op. constraint ( ) {
10291036 let reused_op = operands[ reused_idx] ;
@@ -1040,8 +1047,7 @@ impl<'a, F: Function> Env<'a, F> {
10401047 // If the defined vreg is used as a branch arg and it has an
10411048 // any or stack constraint, define it into the block param spillslot
10421049 let mut param_spillslot = None ;
1043- ' outer: for ( succ_idx, succ) in
1044- self . func . block_succs ( block) . iter ( ) . cloned ( ) . enumerate ( )
1050+ ' outer: for ( succ_idx, succ) in self . func . block_succs ( block) . iter ( ) . cloned ( ) . enumerate ( )
10451051 {
10461052 for ( param_idx, branch_arg_vreg) in self
10471053 . func
@@ -1087,7 +1093,7 @@ impl<'a, F: Function> Env<'a, F> {
10871093 self . freealloc ( op. vreg ( ) ) ;
10881094 Ok ( ( ) )
10891095 }
1090-
1096+
10911097 fn alloc_use ( & mut self , op_idx : usize , op : Operand , inst : Inst ) -> Result < ( ) , RegAllocError > {
10921098 trace ! ( "Allocating use op {op}" ) ;
10931099 if self . reused_input_to_reuse_op [ op_idx] != usize:: MAX {
@@ -1106,7 +1112,7 @@ impl<'a, F: Function> Env<'a, F> {
11061112 }
11071113 Ok ( ( ) )
11081114 }
1109-
1115+
11101116 fn alloc_inst ( & mut self , block : Block , inst : Inst ) -> Result < ( ) , RegAllocError > {
11111117 trace ! ( "Allocating instruction {:?}" , inst) ;
11121118 self . reset_available_pregs_and_scratch_regs ( ) ;
@@ -1196,8 +1202,12 @@ impl<'a, F: Function> Env<'a, F> {
11961202 trace ! ( "Decrementing clobber avail preg" ) ;
11971203 self . num_available_pregs [ ExclusiveOperandPos :: LateOnly ] [ preg. class ( ) ] -= 1 ;
11981204 self . num_available_pregs [ ExclusiveOperandPos :: Both ] [ preg. class ( ) ] -= 1 ;
1199- debug_assert ! ( self . num_available_pregs[ ExclusiveOperandPos :: LateOnly ] [ preg. class( ) ] >= 0 ) ;
1200- debug_assert ! ( self . num_available_pregs[ ExclusiveOperandPos :: Both ] [ preg. class( ) ] >= 0 ) ;
1205+ debug_assert ! (
1206+ self . num_available_pregs[ ExclusiveOperandPos :: LateOnly ] [ preg. class( ) ] >= 0
1207+ ) ;
1208+ debug_assert ! (
1209+ self . num_available_pregs[ ExclusiveOperandPos :: Both ] [ preg. class( ) ] >= 0
1210+ ) ;
12011211 } else {
12021212 // Some fixed-reg operands may be clobbers and so the decrement
12031213 // of the num avail regs has already been done.
@@ -1222,8 +1232,14 @@ impl<'a, F: Function> Env<'a, F> {
12221232 "Number of available pregs for int, float, vector any-reg and any ops: {:?}" ,
12231233 self . num_available_pregs
12241234 ) ;
1225- trace ! ( "registers available for early reg-only & any operands: {}" , self . available_pregs[ OperandPos :: Early ] ) ;
1226- trace ! ( "registers available for late reg-only & any operands: {}" , self . available_pregs[ OperandPos :: Late ] ) ;
1235+ trace ! (
1236+ "registers available for early reg-only & any operands: {}" ,
1237+ self . available_pregs[ OperandPos :: Early ]
1238+ ) ;
1239+ trace ! (
1240+ "registers available for late reg-only & any operands: {}" ,
1241+ self . available_pregs[ OperandPos :: Late ]
1242+ ) ;
12271243
12281244 for ( op_idx, op) in operands. late ( ) {
12291245 if op. kind ( ) == OperandKind :: Def {
0 commit comments