<s> if ( Negated ) Value *= - <NUM_LIT> ; switch ( Kind ) { case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO8 : Value &= <NUM_LIT> ; break ; case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI8 : Value &= <NUM_LIT> ; Value >>= <NUM_LIT> ; break ; case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HH8 : Value &= <NUM_LIT> ; Value >>= <NUM_LIT> ; break ; case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HHI8 : Value &= <NUM_LIT> ; Value >>= <NUM_LIT> ; break ; case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_PM_LO8 : case <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO8_GS : Value >>= <NUM_LIT> ; Value &= <NUM_LIT> ; break ;


<s> if ( Value . isAbsolute ( ) ) { Result = MCValue :: get ( evaluateAsInt64 ( Value . getConstant ( ) ) ) ; } else { if ( ! Layout ) return false ; MCContext & Context = Layout -> getAssembler ( ) . getContext ( ) ; const MCSymbolRefExpr * Sym = Value . getSymA ( ) ; MCSymbolRefExpr :: VariantKind Modifier = Sym -> getKind ( ) ; if ( Modifier != MCSymbolRefExpr :: VK_None ) return false ; if ( Kind == VK_<ISA_LIT>_PM ) { Modifier = MCSymbolRefExpr :: VK_X86_ABS8 ; }

Sym = MCSymbolRefExpr :: create ( & Sym -> getSymbol ( ) , Modifier , Context ) ;


<s> if ( Value . isAbsolute ( ) ) { Result = MCValue :: get ( evaluateAsInt64 ( Value . getConstant ( ) ) ) ; } else { if ( ! Layout ) return false ; MCContext & Context = Layout -> getAssembler ( ) . getContext ( ) ; const MCSymbolRefExpr * Sym = Value . getSymA ( ) ; MCSymbolRefExpr :: VariantKind Modifier = Sym -> getKind ( ) ; if ( Modifier != MCSymbolRefExpr :: VK_None ) return false ; if ( Kind == VK_<ISA_LIT>_PM ) { Modifier = MCSymbolRefExpr :: VK_X86_ABS8 ; } Sym = MCSymbolRefExpr :: create ( & Sym -> getSymbol ( ) , Modifier , Context ) ; Result = MCValue :: get ( Sym , Value . getSymB ( ) , Value . getConstant ( ) ) ; } return true ;


<s> MCFragment * findAssociatedFragment ( ) const override {

return getSubExpr ( ) -> findAssociatedFragment ( ) ;


<s> void fixELFSymbolsInTLSFixups ( MCAssembler & Asm ) const override {


<s> break ; case VK_<ISA_LIT>_HH8 : Kind = isNegated ( ) ? <STR_LIT> : <STR_LIT> ; break ; case VK_<ISA_LIT>_HHI8 : Kind = isNegated ( ) ? <STR_LIT> : <STR_LIT> ; break ; case VK_<ISA_LIT>_PM_LO8 : Kind = isNegated ( ) ? <STR_LIT> : <STR_LIT> ; break ; case VK_<ISA_LIT>_PM_HI8 : Kind = isNegated ( ) ? <STR_LIT> : <STR_LIT> ; break ; case VK_<ISA_LIT>_PM_HH8 : Kind = isNegated ( ) ? <STR_LIT> : <STR_LIT> ; break ; case VK_<ISA_LIT>_PM : case VK_<ISA_LIT>_GS : Kind = <STR_LIT> ; break ; case VK_<ISA_LIT>_LO8_GS : Kind = <STR_LIT> ; break ; case VK_<ISA_LIT>_HI8_GS : Kind = <STR_LIT> ; break ; case VK_<ISA_LIT>_None : llvm_unreachable ( <STR_LIT> ) ;


<s> VariantKind getKind ( ) const { return Kind ;


<s> return Mod . VariantKind == Kind ; } ) ;

if ( Modifier != std :: end ( ModifierNames ) ) {


<s> } ) ; if ( Modifier != std :: end ( ModifierNames ) ) { return Modifier -> Spelling ;


<s> const MCExpr * getSubExpr ( ) const {


<s> explicit <ISA_LIT>MCExpr ( VariantKind Kind , const MCExpr * Expr , bool Negated ) : Kind ( Kind ) , SubExpr ( Expr ) , Negated ( Negated ) {


<s> void <ISA_LIT>MCExpr :: printImpl ( raw_ostream & OS , const MCAsmInfo * MAI ) const { assert ( Kind != VK_<ISA_LIT>_None ) ; if ( isNegated ( ) ) OS << '-' ; OS << getName ( ) << '(' ;


<s> void setNegated ( bool negated = true ) {


<s> void <ISA_LIT>MCExpr :: visitUsedExpr ( MCStreamer & Streamer ) const {

Streamer . visitUsedExpr ( * getSubExpr ( ) ) ;


<s> const MCExpr * Expr = MCSymbolRefExpr :: create ( Sym , Ctx ) ; bool IsNegated = false ; if ( TF & <STR_LIT> ) { IsNegated = true ; } if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) { Expr = MCBinaryExpr :: createAdd ( Expr , MCConstantExpr :: create ( MO . getOffset ( ) , Ctx ) , Ctx ) ; } bool IsFunction = MO . isGlobal ( ) && isa < Function > ( MO . getGlobal ( ) ) ; if ( TF & <STR_LIT> ) { if ( IsFunction ) { Expr = <ISA_LIT>MCExpr :: create ( <ISA_LIT>MCExpr :: VK_<ISA_LIT>_PM_LO8 , Expr , IsNegated , Ctx ) ; } else { Expr = <ISA_LIT>MCExpr :: create ( <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO8 , Expr , IsNegated , Ctx ) ; } } else if ( TF & <STR_LIT> ) { if ( IsFunction ) { Expr = <ISA_LIT>MCExpr :: create ( <ISA_LIT>MCExpr :: VK_<ISA_LIT>_PM_HI8 , Expr , IsNegated , Ctx ) ; } else {

Expr = <ISA_LIT>MCExpr :: create ( <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI8 , Expr , IsNegated , Ctx ) ;


<s> <ISA_LIT>MCInstLower ( MCContext & Ctx , AsmPrinter & Printer ) : Ctx ( Ctx ) , Printer ( Printer ) {


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * InstPrint , bool isVerboseAsm ) {

return new <ISA_LIT>TargetAsmStreamer ( S ) ;


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * InstPrint , bool isVerboseAsm ) { return new <ISA_LIT>TargetAsmStreamer ( S ) ;


<s> return new <ISA_LIT>InstPrinter ( MAI , MII , MRI ) ; } return nullptr ;


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) { if ( SyntaxVariant == <NUM_LIT> ) { return new <ISA_LIT>InstPrinter ( MAI , MII , MRI ) ; } return nullptr ;


<s> MCInstrInfo * X = new MCInstrInfo ( ) ; Init<ISA_LIT>MCInstrInfo ( X ) ;


<s> MCRegisterInfo * X = new MCRegisterInfo ( ) ; Init<ISA_LIT>MCRegisterInfo ( X , <NUM_LIT> ) ; return X ;


<s> return createELFStreamer ( Context , std :: move ( MAB ) , std :: move ( OW ) , std :: move ( Emitter ) , RelaxAll ) ;


<s> LLVM_EXTERNAL_VISIBILITY void LLVMInitialize<ISA_LIT>TargetMC ( ) { RegisterMCAsmInfo < <ISA_LIT>MCAsmInfo > X ( getThe<ISA_LIT>Target ( ) ) ; TargetRegistry :: RegisterMCInstrInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCInstPrinter ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCInstPrinter ) ;

TargetRegistry :: RegisterMCCodeEmitter ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCCodeEmitter ) ;


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : { if ( isUInt < <NUM_LIT> > ( Offset ) ) { Opcode = <STR_LIT> ; break ; } LLVM_FALLTHROUGH ; } default : { Opcode = <STR_LIT> ; Offset = - Offset ; break ; } } MachineInstr * New = BuildMI ( MBB , II , dl , TII . get ( Opcode ) , DstReg ) . addReg ( DstReg , RegState :: Kill ) . addImm ( Offset ) ; New -> getOperand ( <NUM_LIT> ) . setIsDead ( ) ; return ; } if ( Offset > <NUM_LIT> ) { unsigned AddOpc = <STR_LIT> , SubOpc = <STR_LIT> ; int AddOffset = Offset - <NUM_LIT> + <NUM_LIT> ; if ( ( Offset - <NUM_LIT> + <NUM_LIT> ) > <NUM_LIT> ) { AddOpc = <STR_LIT> ; SubOpc = <STR_LIT> ; AddOffset = - AddOffset ; } BuildMI ( MBB , II , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( <NUM_LIT> ) ; MachineInstr * New = BuildMI ( MBB , II , dl , TII . get ( AddOpc ) , <STR_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) . addImm ( AddOffset ) ; New -> getOperand ( <NUM_LIT> ) . setIsDead ( ) ; BuildMI ( MBB , std :: next ( II ) , dl , TII . get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) ; BuildMI ( MBB , std :: next ( II ) , dl , TII . get ( SubOpc ) , <STR_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) . addImm ( Offset - <NUM_LIT> + <NUM_LIT> ) ; Offset = <NUM_LIT> ; } MI . getOperand ( FIOperandNum ) . ChangeToRegister ( <STR_LIT> , false ) ; assert ( isUInt < <NUM_LIT> > ( Offset ) && <STR_LIT> ) ;

MI . getOperand ( FIOperandNum + <NUM_LIT> ) . ChangeToImmediate ( Offset ) ;


<s> int AddOffset = Offset - <NUM_LIT> + <NUM_LIT> ; if ( ( Offset - <NUM_LIT> + <NUM_LIT> ) > <NUM_LIT> ) { AddOpc = <STR_LIT> ; SubOpc = <STR_LIT> ; AddOffset = - AddOffset ; } BuildMI ( MBB , II , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( <NUM_LIT> ) ; MachineInstr * New = BuildMI ( MBB , II , dl , TII . get ( AddOpc ) , <STR_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) . addImm ( AddOffset ) ; New -> getOperand ( <NUM_LIT> ) . setIsDead ( ) ; BuildMI ( MBB , std :: next ( II ) , dl , TII . get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) ; BuildMI ( MBB , std :: next ( II ) , dl , TII . get ( SubOpc ) , <STR_LIT> ) . addReg ( <STR_LIT> , RegState :: Kill ) . addImm ( Offset - <NUM_LIT> + <NUM_LIT> ) ; Offset = <NUM_LIT> ; } MI . getOperand ( FIOperandNum ) . ChangeToRegister ( <STR_LIT> , false ) ;

assert ( isUInt < <NUM_LIT> > ( Offset ) && <STR_LIT> ) ;


<s> static void foldFrameOffset ( MachineBasicBlock :: iterator & II , int & Offset , Register DstReg ) { MachineInstr & MI = * II ; int Opcode = MI . getOpcode ( ) ; if ( ( Opcode != <STR_LIT> ) && ( Opcode != <STR_LIT> ) ) {


<s> const uint16_t * <ISA_LIT>RegisterInfo :: getCalleeSavedRegs ( const MachineFunction * MF ) const {

const <ISA_LIT>MachineFunctionInfo * AFI = MF -> getInfo < <ISA_LIT>MachineFunctionInfo > ( ) ;


<s> const <ISA_LIT>MachineFunctionInfo * AFI = MF . getInfo < <ISA_LIT>MachineFunctionInfo > ( ) ;

return AFI -> isInterruptOrSignalHandler ( ) ? CSR_Interrupts_RegMask : CSR_Normal_RegMask ;


<s> if ( TFI -> hasFP ( MF ) ) { return <STR_LIT> ; }


<s> const TargetRegisterClass * <ISA_LIT>RegisterInfo :: getLargestLegalSuperClass ( const TargetRegisterClass * RC , const MachineFunction & MF ) const { const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; if ( TRI -> isTypeLegalForClass ( * RC , <STR_LIT> ) ) { return & <STR_LIT> ; } if ( TRI -> isTypeLegalForClass ( * RC , <STR_LIT> ) ) { return & <STR_LIT> ; } llvm_unreachable ( <STR_LIT> ) ;


<s> Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ;


<s> <ISA_LIT>RegisterInfo :: <ISA_LIT>RegisterInfo ( ) : <ISA_LIT>GenRegisterInfo ( <NUM_LIT> ) {


return TargetRegisterInfo :: shouldCoalesce ( MI , SrcRC , SubReg , DstRC , DstSubReg , NewRC , LIS ) ;


<s> if ( this -> getRegClass ( <STR_LIT> ) -> hasSubClassEq ( NewRC ) ) { return false ; } return TargetRegisterInfo :: shouldCoalesce ( MI , SrcRC , SubReg , DstRC , DstSubReg , NewRC , LIS ) ;


<s> assert ( <STR_LIT> . contains ( Reg ) && <STR_LIT> ) ; LoReg = getSubReg ( Reg , <STR_LIT> ) ;


<s> LoReg = getSubReg ( Reg , <STR_LIT> ) ; HiReg = getSubReg ( Reg , <STR_LIT> ) ;


<s> FunctionPass * create<ISA_LIT>RelaxMemPass ( ) {


<s> return <ISA_LIT>_RELAX_MEM_OPS_NAME ;


<s> <ISA_LIT>RelaxMem ( ) : MachineFunctionPass ( ID ) { initialize<ISA_LIT>RelaxMemPass ( * PassRegistry :: getPassRegistry ( ) ) ;


<s> BlockIt MBBI = MBB . begin ( ) , E = MBB . end ( ) ;


<s> MachineInstr & MI = * MBBI ; int Opcode = MBBI -> getOpcode ( ) ; case Op : \ return relax < Op > ( MBB , MI ) switch ( Opcode ) {


<s> bool Modified = false ; const <ISA_LIT>Subtarget & STI = MF . getSubtarget < <ISA_LIT>Subtarget > ( ) ; TII = STI . getInstrInfo ( ) ; for ( Block & MBB : MF ) { bool BlockModified = runOnBasicBlock ( MBB ) ; Modified |= BlockModified ; } return Modified ;


<s> return new <ISA_LIT>ShiftExpand ( ) ;


<s> Builder . SetInsertPoint ( & BB -> back ( ) ) ; Value * ShiftAmount = Builder . CreateTrunc ( BI -> getOperand ( <NUM_LIT> ) , Int8Ty ) ; Value * Cmp1 = Builder . CreateICmpEQ ( ShiftAmount , Int8Zero ) ; Builder . CreateCondBr ( Cmp1 , EndBB , LoopBB ) ; BB -> back ( ) . eraseFromParent ( ) ; Builder . SetInsertPoint ( LoopBB ) ; PHINode * ShiftAmountPHI = Builder . CreatePHI ( Int8Ty , <NUM_LIT> ) ; ShiftAmountPHI -> addIncoming ( ShiftAmount , BB ) ; PHINode * ValuePHI = Builder . CreatePHI ( Int32Ty , <NUM_LIT> ) ; ValuePHI -> addIncoming ( BI -> getOperand ( <NUM_LIT> ) , BB ) ; Value * ShiftAmountSub = Builder . CreateSub ( ShiftAmountPHI , ConstantInt :: get ( Int8Ty , <NUM_LIT> ) ) ; ShiftAmountPHI -> addIncoming ( ShiftAmountSub , LoopBB ) ; Value * ValueShifted ; switch ( BI -> getOpcode ( ) ) { case Instruction :: Shl : ValueShifted = Builder . CreateShl ( ValuePHI , ConstantInt :: get ( Int32Ty , <NUM_LIT> ) ) ; break ; case Instruction :: LShr : ValueShifted = Builder . CreateLShr ( ValuePHI , ConstantInt :: get ( Int32Ty , <NUM_LIT> ) ) ; break ; case Instruction :: AShr :

ValueShifted = Builder . CreateAShr ( ValuePHI , ConstantInt :: get ( Int32Ty , <NUM_LIT> ) ) ;


<s> Function * F = BB -> getParent ( ) ; BasicBlock * EndBB = BB -> splitBasicBlock ( BI , <STR_LIT> ) ; BasicBlock * LoopBB = BasicBlock :: Create ( Ctx , <STR_LIT> , F , EndBB ) ; Builder . SetInsertPoint ( & BB -> back ( ) ) ; Value * ShiftAmount = Builder . CreateTrunc ( BI -> getOperand ( <NUM_LIT> ) , Int8Ty ) ; Value * Cmp1 = Builder . CreateICmpEQ ( ShiftAmount , Int8Zero ) ; Builder . CreateCondBr ( Cmp1 , EndBB , LoopBB ) ; BB -> back ( ) . eraseFromParent ( ) ; Builder . SetInsertPoint ( LoopBB ) ; PHINode * ShiftAmountPHI = Builder . CreatePHI ( Int8Ty , <NUM_LIT> ) ; ShiftAmountPHI -> addIncoming ( ShiftAmount , BB ) ; PHINode * ValuePHI = Builder . CreatePHI ( Int32Ty , <NUM_LIT> ) ; ValuePHI -> addIncoming ( BI -> getOperand ( <NUM_LIT> ) , BB ) ; Value * ShiftAmountSub = Builder . CreateSub ( ShiftAmountPHI , ConstantInt :: get ( Int8Ty , <NUM_LIT> ) ) ; ShiftAmountPHI -> addIncoming ( ShiftAmountSub , LoopBB ) ;


<s> StringRef getPassName ( ) const override {


<s> <ISA_LIT>ShiftExpand ( ) : FunctionPass ( ID ) {


<s> if ( isa < ConstantInt > ( I . getOperand ( <NUM_LIT> ) ) ) continue ; ShiftInsts . push_back ( cast < BinaryOperator > ( & I ) ) ; } for ( auto * I : ShiftInsts ) { expand ( I ) ;


<s> unsigned getELFArch ( ) const { assert ( ELFArch != <NUM_LIT> && <STR_LIT> ) ; return ELFArch ;


<s> const <ISA_LIT>InstrInfo * getInstrInfo ( ) const override {


<s> uint8_t getIORegisterOffset ( ) const { return hasMemMappedGPR ( ) ? <NUM_LIT> : <NUM_LIT> ;


<s> uint8_t getIORegisterOffset ( ) const {

return hasMemMappedGPR ( ) ? <NUM_LIT> : <NUM_LIT> ;


<s> return & InstrInfo . getRegisterInfo ( ) ;


<s> const <ISA_LIT>SelectionDAGInfo * getSelectionDAGInfo ( ) const override { return & TSInfo ;


<s> const <ISA_LIT>TargetLowering * getTargetLowering ( ) const override { return & TLInfo ;


<s> bool hasDES ( ) const { return m_hasDES ;


<s> bool hasEIJMPCALL ( ) const { return m_hasEIJMPCALL ;


<s> bool hasELPMX ( ) const { return m_hasELPMX ;


<s> bool hasMOVW ( ) const { return m_hasMOVW ;


<s> ParseSubtargetFeatures ( CPU , CPU , FS ) ;


<s> <ISA_LIT>Subtarget & <ISA_LIT>Subtarget :: initializeSubtargetDependencies ( StringRef CPU , StringRef FS , const TargetMachine & TM ) {

ParseSubtargetFeatures ( CPU , CPU , FS ) ;


<s> <ISA_LIT>Subtarget :: <ISA_LIT>Subtarget ( const Triple & TT , const std :: string & CPU , const std :: string & FS , const <ISA_LIT>TargetMachine & TM ) : <ISA_LIT>GenSubtargetInfo ( TT , CPU , CPU , FS ) , ELFArch ( <NUM_LIT> ) , m_hasSRAM ( false ) , m_hasJMPCALL ( false ) , m_hasIJMPCALL ( false ) , m_hasEIJMPCALL ( false ) , m_hasADDSUBIW ( false ) , m_hasSmallStack ( false ) , m_hasMOVW ( false ) , m_hasLPM ( false ) , m_hasLPMX ( false ) , m_hasELPM ( false ) , m_hasELPMX ( false ) , m_hasSPM ( false ) , m_hasSPMX ( false ) , m_hasDES ( false ) , m_supportsRMW ( false ) , m_supportsMultiplication ( false ) , m_hasBREAK ( false ) , m_hasTinyEncoding ( false ) , m_hasMemMappedGPR ( false ) , m_FeatureSetDummy ( false ) , InstrInfo ( ) , FrameLowering ( ) , TLInfo ( TM , initializeSubtargetDependencies ( CPU , FS , TM ) ) , TSInfo ( ) {


<s> bool supportsRMW ( ) const { return m_supportsRMW ;


<s> static Target The<ISA_LIT>Target ; return The<ISA_LIT>Target ;


<s> llvm :: RegisterTarget < llvm :: Triple :: <ISA_LIT> > X ( llvm :: getThe<ISA_LIT>Target ( ) , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ;


<s> LLVM_EXTERNAL_VISIBILITY void LLVMInitialize<ISA_LIT>TargetInfo ( ) { llvm :: RegisterTarget < llvm :: Triple :: <ISA_LIT> > X ( llvm :: getThe<ISA_LIT>Target ( ) , <STR_LIT> , <STR_LIT> , <STR_LIT> ) ;


<s> bool <ISA_LIT>PassConfig :: addInstSelector ( ) { addPass ( create<ISA_LIT>ISelDag ( get<ISA_LIT>TargetMachine ( ) , getOptLevel ( ) ) ) ;

addPass ( create<ISA_LIT>FrameAnalyzerPass ( ) ) ;


<s> addPass ( create<ISA_LIT>ShiftExpandPass ( ) ) ; TargetPassConfig :: addIRPasses ( ) ;


<s> addPass ( create<ISA_LIT>ShiftExpandPass ( ) ) ;


<s> void <ISA_LIT>PassConfig :: addPreEmitPass ( ) { addPass ( & BranchRelaxationPassID ) ;


<s> addPass ( create<ISA_LIT>DynAllocaSRPass ( ) ) ;


<s> addPass ( create<ISA_LIT>RelaxMemPass ( ) ) ; addPass ( create<ISA_LIT>ExpandPseudoPass ( ) ) ;


<s> addPass ( create<ISA_LIT>ExpandPseudoPass ( ) ) ;


<s> TargetPassConfig * <ISA_LIT>TargetMachine :: createPassConfig ( PassManagerBase & PM ) { return new <ISA_LIT>PassConfig ( * this , PM ) ;


<s> static StringRef getCPU ( StringRef CPU ) {

if ( CPU . empty ( ) || CPU == <STR_LIT> ) {


<s> static Reloc :: Model getEffectiveRelocModel ( Optional < Reloc :: Model > RM ) {

return RM . getValueOr ( Reloc :: Static ) ;


<s> static Reloc :: Model getEffectiveRelocModel ( Optional < Reloc :: Model > RM ) { return RM . getValueOr ( Reloc :: Static ) ;


<s> <ISA_LIT>TargetMachine & get<ISA_LIT>TargetMachine ( ) const {

return getTM < <ISA_LIT>TargetMachine > ( ) ;


<s> <ISA_LIT>TargetMachine & get<ISA_LIT>TargetMachine ( ) const { return getTM < <ISA_LIT>TargetMachine > ( ) ;


<s> <ISA_LIT>PassConfig ( <ISA_LIT>TargetMachine & TM , PassManagerBase & PM ) : TargetPassConfig ( TM , PM ) {


<s> <ISA_LIT>TargetMachine :: <ISA_LIT>TargetMachine ( const Target & T , const Triple & TT , StringRef CPU , StringRef FS , const TargetOptions & Options , Optional < Reloc :: Model > RM , Optional < CodeModel :: Model > CM , CodeGenOpt :: Level OL , bool JIT ) : LLVMTargetMachine ( T , <ISA_LIT>DataLayout , TT , getCPU ( CPU ) , FS , Options , getEffectiveRelocModel ( RM ) , getEffectiveCodeModel ( CM , CodeModel :: Small ) , OL ) , SubTarget ( TT , std :: string ( getCPU ( CPU ) ) , std :: string ( FS ) , * this ) { this -> TLOF = std :: make_unique < <ISA_LIT>TargetObjectFile > ( ) ;


<s> if ( <STR_LIT> ( GO ) && ! GO -> hasSection ( ) && Kind . isReadOnly ( ) ) return ProgmemDataSection ;

return Base :: SelectSectionForGlobal ( GO , Kind , TM ) ;


<s> void <ISA_LIT>TargetStreamer :: finish ( ) { MCStreamer & OS = getStreamer ( ) ; MCContext & Context = OS . getContext ( ) ;

MCSymbol * DoCopyData = Context . getOrCreateSymbol ( <STR_LIT> ) ;


<s> <ISA_LIT>TargetAsmStreamer :: <ISA_LIT>TargetAsmStreamer ( MCStreamer & S ) : <ISA_LIT>TargetStreamer ( S ) {


<s> <ISA_LIT>TargetStreamer :: <ISA_LIT>TargetStreamer ( MCStreamer & S ) : MCTargetStreamer ( S ) {


<s> inline bool isProgramMemoryAccess ( MemSDNode const * N ) {

auto V = N -> getMemOperand ( ) -> getValue ( ) ;


<s> bool isProgramMemoryAddress ( T * V ) { return cast < PointerType > ( V -> getType ( ) ) -> getAddressSpace ( ) == ProgramMemory ;