@@ -131,8 +131,8 @@ impl<'tcx> CValue<'tcx> {
131131
132132 match self . 0 {
133133 CValueInner :: ByRef ( ptr, None ) => {
134- let ( a_scalar, b_scalar) = match self . 1 . abi {
135- Abi :: ScalarPair ( a, b) => ( a, b) ,
134+ let ( a_scalar, b_scalar) = match self . 1 . ir_form {
135+ IrForm :: ScalarPair ( a, b) => ( a, b) ,
136136 _ => unreachable ! ( "dyn_star_force_data_on_stack({:?})" , self ) ,
137137 } ;
138138 let b_offset = scalar_pair_calculate_b_offset ( fx. tcx , a_scalar, b_scalar) ;
@@ -164,15 +164,15 @@ impl<'tcx> CValue<'tcx> {
164164 }
165165 }
166166
167- /// Load a value with layout.abi of scalar
167+ /// Load a value with layout.ir_form of scalar
168168 #[ track_caller]
169169 pub ( crate ) fn load_scalar ( self , fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ) -> Value {
170170 let layout = self . 1 ;
171171 match self . 0 {
172172 CValueInner :: ByRef ( ptr, None ) => {
173- let clif_ty = match layout. abi {
174- Abi :: Scalar ( scalar) => scalar_to_clif_type ( fx. tcx , scalar) ,
175- Abi :: Vector { element, count } => scalar_to_clif_type ( fx. tcx , element)
173+ let clif_ty = match layout. ir_form {
174+ IrForm :: Scalar ( scalar) => scalar_to_clif_type ( fx. tcx , scalar) ,
175+ IrForm :: Vector { element, count } => scalar_to_clif_type ( fx. tcx , element)
176176 . by ( u32:: try_from ( count) . unwrap ( ) )
177177 . unwrap ( ) ,
178178 _ => unreachable ! ( "{:?}" , layout. ty) ,
@@ -187,14 +187,14 @@ impl<'tcx> CValue<'tcx> {
187187 }
188188 }
189189
190- /// Load a value pair with layout.abi of scalar pair
190+ /// Load a value pair with layout.ir_form of scalar pair
191191 #[ track_caller]
192192 pub ( crate ) fn load_scalar_pair ( self , fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ) -> ( Value , Value ) {
193193 let layout = self . 1 ;
194194 match self . 0 {
195195 CValueInner :: ByRef ( ptr, None ) => {
196- let ( a_scalar, b_scalar) = match layout. abi {
197- Abi :: ScalarPair ( a, b) => ( a, b) ,
196+ let ( a_scalar, b_scalar) = match layout. ir_form {
197+ IrForm :: ScalarPair ( a, b) => ( a, b) ,
198198 _ => unreachable ! ( "load_scalar_pair({:?})" , self ) ,
199199 } ;
200200 let b_offset = scalar_pair_calculate_b_offset ( fx. tcx , a_scalar, b_scalar) ;
@@ -222,8 +222,8 @@ impl<'tcx> CValue<'tcx> {
222222 let layout = self . 1 ;
223223 match self . 0 {
224224 CValueInner :: ByVal ( _) => unreachable ! ( ) ,
225- CValueInner :: ByValPair ( val1, val2) => match layout. abi {
226- Abi :: ScalarPair ( _, _) => {
225+ CValueInner :: ByValPair ( val1, val2) => match layout. ir_form {
226+ IrForm :: ScalarPair ( _, _) => {
227227 let val = match field. as_u32 ( ) {
228228 0 => val1,
229229 1 => val2,
@@ -232,7 +232,7 @@ impl<'tcx> CValue<'tcx> {
232232 let field_layout = layout. field ( & * fx, usize:: from ( field) ) ;
233233 CValue :: by_val ( val, field_layout)
234234 }
235- _ => unreachable ! ( "value_field for ByValPair with abi {:?}" , layout. abi ) ,
235+ _ => unreachable ! ( "value_field for ByValPair with abi {:?}" , layout. ir_form ) ,
236236 } ,
237237 CValueInner :: ByRef ( ptr, None ) => {
238238 let ( field_ptr, field_layout) = codegen_field ( fx, ptr, None , layout, field) ;
@@ -360,7 +360,7 @@ impl<'tcx> CValue<'tcx> {
360360 pub ( crate ) fn cast_pointer_to ( self , layout : TyAndLayout < ' tcx > ) -> Self {
361361 assert ! ( matches!( self . layout( ) . ty. kind( ) , ty:: Ref ( ..) | ty:: RawPtr ( ..) | ty:: FnPtr ( ..) ) ) ;
362362 assert ! ( matches!( layout. ty. kind( ) , ty:: Ref ( ..) | ty:: RawPtr ( ..) | ty:: FnPtr ( ..) ) ) ;
363- assert_eq ! ( self . layout( ) . abi , layout. abi ) ;
363+ assert_eq ! ( self . layout( ) . ir_form , layout. ir_form ) ;
364364 CValue ( self . 0 , layout)
365365 }
366366}
@@ -609,8 +609,8 @@ impl<'tcx> CPlace<'tcx> {
609609 let dst_layout = self . layout ( ) ;
610610 match self . inner {
611611 CPlaceInner :: Var ( _local, var) => {
612- let data = match from. 1 . abi {
613- Abi :: Scalar ( _) => CValue ( from. 0 , dst_layout) . load_scalar ( fx) ,
612+ let data = match from. 1 . ir_form {
613+ IrForm :: Scalar ( _) => CValue ( from. 0 , dst_layout) . load_scalar ( fx) ,
614614 _ => {
615615 let ( ptr, meta) = from. force_stack ( fx) ;
616616 assert ! ( meta. is_none( ) ) ;
@@ -621,8 +621,8 @@ impl<'tcx> CPlace<'tcx> {
621621 transmute_scalar ( fx, var, data, dst_ty) ;
622622 }
623623 CPlaceInner :: VarPair ( _local, var1, var2) => {
624- let ( data1, data2) = match from. 1 . abi {
625- Abi :: ScalarPair ( _, _) => CValue ( from. 0 , dst_layout) . load_scalar_pair ( fx) ,
624+ let ( data1, data2) = match from. 1 . ir_form {
625+ IrForm :: ScalarPair ( _, _) => CValue ( from. 0 , dst_layout) . load_scalar_pair ( fx) ,
626626 _ => {
627627 let ( ptr, meta) = from. force_stack ( fx) ;
628628 assert ! ( meta. is_none( ) ) ;
@@ -635,7 +635,7 @@ impl<'tcx> CPlace<'tcx> {
635635 }
636636 CPlaceInner :: Addr ( _, Some ( _) ) => bug ! ( "Can't write value to unsized place {:?}" , self ) ,
637637 CPlaceInner :: Addr ( to_ptr, None ) => {
638- if dst_layout. size == Size :: ZERO || dst_layout. abi == Abi :: Uninhabited {
638+ if dst_layout. size == Size :: ZERO || dst_layout. ir_form == IrForm :: Uninhabited {
639639 return ;
640640 }
641641
@@ -646,23 +646,25 @@ impl<'tcx> CPlace<'tcx> {
646646 CValueInner :: ByVal ( val) => {
647647 to_ptr. store ( fx, val, flags) ;
648648 }
649- CValueInner :: ByValPair ( val1, val2) => match from. layout ( ) . abi {
650- Abi :: ScalarPair ( a_scalar, b_scalar) => {
649+ CValueInner :: ByValPair ( val1, val2) => match from. layout ( ) . ir_form {
650+ IrForm :: ScalarPair ( a_scalar, b_scalar) => {
651651 let b_offset =
652652 scalar_pair_calculate_b_offset ( fx. tcx , a_scalar, b_scalar) ;
653653 to_ptr. store ( fx, val1, flags) ;
654654 to_ptr. offset ( fx, b_offset) . store ( fx, val2, flags) ;
655655 }
656- _ => bug ! ( "Non ScalarPair abi {:?} for ByValPair CValue" , dst_layout. abi) ,
656+ _ => {
657+ bug ! ( "Non ScalarPair abi {:?} for ByValPair CValue" , dst_layout. ir_form)
658+ }
657659 } ,
658660 CValueInner :: ByRef ( from_ptr, None ) => {
659- match from. layout ( ) . abi {
660- Abi :: Scalar ( _) => {
661+ match from. layout ( ) . ir_form {
662+ IrForm :: Scalar ( _) => {
661663 let val = from. load_scalar ( fx) ;
662664 to_ptr. store ( fx, val, flags) ;
663665 return ;
664666 }
665- Abi :: ScalarPair ( a_scalar, b_scalar) => {
667+ IrForm :: ScalarPair ( a_scalar, b_scalar) => {
666668 let b_offset =
667669 scalar_pair_calculate_b_offset ( fx. tcx , a_scalar, b_scalar) ;
668670 let ( val1, val2) = from. load_scalar_pair ( fx) ;
0 commit comments