<s> assert ( RBGPR . covers ( * TRI . getRegClass ( <STR_LIT> ) ) && <STR_LIT> ) ; assert ( RBGPR . covers ( * TRI . getRegClass ( <STR_LIT> ) ) && <STR_LIT> ) ; assert ( RBGPR . covers ( * TRI . getRegClass ( <STR_LIT> ) ) && <STR_LIT> ) ; assert ( RBGPR . covers ( * TRI . getRegClass ( <STR_LIT> ) ) && <STR_LIT> ) ; assert ( RBGPR . getSize ( ) == <NUM_LIT> && <STR_LIT> ) ; <STR_LIT> (


<s> assert ( checkPartMapping ( PartMappings [ PMI_SPR - PMI_Min ] , <NUM_LIT> , <NUM_LIT> , FPRRegBankID ) && <STR_LIT> ) ; assert ( checkPartMapping ( PartMappings [ PMI_DPR - PMI_Min ] , <NUM_LIT> , <NUM_LIT> , FPRRegBankID


<s> static bool checkPartMapping ( const RegisterBankInfo :: PartialMapping & PM , unsigned Start

, unsigned Length , unsigned RegBankID ) {


<s> static bool checkValueMapping ( const RegisterBankInfo :: ValueMapping & VM , RegisterBankInfo :: PartialMapping * BreakDown ) { return VM . NumBreakDowns == <NUM_LIT>


<s> assert ( checkValueMapping ( ValueMappings [ DPR3OpsIdx ] , & PartMappings [ PMI_DPR - PMI_Min ] ) && <STR_LIT> ) ; assert ( checkValueMapping ( ValueMappings [ DPR3OpsIdx + <NUM_LIT> ] , & PartMappings [ PMI_DPR - PMI_Min ] ) && <STR_LIT> ) ; assert ( checkValueMapping ( ValueMappings [ DPR3OpsIdx + <NUM_LIT> ] , & PartMappings [


<s> static void checkValueMappings ( ) { assert ( checkValueMapping ( ValueMappings [ GPR3OpsIdx ] , & PartMappings [ PMI_GPR - PMI_Min ] ) && <STR_LIT> ) ; assert ( checkValueMapping ( ValueMappings [ GPR3OpsIdx + <NUM_LIT> ] , & PartMappings [ PMI_GPR - PMI_Min ] ) && <STR_LIT> ) ; assert ( checkValueMapping ( ValueMappings [ GPR3OpsIdx + <NUM_LIT> ] , & PartMappings [ PMI_GPR - PMI_Min ] ) && <STR_LIT> ) ; assert ( checkValueMapping ( ValueMappings [ SPR3OpsIdx ] , & PartMappings [


<s> case GPRwithAPSRRegClassID : case GPRnopcRegClassID : case rGPRRegClassID : case GPRspRegClassID : case tGPR_and_tcGPRRegClassID : case tcGPRRegClassID : case tGPRRegClassID : return getRegBank ( <STR_LIT> ) ; case HPRRegClassID : case SPR_8RegClassID : case SPRRegClassID : case DPR_8RegClassID : case DPRRegClassID : case QPRRegClassID : return getRegBank ( <STR_LIT> ) ; default : llvm_unreachable ( <STR_LIT>


<s> NumBits = <NUM_LIT> ; Scale = <NUM_LIT> ; Chunk = ( ( <NUM_LIT> << NumBits ) - <NUM_LIT> ) * Scale ; } NumMIs += Bytes / Chunk ; if ( ( Bytes % Chunk ) != <NUM_LIT> ) NumMIs ++ ; if ( ExtraOpc )


<s> if ( Amount != <NUM_LIT> ) { <ISA_LIT>FunctionInfo * AFI = MF . getInfo < <ISA_LIT>FunctionInfo > ( ) ; unsigned Align = MF . getTarget ( ) . getFrameInfo ( ) -> getStackAlignment ( ) ; Amount = ( Amount + Align - <NUM_LIT> ) / Align * Align ; unsigned Opc = Old -> getOpcode ( ) ; bool isThumb = AFI -> isThumbFunction ( ) ; <STR_LIT> Pred = isThumb ? <STR_LIT> : ( <STR_LIT> ) Old -> getOperand ( <NUM_LIT> ) . getImm ( ) ; if ( Opc == <STR_LIT> || Opc == <STR_LIT> ) { unsigned PredReg = isThumb ? <NUM_LIT> : Old -> getOperand ( <NUM_LIT> ) .


<s> MachineInstr * Old = I ; DebugLoc dl = Old -> getDebugLoc ( ) ; unsigned Amount = Old -> getOperand ( <NUM_LIT> ) . getImm ( ) ; if ( Amount != <NUM_LIT> ) { <ISA_LIT>FunctionInfo * AFI = MF . getInfo < <ISA_LIT>FunctionInfo > ( ) ; unsigned Align = MF . getTarget ( ) . getFrameInfo ( ) -> getStackAlignment ( ) ; Amount = ( Amount + Align - <NUM_LIT> ) / Align * Align ; unsigned Opc = Old -> getOpcode ( ) ; bool isThumb = AFI -> isThumbFunction ( ) ; <STR_LIT> Pred = isThumb ? <STR_LIT> : ( <STR_LIT> ) Old -> getOperand ( <NUM_LIT> ) . getImm ( ) ; if ( Opc == <STR_LIT> ||


<s> void <ISA_LIT>RegisterInfo :: emitLoadConstPool ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator & MBBI , unsigned DestReg , int Val , unsigned Pred , unsigned PredReg , const TargetInstrInfo * TII , bool isThumb , DebugLoc dl ) const { MachineFunction & MF = * MBB . getParent ( ) ; MachineConstantPool * ConstantPool = MF . getConstantPool ( ) ; Constant * C = ConstantInt :: get ( Type :: Int32Ty , Val ) ; unsigned Idx = ConstantPool -> getConstantPoolIndex ( C , <NUM_LIT> ) ; if ( isThumb ) BuildMI ( MBB , MBBI , dl , TII -> get ( <STR_LIT> ) , DestReg ) . addConstantPoolIndex ( Idx ) ; else BuildMI ( MBB , MBBI , dl , TII -> get ( <STR_LIT> ) , DestReg ) . addConstantPoolIndex ( Idx )

. addReg ( <NUM_LIT> ) . addImm ( <NUM_LIT> ) . addImm ( Pred ) . addReg ( PredReg ) ;


<s> if ( Reg == FramePtr ) FramePtrSpillFI = FI ; AFI -> addGPRCalleeSavedArea1Frame ( FI ) ; GPRCS1Size += <NUM_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( Reg == FramePtr ) FramePtrSpillFI = FI ; if ( STI . isTargetDarwin ( ) ) { AFI -> addGPRCalleeSavedArea2Frame ( FI ) ; GPRCS2Size += <NUM_LIT> ; } else { AFI -> addGPRCalleeSavedArea1Frame ( FI ) ; GPRCS1Size += <NUM_LIT> ; } break ; default : AFI -> addDPRCalleeSavedAreaFrame ( FI ) ; DPRCSSize += <NUM_LIT> ; } } if ( ! isThumb ) { emitSPUpdate ( MBB , MBBI , - GPRCS1Size , <STR_LIT> , <NUM_LIT> , isThumb , TII , * this , dl ) ; movePastCSLoadStoreOps ( MBB , MBBI , <STR_LIT> , <NUM_LIT> , STI ) ; } else if ( MBBI != MBB . end ( ) && MBBI -> getOpcode ( ) == <STR_LIT> ) { ++ MBBI ; if ( MBBI != MBB . end ( ) ) dl = MBBI -> getDebugLoc ( ) ; } if ( STI . isTargetDarwin ( ) || hasFP ( MF ) ) { MachineInstrBuilder MIB = BuildMI ( MBB , MBBI , dl , TII . get ( isThumb ? <STR_LIT> : <STR_LIT> ) , FramePtr ) . addFrameIndex ( FramePtrSpillFI ) . addImm ( <NUM_LIT> ) ; if ( ! isThumb ) AddDefaultCC ( AddDefaultPred ( MIB ) ) ; } if ( ! isThumb ) { emitSPUpdate ( MBB , MBBI , - GPRCS2Size , <STR_LIT> , <NUM_LIT> , false , TII , * this , dl ) ; movePastCSLoadStoreOps ( MBB , MBBI , <STR_LIT> , <NUM_LIT> , STI ) ; emitSPUpdate ( MBB , MBBI , - DPRCSSize , <STR_LIT> , <NUM_LIT> , false , TII , * this , dl ) ; } unsigned DPRCSOffset = NumBytes - ( GPRCS1Size + GPRCS2Size + DPRCSSize ) ; unsigned GPRCS2Offset = DPRCSOffset +


<s> static void emitSPUpdate ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator & MBBI , int NumBytes , <STR_LIT> Pred , unsigned PredReg , bool isThumb , const TargetInstrInfo & TII , const <ISA_LIT>RegisterInfo & MRI , DebugLoc dl ) { if ( isThumb ) emitThumbRegPlusImmediate ( MBB , MBBI , <STR_LIT> , <STR_LIT> , NumBytes , TII , MRI , dl ) ; else emit<ISA_LIT>RegPlusImmediate ( MBB , MBBI , <STR_LIT> , <STR_LIT> , NumBytes ,


<s> int Chunk = ( <NUM_LIT> << <NUM_LIT> ) - <NUM_LIT> ; int ThisVal = ( Imm > Chunk ) ? Chunk : Imm ; Imm -= ThisVal ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> )


<s> NumBytes = - NumBytes ; } unsigned LdReg = DestReg ; if ( DestReg == <STR_LIT> ) { assert ( BaseReg == <STR_LIT> && <STR_LIT> ) ; LdReg = <STR_LIT> ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> , false , false , true ) ; } if ( NumBytes <= <NUM_LIT> && NumBytes >= <NUM_LIT> ) BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addImm ( NumBytes ) ; else if ( NumBytes < <NUM_LIT> && NumBytes >= - <NUM_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addImm ( NumBytes ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addReg ( LdReg , false , false , true ) ; } else MRI . emitLoadConstPool ( MBB , MBBI , LdReg , NumBytes , <STR_LIT> , <NUM_LIT> , & TII , true , dl ) ; int Opc = ( isSub ) ? <STR_LIT> : ( isHigh ? <STR_LIT> : <STR_LIT> ) ; const MachineInstrBuilder MIB = BuildMI ( MBB , MBBI , dl , TII . get ( Opc ) , DestReg ) ; if ( DestReg == <STR_LIT> || isSub ) MIB . addReg ( BaseReg ) . addReg ( LdReg , false , false , true ) ; else MIB . addReg ( LdReg ) . addReg ( BaseReg , false ,


<s> static void emitThumbRegPlusImmInReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator & MBBI , unsigned DestReg , unsigned BaseReg , int NumBytes , bool CanChangeCC , const TargetInstrInfo & TII , const <ISA_LIT>RegisterInfo & MRI , DebugLoc dl ) { bool isHigh = ! MRI . isLowRegister ( DestReg ) || ( BaseReg != <NUM_LIT> && ! MRI . isLowRegister ( BaseReg ) ) ; bool isSub = false ; if ( NumBytes < <NUM_LIT> && ! isHigh && CanChangeCC ) { isSub = true ; NumBytes = - NumBytes ; } unsigned LdReg = DestReg ; if ( DestReg == <STR_LIT> ) { assert ( BaseReg == <STR_LIT> && <STR_LIT> ) ; LdReg = <STR_LIT> ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> , false , false , true ) ; } if ( NumBytes <= <NUM_LIT> && NumBytes >= <NUM_LIT> ) BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addImm ( NumBytes ) ; else if ( NumBytes < <NUM_LIT> && NumBytes >= - <NUM_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addImm ( NumBytes ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addReg ( LdReg , false , false , true ) ; } else MRI . emitLoadConstPool ( MBB , MBBI , LdReg , NumBytes , <STR_LIT> , <NUM_LIT> , & TII , true , dl ) ; int Opc = ( isSub ) ? <STR_LIT> : ( isHigh ? <STR_LIT> : <STR_LIT> ) ; const MachineInstrBuilder MIB = BuildMI ( MBB , MBBI , dl ,


<s> & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT>

, & <STR_LIT> , & <STR_LIT> , <NUM_LIT> } ;


<s> return <ISA_LIT>GenRegisterInfo :: getDwarfRegNumFull ( RegNum ,


<s> return <ISA_LIT>GenRegisterInfo :: getDwarfRegNumFull (


<s> unsigned <ISA_LIT>RegisterInfo :: getEHExceptionRegister ( ) const { assert ( <NUM_LIT> && <STR_LIT> ) ; return <NUM_LIT>


<s> assert ( <NUM_LIT> && <STR_LIT> ) ; return <NUM_LIT>


<s> if ( STI . isTargetDarwin ( ) || hasFP ( MF ) ) return ( STI . useThumbBacktraces ( ) || STI

. isThumb ( ) ) ? <STR_LIT> : <STR_LIT> ;


<s> if ( STI . isTargetDarwin ( ) || hasFP ( MF ) ) return ( STI . useThumbBacktraces ( ) || STI . isThumb ( ) ) ? <STR_LIT> : <STR_LIT> ; else return <STR_LIT>


<s> const TargetRegisterClass * <ISA_LIT>RegisterInfo :: getPointerRegClass ( )


<s> unsigned <ISA_LIT>RegisterInfo :: getRARegister ( )


<s> const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; return NoFramePointerElim || MFI ->


<s> return ( ( MI -> getOpcode ( ) == <STR_LIT> || MI -> getOpcode ( ) == <STR_LIT> || MI -> getOpcode ( ) == <STR_LIT> ) && MI -> getOperand (

<NUM_LIT> ) . isFI ( ) && isCalleeSavedRegister ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) , CSRegs ) ) ;


<s> bool <ISA_LIT>RegisterInfo :: isLowRegister ( unsigned Reg ) const { using namespace <ISA_LIT> ; switch ( Reg ) { case R0 : case R1 : case R2 : case R3 : case R4 : case R5 :


<s> const <ISA_LIT>FunctionInfo * AFI = MF . getInfo < <ISA_LIT>FunctionInfo > ( ) ; return ThumbRegScavenging || ! AFI -> isThumbFunction


<s> if ( isSub ) NumBytes = - NumBytes ; while ( NumBytes ) { unsigned RotAmt = <STR_LIT> ( NumBytes ) ; unsigned ThisVal = NumBytes & <STR_LIT> ( <NUM_LIT> , RotAmt ) ; assert ( ThisVal && <STR_LIT> ) ; NumBytes &= ~ ThisVal ; int SOImmVal = <STR_LIT> ( ThisVal ) ; assert ( SOImmVal != - <NUM_LIT> && <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( isSub ? <STR_LIT> : <STR_LIT> ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) . addImm ( SOImmVal ) . addImm ( ( unsigned ) Pred ) . addReg ( PredReg ) . addReg ( <NUM_LIT> ) ; BaseReg = DestReg


<s> static void emit<ISA_LIT>RegPlusImmediate ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator & MBBI , unsigned DestReg , unsigned BaseReg , int NumBytes , <STR_LIT> Pred , unsigned PredReg , const TargetInstrInfo & TII , DebugLoc dl ) { bool isSub = NumBytes < <NUM_LIT> ; if ( isSub ) NumBytes = - NumBytes ; while ( NumBytes ) { unsigned RotAmt = <STR_LIT> ( NumBytes ) ; unsigned ThisVal = NumBytes & <STR_LIT> ( <NUM_LIT> , RotAmt ) ; assert ( ThisVal && <STR_LIT> ) ; NumBytes &= ~ ThisVal ; int SOImmVal = <STR_LIT> ( ThisVal ) ; assert ( SOImmVal != - <NUM_LIT>


<s> unsigned VARegSaveSize = AFI -> getVarArgsRegSaveSize ( ) ; int NumBytes = ( int ) MFI -> getStackSize ( ) ; if ( ! AFI -> hasStackFrame ( ) ) { if ( NumBytes != <NUM_LIT> ) emitSPUpdate ( MBB , MBBI , NumBytes , <STR_LIT> , <NUM_LIT> , isThumb , TII , * this , dl ) ; } else { const unsigned * CSRegs = getCalleeSavedRegs ( ) ; if ( MBBI != MBB . begin ( ) ) { do -- MBBI ; while ( MBBI != MBB . begin ( ) && isCSRestore ( MBBI , CSRegs ) ) ; if ( ! isCSRestore ( MBBI , CSRegs ) ) ++ MBBI ; } NumBytes -= ( AFI -> getGPRCalleeSavedArea1Size ( ) + AFI -> getGPRCalleeSavedArea2Size ( ) + AFI -> getDPRCalleeSavedAreaSize ( ) ) ; if ( isThumb ) { if ( hasFP ( MF ) ) { NumBytes = AFI -> getFramePtrSpillOffset ( ) - NumBytes ; if ( NumBytes ) emitThumbRegPlusImmediate ( MBB , MBBI , <STR_LIT> , FramePtr , - NumBytes , TII , * this , dl ) ; else BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( FramePtr ) ; } else { if ( MBBI -> getOpcode ( ) == <STR_LIT> && & MBB . front ( ) != MBBI && prior ( MBBI ) -> getOpcode ( ) == <STR_LIT> ) { MachineBasicBlock :: iterator PMBBI = prior ( MBBI ) ; emitSPUpdate ( MBB , PMBBI , NumBytes , <STR_LIT> , <NUM_LIT> , isThumb , TII , * this , dl ) ; } else emitSPUpdate ( MBB , MBBI , NumBytes , <STR_LIT> , <NUM_LIT> , isThumb , TII , * this , dl ) ; } } else { if ( ( STI . isTargetDarwin ( ) && NumBytes ) || hasFP ( MF ) ) { NumBytes = AFI -> getFramePtrSpillOffset ( ) - NumBytes ; if ( AFI -> getGPRCalleeSavedArea2Size ( ) || AFI -> getDPRCalleeSavedAreaSize ( ) || AFI -> getDPRCalleeSavedAreaOffset ( ) || hasFP ( MF ) ) { if ( NumBytes ) BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( FramePtr ) . addImm ( NumBytes ) . addImm ( ( unsigned ) <STR_LIT> ) . addReg ( <NUM_LIT> ) . addReg ( <NUM_LIT> ) ; else BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( FramePtr ) . addImm ( ( unsigned ) <STR_LIT> ) . addReg ( <NUM_LIT> ) . addReg ( <NUM_LIT> ) ; } } else if ( NumBytes ) { emitSPUpdate ( MBB , MBBI , NumBytes , <STR_LIT> , <NUM_LIT> , false


<s> static void emitThumbConstant ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator & MBBI , unsigned DestReg , int Imm , const TargetInstrInfo & TII , const <ISA_LIT>RegisterInfo & MRI , DebugLoc dl ) { bool isSub = Imm < <NUM_LIT> ; if ( isSub ) Imm = - Imm ; int Chunk = ( <NUM_LIT> << <NUM_LIT> )


<s> } else { if ( DestReg != BaseReg ) DstNotEqBase = true ; NumBits = <NUM_LIT> ; Opc = isSub ? <STR_LIT> : <STR_LIT> ; isTwoAddr = true ; } unsigned NumMIs = calcNumMI ( Opc , ExtraOpc , Bytes , NumBits , Scale ) ; unsigned Threshold = ( DestReg == <STR_LIT> ) ? <NUM_LIT> : <NUM_LIT> ; if ( NumMIs > Threshold ) { emitThumbRegPlusImmInReg ( MBB , MBBI , DestReg , BaseReg , NumBytes , true , TII , MRI , dl ) ; return ; } if ( DstNotEqBase ) { if ( MRI . isLowRegister ( DestReg ) && MRI . isLowRegister ( BaseReg ) ) { unsigned Chunk = ( <NUM_LIT> << <NUM_LIT> ) - <NUM_LIT> ; unsigned ThisVal = ( Bytes > Chunk ) ? Chunk : Bytes ; Bytes -= ThisVal ; BuildMI ( MBB , MBBI , dl , TII . get ( isSub ? <STR_LIT> : <STR_LIT> ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) . addImm ( ThisVal ) ; } else { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) ; } BaseReg = DestReg ; } unsigned Chunk = ( ( <NUM_LIT> << NumBits ) - <NUM_LIT> ) * Scale ; while ( Bytes ) { unsigned ThisVal = ( Bytes > Chunk ) ? Chunk : Bytes ; Bytes -= ThisVal ; ThisVal /=


<s> NumBits = <NUM_LIT> ; Scale = <NUM_LIT> ; Opc = isSub ? <STR_LIT> : <STR_LIT> ; isTwoAddr = true ; } else if ( ! isSub && BaseReg == <STR_LIT> ) { if ( ! isMul4 ) { Bytes &= ~ <NUM_LIT> ; ExtraOpc = <STR_LIT> ; } NumBits = <NUM_LIT> ; Scale = <NUM_LIT> ; Opc = <STR_LIT> ; } else { if ( DestReg != BaseReg ) DstNotEqBase = true ; NumBits = <NUM_LIT> ; Opc = isSub ? <STR_LIT> : <STR_LIT> ; isTwoAddr = true ; } unsigned NumMIs = calcNumMI ( Opc , ExtraOpc , Bytes , NumBits , Scale ) ; unsigned Threshold = ( DestReg == <STR_LIT> ) ? <NUM_LIT> : <NUM_LIT> ; if ( NumMIs > Threshold ) { emitThumbRegPlusImmInReg ( MBB , MBBI , DestReg , BaseReg , NumBytes , true , TII , MRI , dl ) ; return ; } if ( DstNotEqBase ) { if ( MRI . isLowRegister ( DestReg ) && MRI . isLowRegister ( BaseReg ) ) { unsigned Chunk = ( <NUM_LIT> << <NUM_LIT> ) - <NUM_LIT> ; unsigned ThisVal = ( Bytes > Chunk ) ? Chunk : Bytes ; Bytes -= ThisVal ; BuildMI ( MBB , MBBI , dl , TII . get ( isSub ? <STR_LIT> : <STR_LIT> ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) . addImm ( ThisVal ) ; } else { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) ; } BaseReg =


<s> bool isHigh = ! MRI . isLowRegister ( DestReg ) || ( BaseReg != <NUM_LIT> && ! MRI . isLowRegister ( BaseReg ) ) ; bool isSub = false ; if ( NumBytes < <NUM_LIT> && ! isHigh && CanChangeCC ) { isSub = true ; NumBytes = - NumBytes ; } unsigned LdReg = DestReg ; if ( DestReg == <STR_LIT> ) { assert ( BaseReg == <STR_LIT> && <STR_LIT> ) ; LdReg = <STR_LIT> ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) ; } if ( NumBytes <= <NUM_LIT> && NumBytes >= <NUM_LIT> ) BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , LdReg ) . addImm ( NumBytes ) ; else if ( NumBytes < <NUM_LIT> && NumBytes >=


<s> unsigned Reg = RS ? RS -> FindUnusedReg ( RC , true ) : ( unsigned ) <STR_LIT> ; assert ( ! AFI ->


<s> & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , <NUM_LIT> } ; static const TargetRegisterClass * const ThumbCalleeSavedRegClasses [ ] = { & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> , & <STR_LIT> ,


<s> void <ISA_LIT>Relocator :: addCopyReloc ( ResolveInfo & pSym ) { Relocation & rel_entry = * getTarget ( ) . getRelDyn ( ) . create ( ) ; rel_entry . setType ( llvm :: ELF


<s> void <ISA_LIT>Relocator :: applyDebugStringOffset ( Relocation &


<s> Relocation :: Type type = pRelocation . type ( ) ; if ( type > <NUM_LIT> ) { return Relocator ::


<s> return Relocator :: Unknown ; } return ApplyFunctions [ type ] . func


<s> pReloc . target ( ) = pReloc . symValue ( ) +


<s> ELFFileFormat * file_format = getTarget ( ) . getOutputFormat ( ) ; if ( ResolveInfo :: ThreadLocal == pSym . type ( ) ) bss_sect_hdr = & file_format -> getTBSS ( ) ; else bss_sect_hdr = & file_format -> getBSS ( ) ; SectionData * bss_data = NULL ; if ( bss_sect_hdr -> hasSectionData ( ) ) bss_data = bss_sect_hdr -> getSectionData ( ) ; else bss_data = IRBuilder :: CreateSectionData ( * bss_sect_hdr ) ; uint32_t addralign = config ( ) . targets ( ) . bitclass ( ) / <NUM_LIT> ; Fragment * frag = new FillFragment ( <NUM_LIT> , <NUM_LIT> , pSym . size ( ) ) ; uint64_t size = ObjectBuilder :: AppendFragment ( * frag , * bss_data , addralign ) ; bss_sect_hdr -> setSize ( bss_sect_hdr -> size


<s> uint32_t <ISA_LIT>Relocator :: getDebugStringOffset ( Relocation & pReloc ) const { if ( pReloc . type ( ) != llvm :: ELF :: R_<ISA_LIT>_ABS32 ) error ( diag :: unsupport_reloc_for_debug_string ) << getName ( pReloc . type ( ) ) << <STR_LIT> ; if ( pReloc . symInfo ( ) -> type ( ) == ResolveInfo :: Section ) return

pReloc . target ( ) + pReloc . addend ( ) ;


<s> const char * <ISA_LIT>Relocator :: getName ( Relocator :: Type pType ) const { return ApplyFunctions [ pType ]


<s> Relocator :: Size <ISA_LIT>Relocator :: getSize ( Relocation ::


<s> Relocator :: Size <ISA_LIT>Relocator :: getSize ( Relocation :: Type pType ) const { return <NUM_LIT>


<s> Relocator :: DWord thumbBit = ( ( ! pReloc . symInfo ( ) -> isUndef ( ) || pReloc . symInfo ( ) -> isDyn ( ) ) && ( pReloc . symInfo ( ) -> type ( ) ==

ResolveInfo :: Function ) && ( ( pReloc . symValue ( ) & <NUM_LIT> ) != <NUM_LIT> ) ) ? <NUM_LIT> : <NUM_LIT> ;


<s> static Relocator :: DWord getThumbBit ( const Relocation & pReloc ) { Relocator :: DWord thumbBit = ( ( ! pReloc . symInfo ( ) -> isUndef ( ) || pReloc . symInfo ( ) -> isDyn ( ) ) && ( pReloc . symInfo ( ) -> type ( ) == ResolveInfo :: Function ) && ( ( pReloc . symValue ( ) & <NUM_LIT> ) != <NUM_LIT> ) ) ? <NUM_LIT> : <NUM_LIT> ; return


<s> <ISA_LIT>Relocator :: Result gotoff32 ( Relocation & pReloc , <ISA_LIT>Relocator & pParent ) { Relocator :: DWord T = getThumbBit ( pReloc ) ; Relocator :: DWord A = pReloc . target ( ) + pReloc . addend ( ) ; Relocator :: Address GOT_ORG = helper_GOT_ORG ( pParent ) ; Relocator :: Address S = pReloc . symValue ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; pReloc . target ( ) = ( ( S +


<s> if ( ! ( pReloc . symInfo ( ) -> reserved ( ) & <ISA_LIT>Relocator :: ReserveGOT ) ) return Relocator :: BadReloc ; Relocator :: Address GOT_S = helper_get_GOT_address ( * pReloc . symInfo ( ) , pParent ) ; Relocator :: DWord A = pReloc . target ( ) + pReloc .


<s> int32_t max = ( <NUM_LIT> << ( bits - <NUM_LIT> ) ) - <NUM_LIT> ; int32_t min = - ( <NUM_LIT> << ( bits


<s> static inline void helper_clear_thumb_bit ( Relocator :: DWord &


<s> return helper_sign_extend ( ( ( ( pTarget >> <NUM_LIT> ) ) & <NUM_LIT> ) |


<s> return helper_sign_extend ( ( ( ( pValue >> <NUM_LIT> ) & <NUM_LIT> ) | ( ( pValue >> <NUM_LIT> ) & <NUM_LIT> )

| ( ( pValue >> <NUM_LIT> ) & <NUM_LIT> ) | ( pValue & <NUM_LIT> ) ) , <NUM_LIT> ) ;


<s> return helper_sign_extend ( ( ( ( pValue >> <NUM_LIT> ) & <NUM_LIT> ) | ( ( pValue >> <NUM_LIT> ) & <NUM_LIT> ) | ( ( pValue >> <NUM_LIT> ) & <NUM_LIT>

) | ( pValue & <NUM_LIT> ) ) , <NUM_LIT> ) ;


<s> return pParent . getTarget ( ) . getGOT ( ) . addr


<s> pTarget &= <NUM_LIT> ; pTarget |= pImm & <NUM_LIT> ; pTarget |= ( pImm & <NUM_LIT> ) << <NUM_LIT> ; return pTarget


<s> pValue |= ( pImm & <NUM_LIT> ) << <NUM_LIT> ; pValue |= ( pImm & <NUM_LIT> ) << <NUM_LIT> ; pValue |= ( pImm & <NUM_LIT>


<s> static Relocator :: DWord helper_insert_val_thumb_movw_movt_inst ( Relocator :: DWord pValue , Relocator :: DWord pImm ) { pValue &= <NUM_LIT> ; pValue |= ( pImm &


<s> assert ( pParent . getSymGOTPLTMap ( ) . lookUp ( * rsym ) == NULL && <STR_LIT> ) ; <ISA_LIT>GOTEntry * gotplt_entry = ld_backend . getGOT ( ) . createGOTPLT ( ) ; pParent . getSymGOTPLTMap ( ) . record ( * rsym , * gotplt_entry ) ; Relocation & rel_entry = * ld_backend . getRelPLT ( ) . create ( ) ; rel_entry . setType ( llvm ::


<s> if ( pOri_width == <NUM_LIT> ) return pVal ; uint64_t mask = ( ~ ( ( uint64_t ) <NUM_LIT> ) ) >> ( <NUM_LIT> - pOri_width ) ; pVal &= mask ; uint64_t sign_bit = <NUM_LIT> << ( pOri_width - <NUM_LIT> ) ; return ( pVal ^ sign_bit ) -


<s> Relocator :: DWord s = ( pUpper16 & ( <NUM_LIT> << <NUM_LIT> ) ) >> <NUM_LIT> , u = pUpper16 & <NUM_LIT> , l = pLower16 & <NUM_LIT> , j1 = ( pLower16 & ( <NUM_LIT> << <NUM_LIT> ) ) >> <NUM_LIT>

, j2 = ( pLower16 & ( <NUM_LIT> << <NUM_LIT> ) ) >> <NUM_LIT> ;


<s> return ( pUpper16 & ~ <NUM_LIT> ) | ( ( pOffset >>

<NUM_LIT> ) & <NUM_LIT> ) | ( sign << <NUM_LIT> ) ;


<s> uint32_t j2 = ( pOffset & <NUM_LIT> ) >> <NUM_LIT> ; uint32_t j1 = ( pOffset & <NUM_LIT> ) >>


<s> uint32_t j1 = ( pOffset & <NUM_LIT> ) >> <NUM_LIT> ; uint32_t lo = ( pOffset & <NUM_LIT>


<s> static Relocator :: DWord helper_thumb32_cond_branch_offset ( Relocator :: DWord pUpper16 , Relocator :: DWord pLower16 ) { uint32_t s = ( pUpper16 & <NUM_LIT> ) >> <NUM_LIT> ; uint32_t j1 = ( pLower16 & <NUM_LIT> ) >> <NUM_LIT> ; uint32_t j2 = ( pLower16 & <NUM_LIT> ) >> <NUM_LIT> ; uint32_t lower = ( pLower16 & <NUM_LIT> ) ; uint32_t upper = ( s << <NUM_LIT> ) | ( j2 << <NUM_LIT>


<s> if ( pSym . isDyn ( ) || pSym . isUndef ( ) || pFactory . getTarget ( ) . isSymbolPreemptible ( pSym ) ) return false ; return true


<s> case llvm :: ELF :: R_<ISA_LIT>_THM_CALL : case llvm :: ELF :: R_<ISA_LIT>_PLT32 : case llvm :: ELF :: R_<ISA_LIT>_CALL : case llvm :: ELF :: R_<ISA_LIT>_JUMP24 : case llvm :: ELF :: R_<ISA_LIT>_THM_JUMP24 : case llvm :: ELF :: R_<ISA_LIT>_SBREL31 : case llvm :: ELF :: R_<ISA_LIT>_PREL31 : case llvm :: ELF :: R_<ISA_LIT>_THM_JUMP19 : case llvm :: ELF :: R_<ISA_LIT>_THM_JUMP6 : case llvm :: ELF :: R_<ISA_LIT>_THM_JUMP11 : case llvm :: ELF :: R_<ISA_LIT>_THM_JUMP8 : { return false


<s> Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; LDSection & target_sect = pReloc . targetRef ( ) . frag ( ) -> getParent ( ) -> getSection ( ) ; if ( ( llvm :: ELF :: SHF_ALLOC & target_sect . flag ( ) ) != <NUM_LIT> ) { if ( rsym -> reserved ( ) & <ISA_LIT>Relocator :: ReservePLT ) { S = helper_get_PLT_address ( * rsym , pParent ) ; } } Relocator :: DWord X = S + A ; X >>= <NUM_LIT>


<s> Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; Relocator :: DWord X = S + A


<s> Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; Relocator :: DWord X =


<s> Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; LDSection & target_sect = pReloc . targetRef ( ) . frag ( ) -> getParent ( ) -> getSection ( ) ; if ( ( llvm :: ELF :: SHF_ALLOC &

target_sect . flag ( ) ) != <NUM_LIT> ) {


<s> Relocator :: DWord T = getThumbBit ( pReloc ) ; Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; LDSection & target_sect = pReloc . targetRef ( ) . frag ( ) -> getParent ( ) -> getSection ( ) ; if ( ( llvm :: ELF :: SHF_ALLOC & target_sect . flag ( ) ) != <NUM_LIT> ) { if ( rsym -> reserved ( ) & <ISA_LIT>Relocator :: ReservePLT ) { S = helper_get_PLT_address ( * rsym , pParent ) ; T = <NUM_LIT> ; } } Relocator :: DWord X = ( S + A ) | T ; pReloc . target ( ) = helper_insert_val_movw_movt_inst ( pReloc . target ( ) + pReloc . addend ( )


<s> Relocator :: DWord A = helper_extract_movw_movt_addend ( pReloc . target ( ) ) + pReloc . addend ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; Relocator :: DWord X = ( ( S + A ) | T ) - P ; if ( helper_check_signed_overflow ( X , <NUM_LIT> ) ) { return Relocator :: Overflow ; } else { pReloc . target ( ) = helper_insert_val_movw_movt_inst ( pReloc . target ( ) ,


<s> <ISA_LIT>Relocator :: Result none ( Relocation & pReloc


<s> Relocator :: DWord A = helper_sign_extend ( target , <NUM_LIT> ) + pReloc . addend ( ) ; Relocator :: DWord P = pReloc . place ( ) ; Relocator :: Address S = pReloc . symValue ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; if ( pReloc . symInfo ( ) -> reserved ( ) & <ISA_LIT>Relocator :: ReservePLT ) { S = helper_get_PLT_address ( * pReloc . symInfo ( ) , pParent ) ; T =


<s> Relocator :: DWord target = pReloc . target ( ) ; Relocator :: DWord T = getThumbBit ( pReloc ) ; Relocator :: DWord A = helper_sign_extend ( target , <NUM_LIT> ) + pReloc . addend ( ) ; Relocator :: DWord P = pReloc . place ( ) ; Relocator :: Address S = pReloc .


<s> rsym -> setReserved ( rsym -> reserved ( ) | ReserveRel ) ; getTarget ( ) . checkAndSetHasTextRel ( * pSection . getLink ( ) ) ; } return ; } case llvm :: ELF :: R_<ISA_LIT>_ABS16 : case llvm :: ELF :: R_<ISA_LIT>_ABS12 : case llvm :: ELF :: R_<ISA_LIT>_THM_ABS5 : case llvm :: ELF :: R_<ISA_LIT>_ABS8 : case llvm :: ELF :: R_<ISA_LIT>_BASE_ABS : case llvm :: ELF :: R_<ISA_LIT>_MOVW_ABS_NC : case llvm :: ELF :: R_<ISA_LIT>_MOVT_ABS : case llvm :: ELF :: R_<ISA_LIT>_THM_MOVW_ABS_NC : case llvm :: ELF :: R_<ISA_LIT>_THM_MOVT_ABS : { if ( config ( ) . isCodeIndep ( ) ) { error ( diag :: non_pic_relocation ) << getName ( pReloc . type ( ) ) << pReloc . symInfo ( ) -> name ( ) ; } return ; } case llvm :: ELF :: R_<ISA_LIT>_GOTOFF32 : case llvm :: ELF :: R_<ISA_LIT>_GOTOFF12 : { return ; } case llvm :: ELF :: R_<ISA_LIT>_TARGET2 : pReloc . setType ( llvm :: ELF :: R_<ISA_LIT>_GOT_PREL ) ; case llvm :: ELF :: R_<ISA_LIT>_GOT_BREL : case llvm :: ELF :: R_<ISA_LIT>_GOT_PREL : { if ( rsym -> reserved ( ) & ReserveGOT )


<s> ResolveInfo * rsym = pReloc . symInfo ( ) ; assert ( rsym != NULL && <STR_LIT> ) ; assert ( pSection . getLink ( ) != NULL ) ; if ( ( pSection . getLink ( ) -> flag ( ) & llvm :: ELF :: SHF_ALLOC ) == <NUM_LIT> ) return ; if ( rsym -> isLocal ( ) ) scanLocalReloc ( pReloc , pSection ) ; else scanGlobalReloc ( pReloc , pBuilder , pSection ) ; if ( rsym -> isUndef ( ) && ! rsym -> isDyn ( ) && ! rsym -> isWeak ( ) && ! rsym ->

isNull ( ) ) issueUndefRef ( pReloc , pSection , pInput ) ;


<s> T = <NUM_LIT> ; } else { S = pReloc . symValue ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; } S = S + A ; if ( T == <NUM_LIT> ) { if ( pReloc . type ( ) == llvm :: ELF :: R_<ISA_LIT>_THM_JUMP24 ) return Relocator :: BadReloc ; S = helper_bit_select ( S , P , <NUM_LIT> ) ; lower_inst &= ~ <NUM_LIT> ; } else { lower_inst |= <NUM_LIT> ; } Relocator :: DWord X = ( S | T ) - P ; if ( helper_check_signed_overflow ( X , <NUM_LIT> ) ) { return Relocator :: Overflow ; } upper_inst = helper_thumb32_branch_upper ( upper_inst , X ) ; lower_inst = helper_thumb32_branch_lower ( lower_inst ,


<s> <ISA_LIT>Relocator :: Result thm_jump8 ( Relocation & pReloc , <ISA_LIT>Relocator & pParent ) { Relocator :: DWord P = pReloc . place ( ) ; Relocator :: DWord A = helper_sign_extend ( ( pReloc . target ( ) & <NUM_LIT> ) << <NUM_LIT> , <NUM_LIT>


<s> if ( ( llvm :: ELF :: SHF_ALLOC & target_sect . flag ( ) ) != <NUM_LIT> ) { if ( rsym -> reserved ( ) & <ISA_LIT>Relocator :: ReservePLT ) { S = helper_get_PLT_address ( * rsym , pParent ) ; } } Relocator :: DWord X = S + A ; X >>= <NUM_LIT> ; if ( helper_check_signed_overflow ( X , <NUM_LIT> ) ) return Relocator :: Overflow ; val = helper_insert_val_thumb_movw_movt_inst ( val , X ) ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) = val >> <NUM_LIT> ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) = val & <NUM_LIT> ; return Relocator


<s> X >>= <NUM_LIT> ; val = helper_insert_val_thumb_movw_movt_inst ( val , X ) ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) = val >> <NUM_LIT> ; * ( reinterpret_cast < uint16_t * > ( & pReloc .

target ( ) ) + <NUM_LIT> ) = val & <NUM_LIT> ;


<s> X >>= <NUM_LIT> ; val = helper_insert_val_thumb_movw_movt_inst ( val , X ) ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) = val >> <NUM_LIT> ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) = val & <NUM_LIT> ; return Relocator


<s> if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; uint16_t upper_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) ; uint16_t lower_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) ; Relocator :: DWord val = ( ( upper_inst ) << <NUM_LIT> ) | ( lower_inst ) ; Relocator :: DWord A = helper_extract_thumb_movw_movt_addend ( val ) + pReloc . addend ( ) ; LDSection & target_sect = pReloc . targetRef ( ) . frag ( ) -> getParent ( ) -> getSection ( ) ; if ( ( llvm :: ELF :: SHF_ALLOC & target_sect . flag ( ) ) != <NUM_LIT> ) { if ( rsym -> reserved ( ) & <ISA_LIT>Relocator :: ReservePLT ) { S = helper_get_PLT_address ( * rsym , pParent ) ; T = <NUM_LIT> ; } } Relocator :: DWord X = ( S + A ) | T ; val = helper_insert_val_thumb_movw_movt_inst ( val , X ) ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) = val >> <NUM_LIT> ; * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) = val & <NUM_LIT> ; return Relocator ::


<s> Relocator :: Address S = pReloc . symValue ( ) ; Relocator :: DWord T = getThumbBit ( pReloc ) ; Relocator :: DWord P = pReloc . place ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; uint16_t upper_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) ; uint16_t lower_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) ; Relocator :: DWord val = ( ( upper_inst ) << <NUM_LIT> ) | ( lower_inst ) ; Relocator :: DWord A = helper_extract_thumb_movw_movt_addend ( val ) + pReloc . addend


<s> if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; uint16_t upper_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) ; uint16_t lower_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) ; Relocator :: DWord val = ( ( upper_inst ) << <NUM_LIT> ) | ( lower_inst ) ; Relocator :: DWord A = helper_extract_thumb_movw_movt_addend ( val ) +


<s> Relocator :: DWord T = getThumbBit ( pReloc ) ; Relocator :: DWord P = pReloc . place ( ) ; if ( T != <NUM_LIT> ) helper_clear_thumb_bit ( S ) ; uint16_t upper_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) ) ; uint16_t lower_inst = * ( reinterpret_cast < uint16_t * > ( & pReloc . target ( ) ) + <NUM_LIT> ) ; Relocator :: DWord val = ( ( upper_inst ) << <NUM_LIT> ) | ( lower_inst ) ; Relocator :: DWord A = helper_extract_thumb_movw_movt_addend ( val ) + pReloc . addend ( ) ; Relocator :: DWord X = ( ( S + A ) | T ) - P ; val = helper_insert_val_thumb_movw_movt_inst ( val , X )


<s> <ISA_LIT>Relocator :: Result tls ( Relocation & pReloc , <ISA_LIT>Relocator & pParent ) { return Relocator :: Unsupported


<s> <ISA_LIT>Relocator :: Result unsupported ( Relocation & pReloc , <ISA_LIT>Relocator & pParent ) { return Relocator ::


<s> <ISA_LIT>Relocator :: Result unsupported ( Relocation & pReloc , <ISA_LIT>Relocator & pParent ) { return Relocator


<s> AEABILibcall = AEABI_MEMMOVE ; break ; case RTLIB :: MEMSET : AEABILibcall = AEABI_MEMSET ; if ( ConstantSDNode * ConstantSrc = dyn_cast < ConstantSDNode > ( Src ) ) if ( ConstantSrc -> getZExtValue ( ) == <NUM_LIT> ) AEABILibcall = AEABI_MEMCLR ; break ; default : return SDValue ( ) ; } enum { ALIGN1 = <NUM_LIT> , ALIGN4 , ALIGN8 } AlignVariant ; if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN8 ; else if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN4 ; else AlignVariant = ALIGN1 ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Entry . Ty = DAG . getDataLayout ( ) . getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Args . push_back ( Entry ) ; if ( AEABILibcall == AEABI_MEMCLR ) { Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry


<s> uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; unsigned NumMEMCPYs = ( NumMemOps + MaxLoadsInLDM - <NUM_LIT> ) / MaxLoadsInLDM ; if ( NumMEMCPYs > <NUM_LIT> && DAG . getMachineFunction ( ) . getFunction ( ) -> optForMinSize ( ) ) { return SDValue ( ) ; } SDVTList VTs = DAG . getVTList ( <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ; for ( unsigned I = <NUM_LIT> ; I != NumMEMCPYs ; ++ I ) { unsigned NextEmittedNumMemOps = NumMemOps * ( I + <NUM_LIT> ) / NumMEMCPYs ; unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft ) { if ( BytesLeft


<s> unsigned i = <NUM_LIT> ; const unsigned MAX_LOADS_IN_LDM = Subtarget . isThumb1Only ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue TFOps [ <NUM_LIT> ] ; SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else


<s> Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else if ( Src . getValueType ( ) . bitsLT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = false ; Args . push_back ( Entry ) ; } else { Entry . Node = Src ; Args . push_back ( Entry ) ; Entry . Node = Size ; Args . push_back ( Entry ) ; } char const * FunctionNames [ <NUM_LIT> ] [ <NUM_LIT> ] = { { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } ; TargetLowering :: CallLoweringInfo CLI ( DAG ) ; CLI . setDebugLoc ( dl ) . setChain ( Chain ) . setCallee ( TLI -> getLibcallCallingConv ( LC ) , Type :: getVoidTy ( * DAG . getContext ( ) ) , DAG . getExternalSymbol ( FunctionNames [ AEABILibcall ] [ AlignVariant ] , TLI -> getPointerTy ( DAG . getDataLayout ( ) ) ) , std :: move ( Args

) , <NUM_LIT> ) . setDiscardResult ( ) ;


<s> unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft


<s> EmitTargetCodeForMemmove ( SelectionDAG & DAG , SDLoc dl , SDValue Chain , SDValue Dst , SDValue Src , SDValue Size , unsigned Align , bool isVolatile , MachinePointerInfo DstPtrInfo , MachinePointerInfo SrcPtrInfo ) const { return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size


<s> return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Align , RTLIB ::


<s> return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size ,

Alignment . value ( ) , RTLIB :: MEMMOVE ) ;


<s> return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Alignment . value ( ) ,


<s> return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Alignment . value ( ) , RTLIB


<s> EVT VT = <STR_LIT> ; unsigned VTSize = <NUM_LIT> ; unsigned i = <NUM_LIT> ; const unsigned MAX_LOADS_IN_LDM = Subtarget . isThumb1Only ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue TFOps [ <NUM_LIT> ] ; SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize


<s> unsigned i = <NUM_LIT> ; const unsigned MAX_LOADS_IN_LDM = Subtarget -> isThumb1Only ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue TFOps [ <NUM_LIT> ] ; SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i =


<s> Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; TargetLowering :: CallLoweringInfo CLI ( DAG ) ; CLI . setDebugLoc ( dl ) . setChain ( Chain ) . setCallee ( TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) , Type :: getVoidTy ( * DAG . getContext ( ) ) , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB

:: MEMSET ) , TLI . getPointerTy ( ) ) , & Args , <NUM_LIT> ) . setDiscardResult ( ) ;


<s> Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT>


<s> Entry . Ty = IntPtrTy ; Args . push_back ( Entry ) ; Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt


<s> switch ( LC ) { case RTLIB :: MEMCPY : AEABILibcall = AEABI_MEMCPY ; break ; case RTLIB :: MEMMOVE : AEABILibcall = AEABI_MEMMOVE ; break ; case RTLIB :: MEMSET : AEABILibcall = AEABI_MEMSET ; if ( ConstantSDNode * ConstantSrc = dyn_cast < ConstantSDNode > ( Src ) ) if ( ConstantSrc -> getZExtValue ( ) == <NUM_LIT> ) AEABILibcall = AEABI_MEMCLR ; break ; default : return SDValue ( ) ; } enum { ALIGN1 = <NUM_LIT> , ALIGN4 , ALIGN8 } AlignVariant ; if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN8 ; else if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN4 ; else AlignVariant = ALIGN1 ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Entry . Ty = DAG . getDataLayout ( ) . getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Args . push_back ( Entry ) ; if ( AEABILibcall == AEABI_MEMCLR ) { Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else if ( Src . getValueType ( ) . bitsLT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . IsSExt = false ; Args . push_back ( Entry ) ; } else { Entry . Node = Src ; Args . push_back ( Entry ) ; Entry . Node = Size ; Args . push_back ( Entry ) ; } char const * FunctionNames [ <NUM_LIT> ] [ <NUM_LIT> ] = { { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } ; TargetLowering :: CallLoweringInfo CLI ( DAG ) ; CLI . setDebugLoc ( dl ) . setChain ( Chain ) . setLibCallee ( TLI -> getLibcallCallingConv ( LC ) , Type :: getVoidTy ( * DAG . getContext ( ) ) , DAG . getExternalFunctionSymbol ( FunctionNames [ AEABILibcall ] [ AlignVariant ] ) , std :: move ( Args ) ) . setDiscardResult ( ) ; std :: pair < SDValue , SDValue > CallResult = TLI -> LowerCallTo (


<s> unsigned BytesLeft = SizeVal & <NUM_LIT> ; unsigned NumMemOps = SizeVal >> <NUM_LIT> ; unsigned EmittedNumMemOps = <NUM_LIT> ; EVT VT = <STR_LIT> ; unsigned VTSize = <NUM_LIT> ; unsigned i = <NUM_LIT> ; const unsigned MaxLoadsInLDM = Subtarget . isThumb1Only ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue TFOps [ <NUM_LIT> ] ; SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; unsigned NumMEMCPYs = ( NumMemOps + MaxLoadsInLDM - <NUM_LIT> ) / MaxLoadsInLDM ; if ( NumMEMCPYs > <NUM_LIT> && Subtarget . hasMinSize ( ) ) { return SDValue ( ) ; } SDVTList VTs = DAG . getVTList ( <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ; for ( unsigned I = <NUM_LIT> ; I != NumMEMCPYs ; ++ I ) { unsigned NextEmittedNumMemOps = NumMemOps * ( I + <NUM_LIT> ) / NumMEMCPYs ; unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; auto getRemainingValueType = [ ] ( unsigned BytesLeft ) { return ( BytesLeft >= <NUM_LIT> ) ? <STR_LIT> : <STR_LIT> ; } ; auto getRemainingSize = [ ] ( unsigned BytesLeft ) { return ( BytesLeft >= <NUM_LIT> )


<s> SDValue <ISA_LIT>SelectionDAGInfo :: EmitTargetCodeForMemmove ( SelectionDAG & DAG , const SDLoc & dl , SDValue Chain , SDValue Dst , SDValue Src , SDValue Size , Align Alignment , bool isVolatile , bool MustPreserveCheriCapabilities , MachinePointerInfo DstPtrInfo , MachinePointerInfo SrcPtrInfo ) const { return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Alignment . value


<s> SDValue <ISA_LIT>SelectionDAGInfo :: EmitTargetCodeForMemmove ( SelectionDAG & DAG , const SDLoc & dl , SDValue Chain , SDValue Dst , SDValue Src ,

SDValue Size , Align Alignment , bool isVolatile , bool MustPreserveCheriCapabilities , MachinePointerInfo DstPtrInfo , MachinePointerInfo SrcPtrInfo ) const {


<s> if ( ! IsMemcpy ) return true ; if ( ! ConstantSize && Alignment >= Align ( <NUM_LIT> ) ) return true ; if ( ConstantSize && ConstantSize -> getZExtValue ( ) > Subtarget . getMaxInlineSizeThreshold ( ) && ConstantSize -> getZExtValue (

) < Subtarget . getMaxMemcpyTPInlineSizeThreshold ( ) ) return true ;


<s> Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; std :: pair < SDValue , SDValue > CallResult = TLI . LowerCallTo ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) , false , false , false , DAG . getExternalSymbol ( TLI

. getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ;


<s> Entry . Ty = IntPtrTy ; Args . push_back ( Entry ) ; Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; std :: pair < SDValue , SDValue > CallResult = TLI . LowerCallTo ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) ,

false , false , false , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ;


<s> const <ISA_LIT>Subtarget & Subtarget = DAG . getMachineFunction ( ) . getSubtarget < <ISA_LIT>Subtarget > ( ) ; ConstantSDNode * ConstantSize = dyn_cast < ConstantSDNode > ( Size ) ; if ( Subtarget . hasMVEIntegerOps ( ) && shouldGenerateInlineTPLoop ( Subtarget , DAG , ConstantSize , Alignment , true ) ) return DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Chain , Dst , Src , DAG . getZExtOrTrunc ( Size , dl , <STR_LIT> ) ) ; if ( Alignment < Align ( <NUM_LIT> ) ) return SDValue ( ) ; if ( ! ConstantSize ) return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Alignment . value ( ) , RTLIB :: MEMCPY ) ; uint64_t SizeVal = ConstantSize -> getZExtValue ( ) ; if ( ! AlwaysInline && SizeVal > Subtarget . getMaxInlineSizeThreshold ( ) ) return EmitSpecializedLibcall ( DAG , dl , Chain , Dst , Src , Size , Alignment . value ( ) , RTLIB :: MEMCPY ) ; unsigned BytesLeft = SizeVal & <NUM_LIT> ; unsigned NumMemOps = SizeVal >> <NUM_LIT> ; unsigned EmittedNumMemOps = <NUM_LIT> ; EVT VT = <STR_LIT> ; unsigned VTSize = <NUM_LIT> ; unsigned i = <NUM_LIT> ; const unsigned MaxLoadsInLDM = Subtarget . isThumb1Only ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue TFOps [ <NUM_LIT> ] ; SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; unsigned NumMEMCPYs = ( NumMemOps + MaxLoadsInLDM - <NUM_LIT> ) / MaxLoadsInLDM ; if ( NumMEMCPYs > <NUM_LIT> && Subtarget . hasMinSize ( ) ) { return SDValue ( ) ; } SDVTList VTs = DAG . getVTList ( <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ; for ( unsigned I = <NUM_LIT> ; I != NumMEMCPYs ; ++ I ) { unsigned NextEmittedNumMemOps = NumMemOps * ( I + <NUM_LIT> ) / NumMEMCPYs ; unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return


<s> TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Type * IntPtrTy = TLI . getDataLayout ( ) -> getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Entry . Ty = IntPtrTy ; Args . push_back ( Entry ) ; Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; TargetLowering :: CallLoweringInfo CLI ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) , false , false , false , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ; std :: pair < SDValue , SDValue > CallResult = TLI . LowerCallTo ( CLI ) ; return CallResult


<s> case RTLIB :: MEMSET : AEABILibcall = AEABI_MEMSET ; if ( ConstantSDNode * ConstantSrc = dyn_cast < ConstantSDNode > ( Src ) ) if ( ConstantSrc -> getZExtValue ( ) == <NUM_LIT> ) AEABILibcall = AEABI_MEMCLR ; break ; default : return SDValue ( ) ; } enum { ALIGN1 = <NUM_LIT> , ALIGN4 , ALIGN8 } AlignVariant ; if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN8 ; else if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN4 ; else AlignVariant = ALIGN1 ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Entry . Ty = TLI -> getDataLayout ( ) -> getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Args . push_back ( Entry ) ; if ( AEABILibcall == AEABI_MEMCLR ) { Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else if ( Src . getValueType ( ) . bitsLT ( <STR_LIT> ) ) Src = DAG . getNode (


<s> } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , dl , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff +=


<s> uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , dl , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -=


<s> enum { ALIGN1 = <NUM_LIT> , ALIGN4 , ALIGN8 } AlignVariant ; if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN8 ; else if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN4 ; else AlignVariant = ALIGN1 ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Entry . Ty = DAG . getDataLayout ( ) . getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Args . push_back ( Entry ) ; if ( AEABILibcall == AEABI_MEMCLR ) { Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else if ( Src . getValueType ( ) . bitsLT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = false ; Args . push_back ( Entry ) ; } else { Entry . Node = Src ; Args . push_back ( Entry ) ; Entry . Node = Size ; Args . push_back ( Entry ) ; } char const * FunctionNames [ <NUM_LIT> ] [ <NUM_LIT> ] = { { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } , { <STR_LIT> ,


<s> Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; TargetLowering :: CallLoweringInfo CLI ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET )

, false , false , false , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ;


<s> Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; TargetLowering :: CallLoweringInfo CLI ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) , false , false , false , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ; std :: pair < SDValue , SDValue > CallResult = TLI . LowerCallTo ( CLI ) ; return CallResult


<s> TargetLowering :: ArgListEntry Entry ; Type * IntPtrTy = TLI . getTargetData ( ) -> getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Entry . Ty = IntPtrTy ; Args . push_back ( Entry ) ; Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node =


<s> if ( ! ConstantSize ) return SDValue ( ) ; uint64_t SizeVal = ConstantSize -> getZExtValue ( ) ; if ( ! AlwaysInline && SizeVal > Subtarget -> getMaxInlineSizeThreshold ( ) ) return SDValue ( ) ; unsigned BytesLeft = SizeVal & <NUM_LIT> ; unsigned NumMemOps = SizeVal >> <NUM_LIT> ; unsigned EmittedNumMemOps = <NUM_LIT> ; EVT VT = <STR_LIT> ; unsigned VTSize = <NUM_LIT> ; unsigned i = <NUM_LIT> ; const unsigned MAX_LOADS_IN_LDM = <NUM_LIT> ; SDValue TFOps [ MAX_LOADS_IN_LDM ] ; SDValue Loads [ MAX_LOADS_IN_LDM ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; EmittedNumMemOps += i ; } if ( BytesLeft == <NUM_LIT> ) return


<s> ConstantSDNode * ConstantSize = dyn_cast < ConstantSDNode > ( Size ) ; if ( ! ConstantSize ) return SDValue ( ) ; uint64_t SizeVal = ConstantSize -> getZExtValue ( ) ; if ( ! AlwaysInline && SizeVal > Subtarget -> getMaxInlineSizeThreshold ( ) ) return SDValue ( ) ; unsigned BytesLeft = SizeVal & <NUM_LIT> ; unsigned NumMemOps = SizeVal >> <NUM_LIT> ; unsigned EmittedNumMemOps = <NUM_LIT> ; EVT VT = <STR_LIT> ; unsigned VTSize = <NUM_LIT> ; unsigned i = <NUM_LIT> ; const unsigned MAX_LOADS_IN_LDM = <NUM_LIT> ; SDValue TFOps [ MAX_LOADS_IN_LDM ] ; SDValue Loads [ MAX_LOADS_IN_LDM ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; while ( EmittedNumMemOps < NumMemOps ) { for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , isVolatile , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; SrcOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; for ( i = <NUM_LIT> ; i < MAX_LOADS_IN_LDM && EmittedNumMemOps + i < NumMemOps ; ++ i ) { TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , isVolatile , false , <NUM_LIT> ) ; DstOff += VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & TFOps [ <NUM_LIT> ] , i ) ; EmittedNumMemOps +=


<s> ALIGN1 = <NUM_LIT> , ALIGN4 , ALIGN8 } AlignVariant ; if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN8 ; else if ( ( Align & <NUM_LIT> ) == <NUM_LIT> ) AlignVariant = ALIGN4 ; else AlignVariant = ALIGN1 ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Entry . Ty = DAG . getDataLayout ( ) . getIntPtrType ( * DAG . getContext ( ) ) ; Entry . Node = Dst ; Args . push_back ( Entry ) ; if ( AEABILibcall == AEABI_MEMCLR ) { Entry . Node = Size ; Args . push_back ( Entry ) ; } else if ( AEABILibcall == AEABI_MEMSET ) { Entry . Node = Size ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else if ( Src . getValueType ( ) . bitsLT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = false ; Args . push_back ( Entry ) ; } else { Entry . Node


<s> SDValue Loads [ <NUM_LIT> ] ; uint64_t SrcOff = <NUM_LIT> , DstOff = <NUM_LIT> ; unsigned NumMEMCPYs = ( NumMemOps + MaxLoadsInLDM - <NUM_LIT> ) / MaxLoadsInLDM ; if ( NumMEMCPYs > <NUM_LIT> && DAG . getMachineFunction ( ) . getFunction ( ) -> optForMinSize ( ) ) { return SDValue ( ) ; } SDVTList VTs = DAG . getVTList ( <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ; for ( unsigned I = <NUM_LIT> ; I != NumMEMCPYs ; ++ I ) { unsigned NextEmittedNumMemOps = NumMemOps * ( I + <NUM_LIT> ) / NumMEMCPYs ; unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff ,

dl , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) , false , false , <NUM_LIT> ) ;


<s> unsigned NumRegs = NextEmittedNumMemOps - EmittedNumMemOps ; Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } else { VT = <STR_LIT> ; VTSize = <NUM_LIT> ; } Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) , false , false , false , <NUM_LIT> ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft ) { if ( BytesLeft >= <NUM_LIT> ) { VT = <STR_LIT>


<s> SDValue <ISA_LIT>SelectionDAGInfo :: EmitTargetCodeForMemset ( SelectionDAG & DAG , SDLoc dl , SDValue Chain , SDValue Dst , SDValue Src , SDValue Size , unsigned Align , bool isVolatile , MachinePointerInfo DstPtrInfo ) const { if ( ! Subtarget -> isAAPCS_ABI ( ) || Subtarget -> isTargetDarwin ( ) ) return SDValue ( ) ; const <ISA_LIT>TargetLowering & TLI = * static_cast < const <ISA_LIT>TargetLowering * > ( DAG . getTarget ( ) . getTargetLowering ( ) ) ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; Type * IntPtrTy = TLI . getDataLayout ( ) -> getIntPtrType ( * DAG . getContext (


<s> SDValue <ISA_LIT>SelectionDAGInfo :: EmitTargetCodeForMemset ( SelectionDAG & DAG , DebugLoc dl , SDValue Chain , SDValue Dst , SDValue Src , SDValue Size , unsigned Align , bool isVolatile , MachinePointerInfo DstPtrInfo ) const { if ( ! Subtarget -> isAAPCS_ABI ( ) || Subtarget -> isTargetDarwin ( ) ) return SDValue ( ) ; const <ISA_LIT>TargetLowering & TLI = * static_cast < const <ISA_LIT>TargetLowering * > ( DAG . getTarget ( ) . getTargetLowering ( ) ) ; TargetLowering :: ArgListTy Args ; TargetLowering :: ArgListEntry Entry ; unsigned AS = DstPtrInfo . getAddrSpace ( ) ; Type * IntPtrTy = TLI . getDataLayout ( ) -> getIntPtrType ( * DAG . getContext ( ) , AS ) ; Entry . Node = Dst ; Entry . Ty = IntPtrTy ; Args . push_back ( Entry ) ; Entry . Node = Size ; Entry . Ty = IntPtrTy ; Entry . isSExt = false ; Args . push_back ( Entry ) ; if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT>


<s> if ( Src . getValueType ( ) . bitsGT ( <STR_LIT> ) ) Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; else Src = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src ) ; Entry . Node = Src ; Entry . Ty = Type :: getInt32Ty ( * DAG . getContext ( ) ) ; Entry . isSExt = true ; Args . push_back ( Entry ) ; TargetLowering :: CallLoweringInfo CLI ( Chain , Type :: getVoidTy ( * DAG . getContext ( ) ) , false , false , false , false , <NUM_LIT> , TLI . getLibcallCallingConv ( RTLIB :: MEMSET ) , false , false , false , DAG . getExternalSymbol ( TLI . getLibcallName ( RTLIB :: MEMSET ) , TLI . getPointerTy ( ) ) , Args , DAG , dl ) ; std :: pair < SDValue , SDValue > CallResult = TLI . LowerCallTo ( CLI ) ; return CallResult


<s> Dst = DAG . getNode ( <STR_LIT> , dl , VTs , Chain , Dst , Src , DAG . getConstant ( NumRegs , dl , <STR_LIT> ) ) ; Src = Dst . getValue ( <NUM_LIT> ) ; Chain = Dst . getValue ( <NUM_LIT> ) ; DstPtrInfo = DstPtrInfo . getWithOffset ( NumRegs * VTSize ) ; SrcPtrInfo = SrcPtrInfo . getWithOffset ( NumRegs * VTSize ) ; EmittedNumMemOps = NextEmittedNumMemOps ; } if ( BytesLeft == <NUM_LIT> ) return Chain ; auto getRemainingValueType = [ ] ( unsigned BytesLeft ) { return ( BytesLeft >= <NUM_LIT> ) ? <STR_LIT> : <STR_LIT> ; } ; auto getRemainingSize = [ ] ( unsigned BytesLeft ) { return ( BytesLeft >= <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ; } ; unsigned BytesLeftSave = BytesLeft ; i = <NUM_LIT> ; while ( BytesLeft ) { VT = getRemainingValueType ( BytesLeft ) ; VTSize = getRemainingSize ( BytesLeft ) ; Loads [ i ] = DAG . getLoad ( VT , dl , Chain , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Src , DAG . getConstant ( SrcOff , dl , <STR_LIT> ) ) , SrcPtrInfo . getWithOffset ( SrcOff ) ) ; TFOps [ i ] = Loads [ i ] . getValue ( <NUM_LIT> ) ; ++ i ; SrcOff += VTSize ; BytesLeft -= VTSize ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , makeArrayRef ( TFOps , i ) ) ; i = <NUM_LIT> ; BytesLeft = BytesLeftSave ; while ( BytesLeft ) { VT = getRemainingValueType ( BytesLeft ) ; VTSize = getRemainingSize ( BytesLeft ) ; TFOps [ i ] = DAG . getStore ( Chain , dl , Loads [ i ] , DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Dst , DAG . getConstant ( DstOff , dl , <STR_LIT> ) ) , DstPtrInfo . getWithOffset ( DstOff ) ) ; ++ i ; DstOff += VTSize ; BytesLeft -=


<s> SDValue <ISA_LIT>SelectionDAGInfo :: EmitTargetCodeForMemset ( SelectionDAG & DAG , const SDLoc & dl , SDValue Chain , SDValue Dst , SDValue

Src , SDValue Size , unsigned Align , bool isVolatile , MachinePointerInfo DstPtrInfo ) const {


<s> return EmitSpecializedLibcall ( DAG , dl , Chain , Dst ,

Src , Size , Align , RTLIB :: MEMSET ) ;


<s> const GlobalValue * GV = cast < GlobalValue > ( M -> getNamedValue ( ThunkIt -> Name ) ) ; MachineInstr * BL = isThumb ? BuildMI ( MBB , MBBI , DL , TII -> get ( <STR_LIT> ) ) . addImm ( IndirectCall . getOperand ( <NUM_LIT> ) . getImm ( ) ) . addReg ( IndirectCall . getOperand ( <NUM_LIT> ) . getReg ( ) ) . addGlobalAddress ( GV ) : BuildMI ( MBB , MBBI , DL , TII -> get ( <STR_LIT> ) ) . addGlobalAddress ( GV ) ; int ImpLROpIdx = - <NUM_LIT> ; int ImpSPOpIdx = - <NUM_LIT> ; for ( unsigned OpIdx = BL -> getNumExplicitOperands ( ) ; OpIdx < BL -> getNumOperands ( ) ; OpIdx ++ ) { MachineOperand Op = BL -> getOperand ( OpIdx ) ; if ( ! Op . isReg ( ) ) continue ; if ( Op . getReg ( ) == <STR_LIT> && Op . isDef ( ) ) ImpLROpIdx = OpIdx ; if ( Op . getReg ( ) == <STR_LIT> && ! Op . isDef ( ) ) ImpSPOpIdx = OpIdx ; } assert ( ImpLROpIdx != - <NUM_LIT> ) ; assert ( ImpSPOpIdx != - <NUM_LIT> ) ; int FirstOpIdxToRemove = std :: max ( ImpLROpIdx , ImpSPOpIdx ) ; int SecondOpIdxToRemove = std :: min ( ImpLROpIdx , ImpSPOpIdx ) ; BL -> RemoveOperand ( FirstOpIdxToRemove ) ; BL -> RemoveOperand ( SecondOpIdxToRemove ) ; BL -> copyImplicitOps ( MF , IndirectCall ) ; MF . moveCallSiteInfo ( & IndirectCall , BL ) ; BL -> addOperand ( MachineOperand :: CreateReg ( Reg , false , true , RegIsKilled ) ) ; MBB . erase ( MBBI ) ; return MBB


<s> for ( auto T : SLSBLRThunks ) createThunkFunction ( MMI


<s> } ) ; assert ( ThunkIt != std :: end ( SLSBLRThunks ) ) ; Module * M = MF . getFunction ( ) . getParent ( ) ; const GlobalValue * GV = cast < GlobalValue > ( M -> getNamedValue ( ThunkIt -> Name ) ) ; MachineInstr * BL = isThumb ? BuildMI ( MBB , MBBI , DL , TII -> get ( <STR_LIT> ) ) . addImm ( IndirectCall . getOperand ( <NUM_LIT> ) . getImm ( ) ) . addReg ( IndirectCall . getOperand ( <NUM_LIT> ) . getReg ( ) ) . addGlobalAddress ( GV ) : BuildMI ( MBB , MBBI , DL , TII -> get ( <STR_LIT> ) ) . addGlobalAddress ( GV ) ; int ImpLROpIdx = - <NUM_LIT> ; int ImpSPOpIdx = - <NUM_LIT> ; for ( unsigned OpIdx = BL -> getNumExplicitOperands ( ) ; OpIdx < BL -> getNumOperands ( ) ; OpIdx ++ ) { MachineOperand Op = BL -> getOperand ( OpIdx ) ; if ( ! Op . isReg ( ) ) continue ; if ( Op . getReg ( ) == <STR_LIT> && Op . isDef ( ) ) ImpLROpIdx = OpIdx ; if ( Op . getReg ( ) == <STR_LIT> && ! Op . isDef ( ) ) ImpSPOpIdx = OpIdx ; } assert ( ImpLROpIdx != - <NUM_LIT> ) ; assert ( ImpSPOpIdx != - <NUM_LIT> ) ; int FirstOpIdxToRemove = std :: max ( ImpLROpIdx , ImpSPOpIdx ) ; int SecondOpIdxToRemove = std :: min ( ImpLROpIdx , ImpSPOpIdx ) ; BL -> removeOperand ( FirstOpIdxToRemove ) ; BL -> removeOperand


<s> FunctionPass * llvm :: create<ISA_LIT>IndirectThunks


<s> FunctionPass * llvm :: create<ISA_LIT>SLSHardeningPass


<s> bool <ISA_LIT>IndirectThunks :: doInitialization ( Module &


<s> void getAnalysisUsage ( AnalysisUsage & AU ) const override { MachineFunctionPass :: getAnalysisUsage ( AU


<s> MachineBasicBlock :: iterator NextMBBI ; for ( ; MBBI != E ; MBBI = NextMBBI ) { MachineInstr & MI = * MBBI ; NextMBBI = std :: next ( MBBI ) ; if ( isIndirectControlFlowNotComingBack ( MI ) ) { assert ( MI . isTerminator ( )


<s> assert ( std :: prev ( MBBI ) -> isTerminator ( ) && <STR_LIT> ) ; const TargetInstrInfo * TII = ST -> getInstrInfo ( ) ; assert ( ST -> hasDataBarrier ( ) || ST -> hasSB ( ) ) ; bool ProduceSB = ST -> hasSB ( ) && ! AlwaysUseISBDSB ; unsigned BarrierOpc = ProduceSB ? ( ST -> isThumb ( ) ? <STR_LIT> : <STR_LIT> ) : ( ST -> isThumb ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( MBBI == MBB . end ( ) || ! isSpeculationBarrierEndBBOpcode ( MBBI -> getOpcode ( )

) ) BuildMI ( MBB , MBBI , DL , TII -> get ( BarrierOpc ) ) ;


<s> void SLSBLRThunkInserter :: insertThunks ( MachineModuleInfo & MMI


<s> bool mayUseThunk ( const MachineFunction & MF ) { ComdatThunks &= ! MF . getSubtarget < <ISA_LIT>Subtarget > ( ) . hardenSlsNoComdat ( ) ; return MF . getSubtarget < <ISA_LIT>Subtarget > ( )


<s> Register ThunkReg = ThunkIt -> Reg ; bool isThumb = ThunkIt -> isThumb ; const TargetInstrInfo * TII = MF . getSubtarget < <ISA_LIT>Subtarget > ( ) . getInstrInfo ( ) ; MachineBasicBlock * Entry = & MF . front ( ) ; Entry -> clear ( ) ; Entry -> addLiveIn ( ThunkReg ) ; if ( isThumb ) BuildMI ( Entry , DebugLoc ( ) , TII -> get ( <STR_LIT> ) ) . addReg ( ThunkReg ) . add ( predOps


<s> assert ( MF . getName ( ) . startswith ( getThunkPrefix ( ) ) ) ; auto ThunkIt = llvm :: find_if ( SLSBLRThunks , [ & MF ] ( auto T ) { return T . Name == MF . getName ( ) ; } ) ; assert ( ThunkIt != std :: end ( SLSBLRThunks ) ) ; Register ThunkReg = ThunkIt -> Reg ; bool isThumb = ThunkIt -> isThumb ; const TargetInstrInfo * TII = MF . getSubtarget < <ISA_LIT>Subtarget > ( ) . getInstrInfo ( ) ; MachineBasicBlock * Entry = & MF . front ( ) ; Entry -> clear


<s> auto & MMI = getAnalysis < MachineModuleInfoWrapperPass >


<s> bool <ISA_LIT>IndirectThunks :: runOnMachineFunction ( MachineFunction & MF ) { LLVM_DEBUG ( dbgs ( ) << getPassName


<s> static bool runTIs ( MachineModuleInfo & MMI , MachineFunction & MF , std :: tuple < ThunkInserterT ... > & ThunkInserters ) { bool Modified = false ; ( void ) std :: initializer_list


<s> bool Modified = false ; ( void ) std :: initializer_list < int > { Modified |= std :: get < ThunkInserterT > ( ThunkInserters ) . run (


<s> const <ISA_LIT>BaseInstrInfo * getInstrInfo ( )


<s> const InstrItineraryData * getInstrItineraryData ( ) const override { return &


<s> const <ISA_LIT>BaseRegisterInfo * getRegisterInfo ( ) const override { return & InstrInfo -> getRegisterInfo ( )


<s> bool hasV6KOps ( ) const { return HasV6KOps


<s> bool hasV8_1aOps ( ) const { return HasV8_1aOps


<s> bool hasV8_2aOps ( ) const { return HasV8_2aOps


<s> return ( TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) ==

Triple :: GNUEABIHF ) && ! isTargetDarwin ( ) && ! isTargetWindows ( ) ;


<s> return ( TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) == Triple :: GNUEABIHF ) && ! isTargetDarwin ( )


<s> bool isTargetNetBSD ( ) const { return TargetTriple . isOSNetBSD (


<s> bool useNEONForSinglePrecisionFP ( ) const { return hasNEON (


<s> bool useNEONForSinglePrecisionFP ( )


<s> HasThumb2 = false ; No<ISA_LIT> = false ; IsR9Reserved = ReserveR9 ; UseMovt = false ; SupportsTailCall = false ; HasFP16 = false ; HasD16 = false ; HasHardwareDivide = false ; HasHardwareDivideIn<ISA_LIT> = false ; HasT2ExtractPack = false ; HasDataBarrier = false ; Pref32BitThumb = false ; AvoidCPSRPartialUpdate = false ; AvoidMOVsShifterOperand = false ; HasRAS = false ; HasMPExtension = false ; HasVirtualization = false ; FPOnlySP = false ; HasPerfMon = false ; HasTrustZone = false


<s> HasT2ExtractPack = false ; HasDataBarrier = false ; Pref32BitThumb = false ; AvoidCPSRPartialUpdate = false ; AvoidMOVsShifterOperand = false ; HasRAS = false ; HasMPExtension = false ; HasVirtualization = false ; FPOnlySP = false ; HasPerfMon = false ; HasTrustZone = false ; HasCrypto = false ; HasCRC = false ; HasZeroCycleZeroing = false ; AllowsUnalignedMem = false ; Thumb2DSP = false ; UseNaClTrap =


<s> bool allowPositionIndependentMovt ( ) const { return isROPI ( ) ||


<s> bool cheapPredicableCPSRDef ( ) const { return


<s> bool checkVLDnAccessAlignment ( ) const { return CheckVLDnAlign


<s> bool disablePostRAScheduler ( ) const { return DisablePostRAScheduler


<s> unsigned getMVEVectorCostFactor ( ) const { return MVEVectorCostFactor


<s> unsigned getPartialUpdateClearance (


<s> int getPreISelOperandLatencyAdjustment ( ) const { return PreISelOperandLatencyAdjustment


<s> if ( isThumb ( ) ) return <STR_LIT> ; if ( hasV4TOps ( ) ) return <STR_LIT> ; return <STR_LIT>


<s> bool hasBranchPredictor ( ) const { return


<s> bool hasFP16FML ( ) const { return HasFP16FML


<s> bool hasFP64 ( ) const { return HasFP64


<s> bool hasFPAO ( ) const { return HasFPAO


<s> bool hasFP<ISA_LIT>v8Base ( ) const { return


<s> bool hasFPRegs ( ) const { return HasFPRegs


<s> bool hasFPRegs64 ( ) const { return HasFPRegs64


<s> bool hasFuseAES ( ) const { return HasFuseAES


<s> bool hasFuseLiterals ( ) const { return


<s> bool hasSHA2 ( ) const { return HasSHA2


<s> bool hasSlowLoadDSubregister ( ) const { return SlowLoadDSubregister


<s> bool hasSlowLoadDSubregister ( ) const { return


<s> bool hasSlowVGETLNi32 ( ) const { return


<s> bool hasV8MBaselineOps ( ) const { return HasV8MBaselineOps


<s> bool hasV8MMainlineOps ( ) const { return HasV8MMainlineOps


<s> bool hasV8_1MMainlineOps ( ) const { return


<s> bool hasVMLxHazards ( ) const { return HasVMLxHazards


<s> bool isProfitableToUnpredicate ( ) const { return IsProfitableToUnpredicate


<s> return ( TargetTriple . getEnvironment ( ) == Triple :: EABI || TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) == Triple :: MuslEABI || TargetTriple . getEnvironment ( ) == Triple :: EABIHF || TargetTriple . getEnvironment ( )

== Triple :: GNUEABIHF || TargetTriple . getEnvironment ( ) == Triple :: MuslEABIHF || isTargetAndroid ( ) ) && ! isTargetDarwin ( ) && ! isTargetWindows ( ) ;


<s> bool isTargetEHABICompatible ( ) const { return ( TargetTriple . getEnvironment ( ) == Triple :: EABI || TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) == Triple :: MuslEABI || TargetTriple . getEnvironment ( ) == Triple :: EABIHF || TargetTriple . getEnvironment ( ) == Triple :: GNUEABIHF || TargetTriple . getEnvironment ( ) == Triple :: MuslEABIHF || isTargetAndroid ( ) ) &&

! isTargetDarwin ( ) && ! isTargetWindows ( ) ;


<s> return ( useR7AsFramePointer ( ) && MF . getTarget ( ) . Options . DisableFramePointerElim (


<s> return ( useR7AsFramePointer ( ) && MF . getTarget ( ) .

Options . DisableFramePointerElim ( MF ) ) || isThumb1Only ( ) ;


<s> bool useNEONForFPMovs ( ) const { return UseNEONForFPMovs


<s> return isTargetDarwin ( ) || ( ! isTargetWindows ( ) && isThumb (


<s> return isTargetDarwin ( ) || ( ! isTargetWindows ( )


<s> bool useWideStrideVFP ( ) const { return UseWideStrideVFP


<s> bool useWideStrideVFP ( ) const { return


<s> if ( ST . isThumb ( ) ) Ret += <STR_LIT> ; if ( ! ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; if ( ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; if ( ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; else Ret += <STR_LIT> ; if ( ST . isThumb ( ) || ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; Ret += <STR_LIT> ; if ( ST . isTargetNaCl ( ) ) Ret += <STR_LIT> ; else if ( ST . isAAPCS_ABI ( ) ) Ret += <STR_LIT> ; else Ret += <STR_LIT> ; return


<s> if ( ST . isThumb ( ) ) Ret += <STR_LIT> ; if ( ! ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; if ( ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; if ( ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; else Ret += <STR_LIT> ; if ( ST . isThumb ( ) || ST . isAPCS_ABI ( ) ) Ret += <STR_LIT> ; Ret += <STR_LIT> ; if ( ST . isTargetNaCl ( ) ) Ret += <STR_LIT> ; else if ( ST . isAAPCS_ABI ( ) ) Ret += <STR_LIT> ; else Ret += <STR_LIT> ; return Ret


<s> bool <ISA_LIT>Subtarget :: enablePostMachineScheduler ( ) const { return PostRAScheduler


<s> Mode = TargetSubtargetInfo :: ANTIDEP_NONE ; return PostRAScheduler && OptLevel >= CodeGenOpt ::


<s> unsigned getMaxInlineSizeThreshold (


<s> const <ISA_LIT>TargetLowering * getTargetLowering ( )


<s> if ( GV -> hasLocalLinkage ( ) || GV -> hasHiddenVisibility ( ) ) return false ; return true ; } else { if ( RelocM == Reloc :: PIC_ ) { if ( ! isDecl && ! GV -> isWeakForLinker ( ) ) return false ; if ( ! GV -> hasHiddenVisibility ( ) ) return true ; if ( isDecl || GV -> hasCommonLinkage ( ) ) return true ; return false ; } else { if ( ! isDecl && ! GV -> isWeakForLinker ( ) ) return false ; if ( ! GV -> hasHiddenVisibility ( ) ) return true ; } } return


<s> bool hasDivideIn<ISA_LIT>Mode ( ) const { return


<s> bool hasDivideIn<ISA_LIT>Mode ( ) const { return HasHardwareDivideIn<ISA_LIT>


<s> bool hasMPExtension ( ) const { return


<s> bool hasNEON ( ) const { return HasNEON


<s> bool hasRAS ( ) const { return HasRAS


<s> return getTargetTriple ( ) . getOS ( ) == Triple :: IOS && ! getTargetTriple ( ) .

isOSVersionLT ( <NUM_LIT> , <NUM_LIT> ) ;


<s> bool hasT2ExtractPack ( ) const { return


<s> bool hasVFP2 ( ) const { return HasVFPv2


<s> bool hasZeroCycleZeroing ( ) const { return


<s> HasVFPv2 = false ; HasVFPv3 = false ; HasVFPv4 = false ; HasFP<ISA_LIT>v8 = false ; HasNEON = false ; UseNEONForSinglePrecisionFP = false ; UseMulOps = UseFusedMulOps ; SlowFPVMLx = false ; HasVMLxForwarding = false ; SlowFPBrcc = false ; InThumbMode = false ; HasThumb2 = false ; No<ISA_LIT> = false ; PostRAScheduler = false ; IsR9Reserved = ReserveR9 ; UseMovt = false ; SupportsTailCall = false ; HasFP16 = false ; HasD16 = false ; HasHardwareDivide = false ; HasHardwareDivideIn<ISA_LIT> = false ; HasT2ExtractPack = false ; HasDataBarrier = false ; Pref32BitThumb = false ; AvoidCPSRPartialUpdate = false ; AvoidMOVsShifterOperand = false ; HasRAS = false ; HasMPExtension = false ; HasVirtualization = false ; FPOnlySP = false ; HasPerfMon = false ; HasTrustZone = false ; HasCrypto = false ; HasCRC = false ; HasZeroCycleZeroing = false ; AllowsUnalignedMem = false


<s> <ISA_LIT>Subtarget & <ISA_LIT>Subtarget :: initializeSubtargetDependencies ( StringRef


<s> assert ( TargetABI != <ISA_LIT>_ABI_UNKNOWN )


<s> bool isCortexA15 ( ) const { return <ISA_LIT>ProcFamily


<s> bool isCortexA8 ( ) const { return <ISA_LIT>ProcFamily ==


<s> bool isCortexR5 ( ) const { return <ISA_LIT>ProcFamily ==


<s> bool isFPOnlySP ( ) const { return FPOnlySP


<s> bool isLikeA9 ( ) const { return isCortexA9 ( ) || isCortexA15 (


<s> bool isTargetAEABI ( ) const { return ( TargetTriple . getEnvironment ( ) == Triple :: EABI || TargetTriple . getEnvironment ( ) == Triple :: EABIHF ) && !

isTargetDarwin ( ) && ! isTargetWindows ( ) ;


<s> return TargetTriple . getEnvironment ( )


<s> return ( TargetTriple . getEnvironment ( ) == Triple :: EABI || TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) == Triple :: EABIHF || TargetTriple . getEnvironment ( ) == Triple :: GNUEABIHF || TargetTriple . getEnvironment ( )

== Triple :: Android ) && ! isTargetDarwin ( ) && ! isTargetWindows ( ) ;


<s> bool isTargetELF ( ) const { return TargetTriple . isOSBinFormatELF ( )


<s> bool isTargetLinux ( ) const { return TargetTriple .


<s> return TargetTriple . isOSBinFormatMachO (


<s> bool isTargetNetBSD ( ) const { return TargetTriple . getOS (


<s> bool isTargetWindows ( ) const { return TargetTriple . isOSWindows (


<s> bool supportsTailCall ( ) const { return


<s> bool useMulOps ( ) const { return UseMulOps


<s> bool useNEONForSinglePrecisionFP ( ) const { return hasNEON ( ) &&


<s> if ( CostKind == TargetTransformInfo :: TCK_CodeSize ) return <NUM_LIT> ; return


<s> bool hardenSlsBlr ( ) const { return HardenSlsBlr


<s> bool hardenSlsBlr ( ) const { return


<s> bool isCortexM7 ( ) const { return <ISA_LIT>ProcFamily == CortexM7


<s> bool splitFramePushPop ( const MachineFunction & MF ) const { return ( getFramePointerReg ( ) == <STR_LIT> && MF . getTarget ( ) . Options . DisableFramePointerElim ( MF


<s> return ! isTargetDarwin ( ) && hasVFP4Base


<s> bool useFPVFMx16 ( ) const { return useFPVFMx ( ) && hasFullFP16


<s> bool useFPVFMx64 ( ) const { return useFPVFMx ( ) && hasFP64


<s> bool useFPVFMx64 ( ) const { return useFPVFMx ( ) && hasFP64 (


<s> bool hasV9_1aOps ( ) const { return HasV9_1aOps


<s> return ( TargetTriple . getEnvironment ( ) == Triple :: EABI || TargetTriple . getEnvironment ( ) == Triple :: GNUEABI || TargetTriple . getEnvironment ( ) == Triple :: EABIHF || TargetTriple . getEnvironment ( ) == Triple :: GNUEABIHF || TargetTriple . getEnvironment ( ) == Triple :: Android )

&& ! isTargetDarwin ( ) && ! isTargetWindows ( ) && ! isTargetNaCl ( ) && ! Enable<ISA_LIT>DwarfEH ;


<s> bool hasNEON ( ) const { return <ISA_LIT>FPUType >=


<s> bool hasV5TEOps ( ) const { return <ISA_LIT>ArchVersion >=


<s> bool hasV6Ops ( ) const { return <ISA_LIT>ArchVersion >=


<s> bool hasV6T2Ops ( ) const { return <ISA_LIT>ArchVersion >=


<s> return TargetTriple . getEnvironment ( ) == Triple :: GNUEABIHF || TargetTriple . getEnvironment ( ) == Triple :: MuslEABIHF || TargetTriple . getEnvironment ( ) ==

Triple :: EABIHF || isTargetWindows ( ) || isAAPCS16_ABI ( ) ;


<s> void setGISelAccessor ( GISelAccessor &


<s> bool hasVFP2Base ( ) const { return HasVFPv2D16SP


<s> <ISA_LIT>ArchVersion = V7A ; } else if ( SubVer == '6' ) { <ISA_LIT>ArchVersion = V6 ; if ( Len >= Idx + <NUM_LIT> && TT [ Idx + <NUM_LIT> ] == 't' && TT [ Idx + <NUM_LIT> ] == '2' ) <ISA_LIT>ArchVersion = V6T2 ; } else if ( SubVer == '5' ) { <ISA_LIT>ArchVersion = V5T ; if ( Len >= Idx + <NUM_LIT> && TT [ Idx + <NUM_LIT> ] == 't' && TT [ Idx + <NUM_LIT> ] == 'e' ) <ISA_LIT>ArchVersion = V5TE ; } else if ( SubVer == '4' ) { if ( Len >= Idx + <NUM_LIT> && TT [ Idx + <NUM_LIT> ] == 't' ) <ISA_LIT>ArchVersion = V4T ; else <ISA_LIT>ArchVersion = V4 ; } } if ( <ISA_LIT>ArchVersion >= V6T2 ) ThumbMode = Thumb2 ; else if ( ThumbMode >= Thumb2 ) <ISA_LIT>ArchVersion = V6T2 ; if ( Len >= <NUM_LIT> ) { if ( TT . find ( <STR_LIT> ) != std :: string :: npos )


<s> unsigned getMaxInlineSizeThreshold ( ) const { return isThumb1Only ( ) ? <NUM_LIT>


<s> bool isDecl = GV -> isDeclaration ( ) && ! GV -> isMaterializable ( ) ; if ( ! isTargetDarwin ( ) ) { if ( GV -> hasLocalLinkage ( ) || GV -> hasHiddenVisibility ( ) ) return false ; return true ; } else { if ( RelocM == Reloc :: PIC_ ) { if ( ! isDecl && ! GV -> isWeakForLinker ( ) ) return false ; if ( ! GV -> hasHiddenVisibility ( ) ) return


<s> bool isCortexA7 ( ) const { return CPUString ==


<s> bool isCortexA7 ( ) const { return CPUString


<s> bool isTargetIOS ( ) const { return TargetTriple . getOS (


<s> bool isTargetNaCl ( ) const { return TargetTriple . getOS ( ) ==


<s> bool getNoBTIAtReturnTwice ( ) const { return NoBTIAtReturnTwice


<s> return ( getFramePointerReg ( ) == <STR_LIT> && MF . getTarget ( ) . Options . DisableFramePointerElim ( MF )


<s> if ( MF . getInfo < <ISA_LIT>FunctionInfo > ( ) -> shouldSignReturnAddress ( ) ) return true ; return ( getFramePointerReg ( ) == <STR_LIT> && MF . getTarget ( ) . Options

. DisableFramePointerElim ( MF ) ) || isThumb1Only ( ) ;


<s> return ReservedGPRegisters . count ( )


<s> bool isGPRegisterReserved ( size_t i ) const { return ReservedGPRegisters [


<s> <ISA_LIT>Subtarget :: <ISA_LIT>Subtarget ( const std :: string & TT , const std :: string & CPU , const std :: string & FS , const TargetOptions & Options ) : <ISA_LIT>GenSubtargetInfo ( TT , CPU , FS ) , <ISA_LIT>ProcFamily ( Others ) , stackAlignment ( <NUM_LIT> ) , CPUString ( CPU ) , TargetTriple ( TT ) , Options ( Options ) , TargetABI ( <ISA_LIT>_ABI_APCS ) { initializeEnvironment ( ) ; resetSubtargetFeatures ( CPU , FS )


<s> HasVFPv4 = false ; HasV8FP = false ; HasNEON = false ; UseNEONForSinglePrecisionFP = false ; UseMulOps = UseFusedMulOps ; SlowFPVMLx = false ; HasVMLxForwarding = false ; SlowFPBrcc = false ; InThumbMode = false ; HasThumb2 = false ; IsMClass = false ; No<ISA_LIT> = false ; PostRAScheduler = false ; IsR9Reserved = ReserveR9 ; UseMovt = false ; SupportsTailCall = false ; HasFP16 = false ; HasD16 = false ; HasHardwareDivide = false ; HasHardwareDivideIn<ISA_LIT> = false ; HasT2ExtractPack = false ; HasDataBarrier = false ; Pref32BitThumb = false ; AvoidCPSRPartialUpdate = false ; AvoidMOVsShifterOperand = false ; HasRAS = false ; HasMPExtension = false


<s> bool isTargetLinux ( ) const { return TargetTriple . getOS ( )


<s> <ISA_LIT>Subtarget :: <ISA_LIT>Subtarget ( const std :: string & TT , const std :: string & CPU , const std :: string & FS ) : <ISA_LIT>GenSubtargetInfo ( TT , CPU , FS ) , <ISA_LIT>ProcFamily ( Others ) , HasV4TOps ( false ) , HasV5TOps ( false ) , HasV5TEOps ( false ) , HasV6Ops ( false ) , HasV6T2Ops ( false ) , HasV7Ops ( false ) , HasVFPv2 ( false ) , HasVFPv3 ( false ) , HasVFPv4 ( false ) , HasNEON ( false ) , UseNEONForSinglePrecisionFP ( false ) , SlowFPVMLx ( false ) , HasVMLxForwarding ( false ) , SlowFPBrcc ( false ) , InThumbMode ( false ) , HasThumb2 ( false ) , IsMClass ( false ) , No<ISA_LIT> ( false ) , PostRAScheduler ( false ) , IsR9Reserved ( ReserveR9 ) , UseMovt ( false ) , SupportsTailCall ( false ) , HasFP16 ( false ) , HasD16 ( false ) , HasHardwareDivide ( false ) , HasT2ExtractPack ( false ) , HasDataBarrier ( false ) , Pref32BitThumb ( false ) , AvoidCPSRPartialUpdate ( false ) , HasMPExtension ( false ) , FPOnlySP ( false ) , AllowsUnalignedMem ( false ) , Thumb2DSP ( false ) , stackAlignment ( <NUM_LIT> ) , CPUString ( CPU ) , TargetTriple ( TT ) , TargetABI ( <ISA_LIT>_ABI_APCS ) { if ( CPUString . empty ( ) ) CPUString = <STR_LIT> ; std :: string ArchFS = <ISA_LIT>_MC :: Parse<ISA_LIT>Triple ( TT ) ; if ( ! FS . empty ( ) ) { if ( ! ArchFS . empty ( ) ) ArchFS = ArchFS + <STR_LIT> + FS ; else ArchFS =


<s> itin -> FirstStage != ~ <NUM_LIT> ; ++ itin ) { const InstrStage * IS = InstrItins . Stages + itin -> FirstStage ; allStage1Units |= IS -> getUnits ( ) ; } InstrItins . IssueWidth = <NUM_LIT> ; while ( allStage1Units


<s> unsigned <ISA_LIT>Subtarget :: getMispredictionPenalty ( ) const { if ( isCortexA8 ( ) ) return


<s> bool <ISA_LIT>Subtarget :: enableAtomicExpand ( ) const { return hasAnyDataBarrier ( ) &&


<s> return getSchedModel ( ) . isOutOfOrder ( ) && isSwift


<s> bool <ISA_LIT>Subtarget :: enableMachineScheduler (


<s> } else { if ( isDef ) return false ; if ( ! GV -> hasHiddenVisibility ( ) ) return true ; if ( RelocM == Reloc :: PIC_ ) { if ( GV -> isDeclarationForLinker ( ) || GV -> hasCommonLinkage ( ) ) return true ; } } return


<s> bool <ISA_LIT>Subtarget :: hasSinCos ( ) const { return isTargetWatchOS ( ) || ( isTargetIOS ( ) && ! getTargetTriple ( ) .

isOSVersionLT ( <NUM_LIT> , <NUM_LIT> ) ) ;


<s> return isTargetWatchOS ( ) || ( isTargetIOS ( ) && ! getTargetTriple ( ) . isOSVersionLT


<s> StringRef ArchName = TargetTriple . getArchName ( ) ; if ( ArchName . endswith ( <STR_LIT> ) ) CPUString = <STR_LIT> ; else if ( ArchName . endswith ( <STR_LIT> ) ) CPUString = <STR_LIT> ; } } std :: string ArchFS = <ISA_LIT>_MC :: Parse<ISA_LIT>Triple ( TargetTriple , CPUString ) ; if ( ! FS . empty ( ) ) { if ( ! ArchFS . empty ( ) ) ArchFS = ( Twine ( ArchFS ) + <STR_LIT> + FS ) . str ( ) ; else ArchFS = FS ; } ParseSubtargetFeatures ( CPUString , ArchFS ) ; assert ( hasV6T2Ops ( ) || ! hasThumb2 ( ) ) ; SchedModel = getSchedModelForCPU ( CPUString ) ; InstrItins = getInstrItineraryForCPU ( CPUString ) ; if ( isTargetWindows ( ) ) No<ISA_LIT> = true ; if ( isAAPCS_ABI ( ) ) stackAlignment = <NUM_LIT> ; if ( isTargetNaCl ( ) || isAAPCS16_ABI ( ) ) stackAlignment = <NUM_LIT> ; SupportsTailCall = ! isThumb1Only ( ) ; if ( isTargetMachO ( ) && isTargetIOS ( ) && getTargetTriple ( ) . isOSVersionLT ( <NUM_LIT> , <NUM_LIT> ) ) SupportsTailCall = false ; switch ( IT ) { case DefaultIT


<s> bool <ISA_LIT>Subtarget :: useStride4VFPs ( const MachineFunction & MF )


<s> <ISA_LIT>Subtarget :: <ISA_LIT>Subtarget ( const Triple & TT , const std :: string & CPU , const std :: string & FS , const <ISA_LIT>BaseTargetMachine & TM , bool IsLittle , bool MinSize ) : <ISA_LIT>GenSubtargetInfo ( TT , CPU , FS ) , UseMulOps ( UseFusedMulOps ) , CPUString ( CPU ) , OptMinSize ( MinSize ) , IsLittle ( IsLittle ) , TargetTriple ( TT ) , Options ( TM . Options ) , TM ( TM ) , FrameLowering ( initializeFrameLowering ( CPU , FS ) ) , InstrInfo ( isThumb1Only ( ) ? ( <ISA_LIT>BaseInstrInfo * ) new Thumb1InstrInfo ( * this ) : ! isThumb ( ) ? ( <ISA_LIT>BaseInstrInfo * ) new <ISA_LIT>InstrInfo ( * this ) : ( <ISA_LIT>BaseInstrInfo * ) new Thumb2InstrInfo ( * this ) ) , TLInfo ( TM , * this ) { CallLoweringInfo . reset ( new <ISA_LIT>CallLowering ( * getTargetLowering ( ) ) ) ; Legalizer . reset ( new <ISA_LIT>LegalizerInfo ( * this ) ) ; auto * RBI = new <ISA_LIT>RegisterBankInfo ( * getRegisterInfo ( ) ) ; InstSelector . reset ( create<ISA_LIT>InstructionSelector ( * static_cast < const <ISA_LIT>BaseTargetMachine * > ( & TM ) , * this , * RBI ) ) ; RegBankInfo . reset


<s> if ( isMClass ( ) && hasMinSize ( ) ) return false ; return useMachineScheduler ( )


<s> if ( isThumb1Only ( ) ) return <NUM_LIT> ; if ( isThumb2 ( ) && MF . getFunction ( ) . hasMinSize ( ) ) return <NUM_LIT> ; return <NUM_LIT>


<s> if ( isThumb2 ( ) && MF . getFunction ( ) . hasMinSize ( ) )


<s> return isThumb2 ( ) && MF . getFunction ( ) . hasMinSize ( ) &&


<s> return ! NoMovt && hasV8MBaselineOps ( ) && ( isTargetWindows ( ) || ! OptMinSize || genExecuteOnly


<s> bool <ISA_LIT>Subtarget :: useMovt ( ) const { return ! NoMovt && hasV8MBaselineOps ( ) && ( isTargetWindows

( ) || ! OptMinSize || genExecuteOnly ( ) ) ;


<s> return isTargetWatchABI ( ) || ( useWideStrideVFP


<s> UseNEONForSinglePrecisionFP = false ; UseMulOps = UseFusedMulOps ; SlowFPVMLx = false ; HasVMLxForwarding = false ; SlowFPBrcc = false ; InThumbMode = false ; HasThumb2 = false ; IsMClass = false ; No<ISA_LIT> = false ; PostRAScheduler = false ; IsR9Reserved = ReserveR9 ; UseMovt = false ; SupportsTailCall = false ; HasFP16 = false ; HasD16 = false ; HasHardwareDivide = false ; HasHardwareDivideIn<ISA_LIT> = false ; HasT2ExtractPack = false ; HasDataBarrier = false ; Pref32BitThumb = false ; AvoidCPSRPartialUpdate = false ; AvoidMOVsShifterOperand = false ; HasRAS = false ; HasMPExtension = false ; FPOnlySP = false ; HasPerfMon = false ; HasTrustZone = false ; HasCrypto = false ; AllowsUnalignedMem = false ; Thumb2DSP = false