@@ -366,25 +366,8 @@ impl CheckerState {
366366 }
367367 }
368368
369- fn initial_with_pinned_vregs < F : Function > ( f : & F ) -> CheckerState {
370- // Scan the function, looking for all vregs that are pinned
371- // vregs, gathering them with their PRegs.
372- let mut pinned_vregs: FxHashMap < VReg , PReg > = FxHashMap :: default ( ) ;
373- visit_all_vregs ( f, |vreg : VReg | {
374- if let Some ( preg) = f. is_pinned_vreg ( vreg) {
375- pinned_vregs. insert ( vreg, preg) ;
376- }
377- } ) ;
378-
379- let mut allocs = FxHashMap :: default ( ) ;
380- for ( vreg, preg) in pinned_vregs {
381- allocs. insert (
382- Allocation :: reg ( preg) ,
383- CheckerValue :: VRegs ( std:: iter:: once ( vreg) . collect ( ) ) ,
384- ) ;
385- }
386-
387- CheckerState :: Allocations ( allocs)
369+ fn initial ( ) -> Self {
370+ CheckerState :: Allocations ( FxHashMap :: default ( ) )
388371 }
389372}
390373
@@ -857,7 +840,7 @@ impl<'a, F: Function> Checker<'a, F> {
857840 reftyped_vregs. insert ( vreg) ;
858841 }
859842
860- bb_in. insert ( f. entry_block ( ) , CheckerState :: initial_with_pinned_vregs ( f ) ) ;
843+ bb_in. insert ( f. entry_block ( ) , CheckerState :: default ( ) ) ;
861844
862845 let mut stack_pregs = PRegSet :: empty ( ) ;
863846 for & preg in & machine_env. fixed_stack_slots {
@@ -932,21 +915,11 @@ impl<'a, F: Function> Checker<'a, F> {
932915 // move/edit framework, so we don't get allocs for these moves
933916 // in the post-regalloc output, and the embedder is not
934917 // supposed to emit the moves. But we *do* want to check the
935- // semantic implications, namely definition of new vregs and,
936- // for moves to/from pinned vregs, the implied register
937- // constraints. So we emit `ProgramMove` ops that do just
938- // this.
918+ // semantic implications, namely definition of new vregs. So
919+ // we emit `ProgramMove` ops that do just this.
939920 if let Some ( ( src, dst) ) = self . f . is_move ( inst) {
940- let src_preg = self . f . is_pinned_vreg ( src. vreg ( ) ) ;
941- let src_op = match src_preg {
942- Some ( preg) => Operand :: reg_fixed_use ( src. vreg ( ) , preg) ,
943- None => Operand :: any_use ( src. vreg ( ) ) ,
944- } ;
945- let dst_preg = self . f . is_pinned_vreg ( dst. vreg ( ) ) ;
946- let dst_op = match dst_preg {
947- Some ( preg) => Operand :: reg_fixed_def ( dst. vreg ( ) , preg) ,
948- None => Operand :: any_def ( dst. vreg ( ) ) ,
949- } ;
921+ let src_op = Operand :: any_use ( src. vreg ( ) ) ;
922+ let dst_op = Operand :: any_def ( dst. vreg ( ) ) ;
950923 let checkinst = CheckerInst :: ProgramMove {
951924 inst,
952925 src : src_op,
0 commit comments