question: private void processPhiInsn ( PhiInsn insn ) { RegisterSpec result = insn . getResult ( ) ; int resultReg = result . getReg ( ) ; int category = result . getCategory ( ) ; RegisterSpecList sources = insn . getSources ( ) ; int sourcesSize = sources . size ( ) ; ArrayList < RegisterSpec > ssaRegs = new ArrayList < RegisterSpec > ( ) ; Multiset mapSet = new Multiset ( sourcesSize + 1 ) ; if ( ssaRegsMapped . get ( resultReg ) ) { mapSet . add ( mapper . oldToNew ( resultReg ) ) ; } else { ssaRegs . add ( result ) ; } for ( int i = 0 ; i < sourcesSize ; i ++ ) { RegisterSpec source = sources . get ( i ) ; SsaInsn def = ssaMeth . getDefinitionForRegister ( source . getReg ( ) ) ; RegisterSpec sourceDef = def . getResult ( ) ; int sourceReg = sourceDef . getReg ( ) ; if ( ssaRegsMapped . get ( sourceReg ) ) { mapSet . add ( mapper . oldToNew ( sourceReg ) ) ; } else { ssaRegs . add ( sourceDef ) ; } } for ( int i = 0 ; i < mapSet . getSize ( ) ; i ++ ) { int maxReg = mapSet . getAndRemoveHighestCount ( ) ; tryMapRegs ( ssaRegs , maxReg , category , false ) ; } int mapReg = findNextUnreservedRopReg ( paramRangeEnd , category ) ; while ( ! tryMapRegs ( ssaRegs , mapReg , category , false ) ) { mapReg = findNextUnreservedRopReg ( mapReg + 1 , category ) ; } }
target:  Attempts to map the sources and result of a phi to a common register. Will try existing mappings first, from most to least common. If none of the registers have mappings yet, a new mapping is created.