{"ground_truth": ["", "void", "getAnalysisUsage", "(", "AnalysisUsage", "&", "AU", ")", "const", "override", "{", "AU", ".", "setPreservesCFG", "(", ")", ";", "AU", ".", "addRequired", "<", "MachineLoopInfo", ">", "(", ")", ";", "MachineFunctionPass", "::", "getAnalysisUsage", "(", "AU", ")", ";", "}", ""], "natrual_language": ["getAnalysisUsage", "-", "Subclasses", "that", "override", "getAnalysisUsage", "must", "call", "this", "."], "TS_V_token": ["RI5CY"], "File": "PULPFixupHwLoops", "Func": "getAnalysisUsage", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 0, "Length": 33, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "\"PULP Hardware Loop Fixup\"", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "\"PULP Hardware Loop Fixup\""], "File": "PULPFixupHwLoops", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 1, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "PULPFixupHwLoops", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "if", "(", "skipFunction", "(", "MF", ".", "getFunction", "(", ")", ")", ")", "{", "return", "false", ";", "}", "bool", "fixedPreHd", "=", "fixupLoopPreheader", "(", "MF", ")", ";", "bool", "fixedLatch", "=", "fixupLoopLatch", "(", "MF", ")", ";", "bool", "fixedInstr", "=", "fixupLoopInstrs", "(", "MF", ")", ";", "for", "(", "MachineBasicBlock", "&", "MBB", ":", "MF", ")", "{", "unsigned", "instrs", "=", "0", ";", "for", "(", "MachineInstr", "&", "MI", ":", "MBB", ")", "{", "instrs", "++", ";", "if", "(", "isHardwareLoop", "(", "MI", ")", "&&", "instrs", ">", "1", ")", "{", "MachineBasicBlock", "*", "New", "=", "splitMBBAt", "(", "&", "MBB", ",", "MI", ")", ";", "if", "(", "New", "==", "&", "MBB", ")", "{", "continue", ";", "}", "New", "->", "setAlignment", "(", "Align", "(", "4", ")", ")", ";", "break", ";", "}", "}", "}", "return", "fixedPreHd", "||", "fixedLatch", "||", "fixedInstr", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "0", "1", "4"], "File": "PULPFixupHwLoops", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 2, "Length": 134, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "getAnalysisUsage", "(", "AnalysisUsage", "&", "AU", ")", "const", "override", "{", "AU", ".", "addRequired", "<", "MachineDominatorTree", ">", "(", ")", ";", "AU", ".", "addRequired", "<", "MachineLoopInfo", ">", "(", ")", ";", "MachineFunctionPass", "::", "getAnalysisUsage", "(", "AU", ")", ";", "}", ""], "natrual_language": ["getAnalysisUsage", "-", "Subclasses", "that", "override", "getAnalysisUsage", "must", "call", "this", "."], "TS_V_token": ["RI5CY"], "File": "PULPHardwareLoops", "Func": "getAnalysisUsage", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 3, "Length": 36, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "\"PULP Hardware Loops\"", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "\"PULP Hardware Loops\""], "File": "PULPHardwareLoops", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 4, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "getReg", "(", ")", "const", "{", "assert", "(", "isReg", "(", ")", "&&", "\"Wrong CountValue accessor\"", ")", ";", "return", "Contents", ".", "R", ".", "Reg", ";", "}", ""], "natrual_language": ["Returns", "the", "register", "associated", "with", "this", "edge", "."], "TS_V_token": ["RI5CY", "\"Wrong CountValue accessor\""], "File": "PULPHardwareLoops", "Func": "getReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 5, "Length": 23, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "getSubReg", "(", ")", "const", "{", "assert", "(", "isReg", "(", ")", "&&", "\"Wrong CountValue accessor\"", ")", ";", "return", "Contents", ".", "R", ".", "Sub", ";", "}", ""], "natrual_language": ["Returns", "the", "physical", "register", "number", "of", "sub-register", "``", "Index", "''", "for", "physical", "register", "RegNo", "."], "TS_V_token": ["RI5CY", "\"Wrong CountValue accessor\""], "File": "PULPHardwareLoops", "Func": "getSubReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 6, "Length": 23, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "PULPHardwareLoops", "::", "isDead", "(", "const", "MachineInstr", "*", "MI", ",", "SmallVectorImpl", "<", "MachineInstr", "*", ">", "&", "DeadPhis", ")", "const", "{", "for", "(", "unsigned", "i", "=", "0", ",", "e", "=", "MI", "->", "getNumOperands", "(", ")", ";", "i", "!=", "e", ";", "++", "i", ")", "{", "const", "MachineOperand", "&", "MO", "=", "MI", "->", "getOperand", "(", "i", ")", ";", "if", "(", "!", "MO", ".", "isReg", "(", ")", "||", "!", "MO", ".", "isDef", "(", ")", ")", "continue", ";", "unsigned", "Reg", "=", "MO", ".", "getReg", "(", ")", ";", "if", "(", "MRI", "->", "use_nodbg_empty", "(", "Reg", ")", ")", "continue", ";", "using", "use_nodbg_iterator", "=", "MachineRegisterInfo", "::", "use_nodbg_iterator", ";", "use_nodbg_iterator", "I", "=", "MRI", "->", "use_nodbg_begin", "(", "Reg", ")", ";", "use_nodbg_iterator", "End", "=", "MRI", "->", "use_nodbg_end", "(", ")", ";", "if", "(", "std", "::", "next", "(", "I", ")", "!=", "End", "||", "!", "I", "->", "getParent", "(", ")", "->", "isPHI", "(", ")", ")", "return", "false", ";", "MachineInstr", "*", "OnePhi", "=", "I", "->", "getParent", "(", ")", ";", "for", "(", "unsigned", "j", "=", "0", ",", "f", "=", "OnePhi", "->", "getNumOperands", "(", ")", ";", "j", "!=", "f", ";", "++", "j", ")", "{", "const", "MachineOperand", "&", "OPO", "=", "OnePhi", "->", "getOperand", "(", "j", ")", ";", "if", "(", "!", "OPO", ".", "isReg", "(", ")", "||", "!", "OPO", ".", "isDef", "(", ")", ")", "continue", ";", "unsigned", "OPReg", "=", "OPO", ".", "getReg", "(", ")", ";", "use_nodbg_iterator", "nextJ", ";", "for", "(", "use_nodbg_iterator", "J", "=", "MRI", "->", "use_nodbg_begin", "(", "OPReg", ")", ";", "J", "!=", "End", ";", "J", "=", "nextJ", ")", "{", "nextJ", "=", "std", "::", "next", "(", "J", ")", ";", "MachineOperand", "&", "Use", "=", "*", "J", ";", "MachineInstr", "*", "UseMI", "=", "Use", ".", "getParent", "(", ")", ";", "if", "(", "MI", "!=", "UseMI", ")", "return", "false", ";", "}", "}", "DeadPhis", ".", "push_back", "(", "OnePhi", ")", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["isDead", "-", "Returns", "true", "if", "this", "is", "a", "dead", "def", "kill", "slot", "."], "TS_V_token": ["RI5CY", "0", "0"], "File": "PULPHardwareLoops", "Func": "isDead", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 7, "Length": 289, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isImm", "(", ")", "const", "{", "return", "Kind", "==", "CV_Immediate", ";", "}", ""], "natrual_language": ["isImm", "-", "Is", "this", "an", "immediate", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "PULPHardwareLoops", "Func": "isImm", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 8, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isReg", "(", ")", "const", "{", "return", "Kind", "==", "CV_Register", ";", "}", ""], "natrual_language": ["isReg", "-", "Is", "this", "a", "register", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "PULPHardwareLoops", "Func": "isReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 9, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "static", "bool", "isSigned", "(", "Kind", "Cmp", ")", "{", "return", "(", "Cmp", "&", "(", "L", "|", "G", ")", "&&", "!", "(", "Cmp", "&", "U", ")", ")", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "all", "source", "operands", "of", "the", "recurrence", "are", "SExtInsts", "."], "TS_V_token": ["RI5CY"], "File": "PULPHardwareLoops", "Func": "isSigned", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 10, "Length": 27, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "print", "(", "raw_ostream", "&", "OS", ",", "const", "TargetRegisterInfo", "*", "TRI", "=", "nullptr", ")", "const", "{", "if", "(", "isReg", "(", ")", ")", "{", "OS", "<<", "printReg", "(", "Contents", ".", "R", ".", "Reg", ",", "TRI", ",", "Contents", ".", "R", ".", "Sub", ")", ";", "}", "if", "(", "isImm", "(", ")", ")", "{", "OS", "<<", "Contents", ".", "ImmVal", ";", "}", "}", ""], "natrual_language": ["print", "-", "Print", "a", "debug", "representation", "of", "the", "operand", "to", "the", "given", "stream", "."], "TS_V_token": ["RI5CY"], "File": "PULPHardwareLoops", "Func": "print", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 11, "Length": 58, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "PULPHardwareLoops", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"********* PULP Hardware Loops *********\\n\"", ")", ";", "if", "(", "!", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "hasPULPExtV2", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "skipFunction", "(", "MF", ".", "getFunction", "(", ")", ")", ")", "{", "return", "false", ";", "}", "bool", "Changed", "=", "false", ";", "NumHWLoopsInternal", "=", "0", ";", "MLI", "=", "&", "getAnalysis", "<", "MachineLoopInfo", ">", "(", ")", ";", "MRI", "=", "&", "MF", ".", "getRegInfo", "(", ")", ";", "MDT", "=", "&", "getAnalysis", "<", "MachineDominatorTree", ">", "(", ")", ";", "const", "RISCVSubtarget", "&", "HST", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "TII", "=", "HST", ".", "getInstrInfo", "(", ")", ";", "TRI", "=", "HST", ".", "getRegisterInfo", "(", ")", ";", "for", "(", "auto", "&", "L", ":", "*", "MLI", ")", "if", "(", "!", "L", "->", "getParentLoop", "(", ")", ")", "{", "bool", "L0Used", "=", "false", ";", "bool", "L1Used", "=", "false", ";", "KnownHardwareLoops", ".", "clear", "(", ")", ";", "Changed", "|=", "convertToHardwareLoop", "(", "L", ",", "L0Used", ",", "L1Used", ")", ";", "}", "if", "(", "Changed", ")", "{", "errs", "(", ")", ".", "changeColor", "(", "raw_fd_ostream", "::", "Colors", "::", "BLUE", ",", "true", ")", ";", "errs", "(", ")", "<<", "\"Created \"", "<<", "NumHWLoopsInternal", "<<", "\" hardware loops in \"", "<<", "MF", ".", "getName", "(", ")", "<<", "\"!\\n\"", ";", "errs", "(", ")", ".", "resetColor", "(", ")", ";", "}", "return", "Changed", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "\"********* PULP Hardware Loops *********\\n\"", "RISCV", "0", "RISCV", "RISCV", "\"Created \"", "\" hardware loops in \"", "\"!\\n\""], "File": "PULPHardwareLoops", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 12, "Length": 222, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVAsmBackend", "::", "applyFixup", "(", "const", "MCAssembler", "&", "Asm", ",", "const", "MCFixup", "&", "Fixup", ",", "const", "MCValue", "&", "Target", ",", "MutableArrayRef", "<", "char", ">", "Data", ",", "uint64_t", "Value", ",", "bool", "IsResolved", ",", "const", "MCSubtargetInfo", "*", "STI", ")", "const", "{", "MCFixupKind", "Kind", "=", "Fixup", ".", "getKind", "(", ")", ";", "if", "(", "Kind", ">=", "FirstLiteralRelocationKind", ")", "return", ";", "MCContext", "&", "Ctx", "=", "Asm", ".", "getContext", "(", ")", ";", "MCFixupKindInfo", "Info", "=", "getFixupKindInfo", "(", "Kind", ")", ";", "if", "(", "!", "Value", ")", "return", ";", "Value", "=", "adjustFixupValue", "(", "Fixup", ",", "Value", ",", "Ctx", ")", ";", "Value", "<<=", "Info", ".", "TargetOffset", ";", "unsigned", "Offset", "=", "Fixup", ".", "getOffset", "(", ")", ";", "unsigned", "NumBytes", "=", "alignTo", "(", "Info", ".", "TargetSize", "+", "Info", ".", "TargetOffset", ",", "8", ")", "/", "8", ";", "assert", "(", "Offset", "+", "NumBytes", "<=", "Data", ".", "size", "(", ")", "&&", "\"Invalid fixup offset!\"", ")", ";", "for", "(", "unsigned", "i", "=", "0", ";", "i", "!=", "NumBytes", ";", "++", "i", ")", "{", "Data", "[", "Offset", "+", "i", "]", "|=", "uint8_t", "(", "(", "Value", ">>", "(", "i", "*", "8", ")", ")", "&", "0xff", ")", ";", "}", "}", ""], "natrual_language": ["Apply", "the", "Value", "for", "given", "Fixup", "into", "the", "provided", "data", "fragment", ",", "at", "the", "offset", "specified", "by", "the", "fixup", "and", "following", "the", "fixup", "kind", "as", "appropriate", "."], "TS_V_token": ["RI5CY", "RISCV", "8", "8", "\"Invalid fixup offset!\"", "0", "8", "0xff"], "File": "RISCVAsmBackend", "Func": "applyFixup", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 13, "Length": 179, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "fixupNeedsRelaxation", "(", "const", "MCFixup", "&", "Fixup", ",", "uint64_t", "Value", ",", "const", "MCRelaxableFragment", "*", "DF", ",", "const", "MCAsmLayout", "&", "Layout", ")", "const", "override", "{", "llvm_unreachable", "(", "\"Handled by fixupNeedsRelaxationAdvanced\"", ")", ";", "}", ""], "natrual_language": ["Simple", "predicate", "for", "targets", "where", "!", "Resolved", "implies", "requiring", "relaxation", "."], "TS_V_token": ["RI5CY", "\"Handled by fixupNeedsRelaxationAdvanced\""], "File": "RISCVAsmBackend", "Func": "fixupNeedsRelaxation", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 14, "Length": 30, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "fixupNeedsRelaxationAdvanced", "(", "const", "MCFixup", "&", "Fixup", ",", "bool", "Resolved", ",", "uint64_t", "Value", ",", "const", "MCRelaxableFragment", "*", "DF", ",", "const", "MCAsmLayout", "&", "Layout", ",", "const", "bool", "WasForced", ")", "const", "{", "if", "(", "!", "Resolved", "&&", "!", "WasForced", ")", "return", "true", ";", "int64_t", "Offset", "=", "int64_t", "(", "Value", ")", ";", "switch", "(", "Fixup", ".", "getTargetKind", "(", ")", ")", "{", "default", ":", "return", "false", ";", "case", "RISCV", "::", "fixup_riscv_rvc_branch", ":", "return", "Offset", ">", "254", "||", "Offset", "<", "-", "256", ";", "case", "RISCV", "::", "fixup_riscv_rvc_jump", ":", "return", "Offset", ">", "2046", "||", "Offset", "<", "-", "2048", ";", "}", "}", ""], "natrual_language": ["Target", "specific", "predicate", "for", "whether", "a", "given", "fixup", "requires", "the", "associated", "instruction", "to", "be", "relaxed", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::fixup_riscv_rvc_branch", "254", "256", "RISCV::fixup_riscv_rvc_jump", "2046", "2048"], "File": "RISCVAsmBackend", "Func": "fixupNeedsRelaxationAdvanced", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 15, "Length": 97, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Optional", "<", "MCFixupKind", ">", "RISCVAsmBackend", "::", "getFixupKind", "(", "StringRef", "Name", ")", "const", "{", "if", "(", "STI", ".", "getTargetTriple", "(", ")", ".", "isOSBinFormatELF", "(", ")", ")", "{", "unsigned", "Type", ";", "Type", "=", "llvm", "::", "StringSwitch", "<", "unsigned", ">", "(", "Name", ")", ".", "Default", "(", "-", "1u", ")", ";", "if", "(", "Type", "!=", "-", "1u", ")", "return", "static_cast", "<", "MCFixupKind", ">", "(", "FirstLiteralRelocationKind", "+", "Type", ")", ";", "}", "return", "None", ";", "}", ""], "natrual_language": ["getFixupKind", "-", "Get", "the", "fixup", "kind", "of", "this", "expression", "."], "TS_V_token": ["RI5CY", "RISCV", "1u", "1u"], "File": "RISCVAsmBackend", "Func": "getFixupKind", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 16, "Length": 70, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "MCFixupKindInfo", "&", "RISCVAsmBackend", "::", "getFixupKindInfo", "(", "MCFixupKind", "Kind", ")", "const", "{", "const", "static", "MCFixupKindInfo", "Infos", "[", "]", "=", "{", "{", "\"fixup_riscv_hi20\"", ",", "12", ",", "20", ",", "0", "}", ",", "{", "\"fixup_riscv_lo12_i\"", ",", "20", ",", "12", ",", "0", "}", ",", "{", "\"fixup_riscv_lo12_s\"", ",", "0", ",", "32", ",", "0", "}", ",", "{", "\"fixup_riscv_pcrel_hi20\"", ",", "12", ",", "20", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "|", "MCFixupKindInfo", "::", "FKF_IsTarget", "}", ",", "{", "\"fixup_riscv_pcrel_lo12_i\"", ",", "20", ",", "12", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "|", "MCFixupKindInfo", "::", "FKF_IsTarget", "}", ",", "{", "\"fixup_riscv_pcrel_lo12_s\"", ",", "0", ",", "32", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "|", "MCFixupKindInfo", "::", "FKF_IsTarget", "}", ",", "{", "\"fixup_riscv_got_hi20\"", ",", "12", ",", "20", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_tprel_hi20\"", ",", "12", ",", "20", ",", "0", "}", ",", "{", "\"fixup_riscv_tprel_lo12_i\"", ",", "20", ",", "12", ",", "0", "}", ",", "{", "\"fixup_riscv_tprel_lo12_s\"", ",", "0", ",", "32", ",", "0", "}", ",", "{", "\"fixup_riscv_tprel_add\"", ",", "0", ",", "0", ",", "0", "}", ",", "{", "\"fixup_riscv_tls_got_hi20\"", ",", "12", ",", "20", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_tls_gd_hi20\"", ",", "12", ",", "20", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_jal\"", ",", "12", ",", "20", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_branch\"", ",", "0", ",", "32", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_rvc_jump\"", ",", "2", ",", "11", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_rvc_branch\"", ",", "0", ",", "16", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_call\"", ",", "0", ",", "64", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_call_plt\"", ",", "0", ",", "64", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_riscv_relax\"", ",", "0", ",", "0", ",", "0", "}", ",", "{", "\"fixup_riscv_align\"", ",", "0", ",", "0", ",", "0", "}", ",", "{", "\"fixup_pulpv2_loop_setup\"", ",", "20", ",", "12", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", ",", "{", "\"fixup_pulpv2_loop_setupi\"", ",", "15", ",", "5", ",", "MCFixupKindInfo", "::", "FKF_IsPCRel", "}", "}", ";", "static_assert", "(", "(", "array_lengthof", "(", "Infos", ")", ")", "==", "RISCV", "::", "NumTargetFixupKinds", ",", "\"Not all fixup kinds added to Infos array\"", ")", ";", "if", "(", "Kind", ">=", "FirstLiteralRelocationKind", ")", "return", "MCAsmBackend", "::", "getFixupKindInfo", "(", "FK_NONE", ")", ";", "if", "(", "Kind", "<", "FirstTargetFixupKind", ")", "return", "MCAsmBackend", "::", "getFixupKindInfo", "(", "Kind", ")", ";", "assert", "(", "unsigned", "(", "Kind", "-", "FirstTargetFixupKind", ")", "<", "getNumFixupKinds", "(", ")", "&&", "\"Invalid kind!\"", ")", ";", "return", "Infos", "[", "Kind", "-", "FirstTargetFixupKind", "]", ";", "}", ""], "natrual_language": ["Get", "information", "on", "a", "fixup", "kind", "."], "TS_V_token": ["RI5CY", "RISCV", "\"fixup_riscv_hi20\"", "12", "20", "0", "\"fixup_riscv_lo12_i\"", "20", "12", "0", "\"fixup_riscv_lo12_s\"", "0", "32", "0", "\"fixup_riscv_pcrel_hi20\"", "12", "20", "\"fixup_riscv_pcrel_lo12_i\"", "20", "12", "\"fixup_riscv_pcrel_lo12_s\"", "0", "32", "\"fixup_riscv_got_hi20\"", "12", "20", "\"fixup_riscv_tprel_hi20\"", "12", "20", "0", "\"fixup_riscv_tprel_lo12_i\"", "20", "12", "0", "\"fixup_riscv_tprel_lo12_s\"", "0", "32", "0", "\"fixup_riscv_tprel_add\"", "0", "0", "0", "\"fixup_riscv_tls_got_hi20\"", "12", "20", "\"fixup_riscv_tls_gd_hi20\"", "12", "20", "\"fixup_riscv_jal\"", "12", "20", "\"fixup_riscv_branch\"", "0", "32", "\"fixup_riscv_rvc_jump\"", "2", "11", "\"fixup_riscv_rvc_branch\"", "0", "16", "\"fixup_riscv_call\"", "0", "64", "\"fixup_riscv_call_plt\"", "0", "64", "\"fixup_riscv_relax\"", "0", "0", "0", "\"fixup_riscv_align\"", "0", "0", "0", "\"fixup_pulpv2_loop_setup\"", "20", "12", "\"fixup_pulpv2_loop_setupi\"", "15", "5", "RISCV::NumTargetFixupKinds", "\"Not all fixup kinds added to Infos array\"", "\"Invalid kind!\""], "File": "RISCVAsmBackend", "Func": "getFixupKindInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 17, "Length": 360, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "getNumFixupKinds", "(", ")", "const", "override", "{", "return", "RISCV", "::", "NumTargetFixupKinds", ";", "}", ""], "natrual_language": ["Get", "the", "number", "of", "target", "specific", "fixup", "kinds", "."], "TS_V_token": ["RI5CY", "RISCV::NumTargetFixupKinds"], "File": "RISCVAsmBackend", "Func": "getNumFixupKinds", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 18, "Length": 13, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "mayNeedRelaxation", "(", "const", "MCInst", "&", "Inst", ",", "const", "MCSubtargetInfo", "&", "STI", ")", "const", "{", "return", "getRelaxedOpcode", "(", "Inst", ".", "getOpcode", "(", ")", ")", "!=", "Inst", ".", "getOpcode", "(", ")", ";", "}", ""], "natrual_language": ["Check", "whether", "the", "given", "instruction", "may", "need", "relaxation", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVAsmBackend", "Func": "mayNeedRelaxation", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 19, "Length": 34, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVAsmBackend", "::", "relaxInstruction", "(", "MCInst", "&", "Inst", ",", "const", "MCSubtargetInfo", "&", "STI", ")", "const", "{", "MCInst", "Res", ";", "switch", "(", "Inst", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Opcode not expected!\"", ")", ";", "case", "RISCV", "::", "C_BEQZ", ":", "Res", ".", "setOpcode", "(", "RISCV", "::", "BEQ", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "0", ")", ")", ";", "Res", ".", "addOperand", "(", "MCOperand", "::", "createReg", "(", "RISCV", "::", "X0", ")", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "1", ")", ")", ";", "break", ";", "case", "RISCV", "::", "C_BNEZ", ":", "Res", ".", "setOpcode", "(", "RISCV", "::", "BNE", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "0", ")", ")", ";", "Res", ".", "addOperand", "(", "MCOperand", "::", "createReg", "(", "RISCV", "::", "X0", ")", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "1", ")", ")", ";", "break", ";", "case", "RISCV", "::", "C_J", ":", "Res", ".", "setOpcode", "(", "RISCV", "::", "JAL", ")", ";", "Res", ".", "addOperand", "(", "MCOperand", "::", "createReg", "(", "RISCV", "::", "X0", ")", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "0", ")", ")", ";", "break", ";", "case", "RISCV", "::", "C_JAL", ":", "Res", ".", "setOpcode", "(", "RISCV", "::", "JAL", ")", ";", "Res", ".", "addOperand", "(", "MCOperand", "::", "createReg", "(", "RISCV", "::", "X1", ")", ")", ";", "Res", ".", "addOperand", "(", "Inst", ".", "getOperand", "(", "0", ")", ")", ";", "break", ";", "}", "Inst", "=", "std", "::", "move", "(", "Res", ")", ";", "}", ""], "natrual_language": ["Relax", "the", "instruction", "in", "the", "given", "fragment", "to", "the", "next", "wider", "instruction", "."], "TS_V_token": ["RI5CY", "RISCV", "\"Opcode not expected!\"", "RISCV::C_BEQZ", "RISCV::BEQ", "0", "RISCV::X0", "1", "RISCV::C_BNEZ", "RISCV::BNE", "0", "RISCV::X0", "1", "RISCV::C_J", "RISCV::JAL", "RISCV::X0", "0", "RISCV::C_JAL", "RISCV::JAL", "RISCV::X1", "0"], "File": "RISCVAsmBackend", "Func": "relaxInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 20, "Length": 238, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "shouldForceRelocation", "(", "const", "MCAssembler", "&", "Asm", ",", "const", "MCFixup", "&", "Fixup", ",", "const", "MCValue", "&", "Target", ")", "{", "if", "(", "Fixup", ".", "getKind", "(", ")", ">=", "FirstLiteralRelocationKind", ")", "return", "true", ";", "switch", "(", "Fixup", ".", "getTargetKind", "(", ")", ")", "{", "default", ":", "break", ";", "case", "FK_Data_1", ":", "case", "FK_Data_2", ":", "case", "FK_Data_4", ":", "case", "FK_Data_8", ":", "if", "(", "Target", ".", "isAbsolute", "(", ")", ")", "return", "false", ";", "break", ";", "case", "RISCV", "::", "fixup_riscv_got_hi20", ":", "case", "RISCV", "::", "fixup_riscv_tls_got_hi20", ":", "case", "RISCV", "::", "fixup_riscv_tls_gd_hi20", ":", "return", "true", ";", "case", "RISCV", "::", "fixup_pulpv2_loop_setup", ":", "case", "RISCV", "::", "fixup_pulpv2_loop_setupi", ":", "return", "false", ";", "}", "return", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureRelax", "]", "||", "ForceRelocs", ";", "}", ""], "natrual_language": ["Hook", "to", "check", "if", "a", "relocation", "is", "needed", "for", "some", "target", "specific", "reason", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::fixup_riscv_got_hi20", "RISCV::fixup_riscv_tls_got_hi20", "RISCV::fixup_riscv_tls_gd_hi20", "RISCV::fixup_pulpv2_loop_setup", "RISCV::fixup_pulpv2_loop_setupi", "RISCV::FeatureRelax"], "File": "RISCVAsmBackend", "Func": "shouldForceRelocation", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 21, "Length": 119, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "shouldInsertExtraNopBytesForCodeAlign", "(", "const", "MCAlignFragment", "&", "AF", ",", "unsigned", "&", "Size", ")", "{", "if", "(", "!", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureRelax", "]", ")", "return", "false", ";", "bool", "HasStdExtC", "=", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureStdExtC", "]", ";", "unsigned", "MinNopLen", "=", "HasStdExtC", "?", "2", ":", "4", ";", "if", "(", "AF", ".", "getAlignment", "(", ")", "<=", "MinNopLen", ")", "{", "return", "false", ";", "}", "else", "{", "Size", "=", "AF", ".", "getAlignment", "(", ")", "-", "MinNopLen", ";", "return", "true", ";", "}", "}", ""], "natrual_language": ["Hook", "to", "check", "if", "extra", "nop", "bytes", "must", "be", "inserted", "for", "alignment", "directive", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FeatureRelax", "RISCV::FeatureStdExtC", "2", "4"], "File": "RISCVAsmBackend", "Func": "shouldInsertExtraNopBytesForCodeAlign", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 22, "Length": 87, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "shouldInsertFixupForCodeAlign", "(", "MCAssembler", "&", "Asm", ",", "const", "MCAsmLayout", "&", "Layout", ",", "MCAlignFragment", "&", "AF", ")", "{", "if", "(", "!", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureRelax", "]", ")", "return", "false", ";", "unsigned", "Count", ";", "if", "(", "!", "shouldInsertExtraNopBytesForCodeAlign", "(", "AF", ",", "Count", ")", "||", "(", "Count", "==", "0", ")", ")", "return", "false", ";", "MCContext", "&", "Ctx", "=", "Asm", ".", "getContext", "(", ")", ";", "const", "MCExpr", "*", "Dummy", "=", "MCConstantExpr", "::", "create", "(", "0", ",", "Ctx", ")", ";", "MCFixup", "Fixup", "=", "MCFixup", "::", "create", "(", "0", ",", "Dummy", ",", "MCFixupKind", "(", "RISCV", "::", "fixup_riscv_align", ")", ",", "SMLoc", "(", ")", ")", ";", "uint64_t", "FixedValue", "=", "0", ";", "MCValue", "NopBytes", "=", "MCValue", "::", "get", "(", "Count", ")", ";", "Asm", ".", "getWriter", "(", ")", ".", "recordRelocation", "(", "Asm", ",", "Layout", ",", "&", "AF", ",", "Fixup", ",", "NopBytes", ",", "FixedValue", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["Hook", "which", "indicates", "if", "the", "target", "requires", "a", "fixup", "to", "be", "generated", "when", "handling", "an", "align", "directive", "in", "an", "executable", "section", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FeatureRelax", "0", "0", "0", "RISCV::fixup_riscv_align", "0"], "File": "RISCVAsmBackend", "Func": "shouldInsertFixupForCodeAlign", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 23, "Length": 146, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmBackend", "::", "writeNopData", "(", "raw_ostream", "&", "OS", ",", "uint64_t", "Count", ")", "const", "{", "bool", "HasStdExtC", "=", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureStdExtC", "]", ";", "unsigned", "MinNopLen", "=", "HasStdExtC", "?", "2", ":", "4", ";", "if", "(", "(", "Count", "%", "MinNopLen", ")", "!=", "0", ")", "return", "false", ";", "for", "(", ";", "Count", ">=", "4", ";", "Count", "-=", "4", ")", "OS", ".", "write", "(", "\"\\x13\\0\\0\\0\"", ",", "4", ")", ";", "if", "(", "Count", "&&", "HasStdExtC", ")", "OS", ".", "write", "(", "\"\\x01\\0\"", ",", "2", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["Write", "an", "(", "optimal", ")", "nop", "sequence", "of", "Count", "bytes", "to", "the", "given", "output", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FeatureStdExtC", "2", "4", "0", "4", "4", "\"\\x13\\0\\0\\0\"", "4", "\"\\x01\\0\"", "2"], "File": "RISCVAsmBackend", "Func": "writeNopData", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 24, "Length": 89, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "addExpr", "(", "MCInst", "&", "Inst", ",", "const", "MCExpr", "*", "Expr", ")", "const", "{", "assert", "(", "Expr", "&&", "\"Expr shouldn't be null!\"", ")", ";", "int64_t", "Imm", "=", "0", ";", "RISCVMCExpr", "::", "VariantKind", "VK", "=", "RISCVMCExpr", "::", "VK_RISCV_None", ";", "bool", "IsConstant", "=", "evaluateConstantImm", "(", "Expr", ",", "Imm", ",", "VK", ")", ";", "if", "(", "IsConstant", ")", "Inst", ".", "addOperand", "(", "MCOperand", "::", "createImm", "(", "Imm", ")", ")", ";", "else", "Inst", ".", "addOperand", "(", "MCOperand", "::", "createExpr", "(", "Expr", ")", ")", ";", "}", ""], "natrual_language": ["Add", "a", "new", "MCExpr", "operand", "."], "TS_V_token": ["RI5CY", "\"Expr shouldn't be null!\"", "0", "RISCV", "RISCV", "RISCV"], "File": "RISCVAsmParser", "Func": "addExpr", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 25, "Length": 77, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "SMLoc", "getEndLoc", "(", ")", "const", "override", "{", "return", "EndLoc", ";", "}", ""], "natrual_language": ["getEndLoc", "-", "Get", "the", "location", "of", "the", "last", "token", "of", "this", "operand", "."], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "getEndLoc", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 26, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "SMLoc", "getLoc", "(", ")", "const", "{", "return", "getParser", "(", ")", ".", "getTok", "(", ")", ".", "getLoc", "(", ")", ";", "}", ""], "natrual_language": ["Get", "the", "source", "location", "of", "the", "point", "where", "the", "field", "was", "defined", "."], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "getLoc", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 27, "Length": 20, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "getReg", "(", ")", "const", "override", "{", "assert", "(", "Kind", "==", "KindTy", "::", "Register", "&&", "\"Invalid type access!\"", ")", ";", "return", "Reg", ".", "RegNum", ".", "id", "(", ")", ";", "}", ""], "natrual_language": ["Returns", "the", "register", "associated", "with", "this", "edge", "."], "TS_V_token": ["RI5CY", "\"Invalid type access!\""], "File": "RISCVAsmParser", "Func": "getReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 28, "Length": 28, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "SMLoc", "getStartLoc", "(", ")", "const", "override", "{", "return", "StartLoc", ";", "}", ""], "natrual_language": ["getStartLoc", "-", "Get", "the", "location", "of", "the", "first", "token", "of", "this", "operand", "."], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "getStartLoc", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 29, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isImm", "(", ")", "const", "override", "{", "return", "Kind", "==", "KindTy", "::", "Immediate", ";", "}", ""], "natrual_language": ["isImm", "-", "Is", "this", "an", "immediate", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "isImm", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 30, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isMem", "(", ")", "const", "override", "{", "return", "false", ";", "}", ""], "natrual_language": ["isMem", "-", "Is", "this", "a", "memory", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "isMem", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 31, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isReg", "(", ")", "const", "override", "{", "return", "Kind", "==", "KindTy", "::", "Register", ";", "}", ""], "natrual_language": ["isReg", "-", "Is", "this", "a", "register", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "isReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 32, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "isToken", "(", ")", "const", "override", "{", "return", "Kind", "==", "KindTy", "::", "Token", ";", "}", ""], "natrual_language": ["isToken", "-", "Is", "this", "a", "token", "operand", "?"], "TS_V_token": ["RI5CY"], "File": "RISCVAsmParser", "Func": "isToken", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 33, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmParser", "::", "ParseDirective", "(", "AsmToken", "DirectiveID", ")", "{", "StringRef", "IDVal", "=", "DirectiveID", ".", "getString", "(", ")", ";", "if", "(", "IDVal", "==", "\".option\"", ")", "return", "parseDirectiveOption", "(", ")", ";", "else", "if", "(", "IDVal", "==", "\".attribute\"", ")", "return", "parseDirectiveAttribute", "(", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["ParseDirective", "-", "Parse", "a", "target", "specific", "assembler", "directive", "This", "method", "is", "deprecated", ",", "use", "'parseDirective", "'", "instead", "."], "TS_V_token": ["RI5CY", "RISCV", "\".option\"", "\".attribute\""], "File": "RISCVAsmParser", "Func": "ParseDirective", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 34, "Length": 45, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmParser", "::", "ParseInstruction", "(", "ParseInstructionInfo", "&", "Info", ",", "StringRef", "Name", ",", "SMLoc", "NameLoc", ",", "OperandVector", "&", "Operands", ")", "{", "if", "(", "getSTI", "(", ")", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureRelax", "]", ")", "{", "auto", "*", "Assembler", "=", "getTargetStreamer", "(", ")", ".", "getStreamer", "(", ")", ".", "getAssemblerPtr", "(", ")", ";", "if", "(", "Assembler", "!=", "nullptr", ")", "{", "RISCVAsmBackend", "&", "MAB", "=", "static_cast", "<", "RISCVAsmBackend", "&", ">", "(", "Assembler", "->", "getBackend", "(", ")", ")", ";", "MAB", ".", "setForceRelocs", "(", ")", ";", "}", "}", "Operands", ".", "push_back", "(", "RISCVOperand", "::", "createToken", "(", "Name", ",", "NameLoc", ",", "isRV64", "(", ")", ")", ")", ";", "if", "(", "getLexer", "(", ")", ".", "is", "(", "AsmToken", "::", "EndOfStatement", ")", ")", "return", "false", ";", "if", "(", "parseOperand", "(", "Operands", ",", "Name", ")", ")", "return", "true", ";", "unsigned", "OperandIdx", "=", "1", ";", "while", "(", "getLexer", "(", ")", ".", "is", "(", "AsmToken", "::", "Comma", ")", ")", "{", "getLexer", "(", ")", ".", "Lex", "(", ")", ";", "if", "(", "parseOperand", "(", "Operands", ",", "Name", ")", ")", "return", "true", ";", "++", "OperandIdx", ";", "}", "if", "(", "getLexer", "(", ")", ".", "isNot", "(", "AsmToken", "::", "EndOfStatement", ")", ")", "{", "SMLoc", "Loc", "=", "getLexer", "(", ")", ".", "getLoc", "(", ")", ";", "getParser", "(", ")", ".", "eatToEndOfStatement", "(", ")", ";", "return", "Error", "(", "Loc", ",", "\"unexpected token\"", ")", ";", "}", "getParser", "(", ")", ".", "Lex", "(", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["ParseInstruction", "-", "Parse", "one", "assembly", "instruction", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FeatureRelax", "RISCV", "RISCV", "RISCV", "1", "\"unexpected token\""], "File": "RISCVAsmParser", "Func": "ParseInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 35, "Length": 227, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "print", "(", "raw_ostream", "&", "OS", ")", "const", "override", "{", "auto", "RegName", "=", "[", "]", "(", "unsigned", "Reg", ")", "{", "if", "(", "Reg", ")", "return", "RISCVInstPrinter", "::", "getRegisterName", "(", "Reg", ")", ";", "else", "return", "\"noreg\"", ";", "}", ";", "switch", "(", "Kind", ")", "{", "case", "KindTy", "::", "Immediate", ":", "OS", "<<", "*", "getImm", "(", ")", ";", "break", ";", "case", "KindTy", "::", "Register", ":", "OS", "<<", "\"\"", ";", "break", ";", "case", "KindTy", "::", "Token", ":", "OS", "<<", "\"'\"", "<<", "getToken", "(", ")", "<<", "\"'\"", ";", "break", ";", "case", "KindTy", "::", "SystemRegister", ":", "OS", "<<", "\"'", ";", "break", ";", "case", "KindTy", "::", "VType", ":", "OS", "<<", "\"'", ";", "break", ";", "}", "}", ""], "natrual_language": ["print", "-", "Print", "a", "debug", "representation", "of", "the", "operand", "to", "the", "given", "stream", "."], "TS_V_token": ["RI5CY", "RISCV", "\"noreg\"", "\"\"", "\"'\"", "\"'\"", "\"", "OperandMatchResultTy", "RISCVAsmParser", "::", "tryParseRegister", "(", "unsigned", "&", "RegNo", ",", "SMLoc", "&", "StartLoc", ",", "SMLoc", "&", "EndLoc", ")", "{", "const", "AsmToken", "&", "Tok", "=", "getParser", "(", ")", ".", "getTok", "(", ")", ";", "StartLoc", "=", "Tok", ".", "getLoc", "(", ")", ";", "EndLoc", "=", "Tok", ".", "getEndLoc", "(", ")", ";", "RegNo", "=", "0", ";", "StringRef", "Name", "=", "getLexer", "(", ")", ".", "getTok", "(", ")", ".", "getIdentifier", "(", ")", ";", "if", "(", "matchRegisterNameHelper", "(", "isRV32E", "(", ")", ",", "(", "MCRegister", "&", ")", "RegNo", ",", "Name", ")", ")", "return", "MatchOperand_NoMatch", ";", "getParser", "(", ")", ".", "Lex", "(", ")", ";", "return", "MatchOperand_Success", ";", "}", ""], "natrual_language": ["tryParseRegister", "-", "parse", "one", "register", "if", "possible"], "TS_V_token": ["RI5CY", "RISCV", "0"], "File": "RISCVAsmParser", "Func": "tryParseRegister", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 37, "Length": 98, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVAsmParser", "::", "validateTargetOperandClass", "(", "MCParsedAsmOperand", "&", "AsmOp", ",", "unsigned", "Kind", ")", "{", "RISCVOperand", "&", "Op", "=", "static_cast", "<", "RISCVOperand", "&", ">", "(", "AsmOp", ")", ";", "if", "(", "!", "Op", ".", "isReg", "(", ")", ")", "return", "Match_InvalidOperand", ";", "MCRegister", "Reg", "=", "Op", ".", "getReg", "(", ")", ";", "bool", "IsRegFPR64", "=", "RISCVMCRegisterClasses", "[", "RISCV", "::", "FPR64RegClassID", "]", ".", "contains", "(", "Reg", ")", ";", "bool", "IsRegFPR64C", "=", "RISCVMCRegisterClasses", "[", "RISCV", "::", "FPR64CRegClassID", "]", ".", "contains", "(", "Reg", ")", ";", "if", "(", "(", "IsRegFPR64", "&&", "Kind", "==", "MCK_FPR32", ")", "||", "(", "IsRegFPR64C", "&&", "Kind", "==", "MCK_FPR32C", ")", ")", "{", "Op", ".", "Reg", ".", "RegNum", "=", "convertFPR64ToFPR32", "(", "Reg", ")", ";", "return", "Match_Success", ";", "}", "if", "(", "IsRegFPR64", "&&", "Kind", "==", "MCK_FPR16", ")", "{", "Op", ".", "Reg", ".", "RegNum", "=", "convertFPR64ToFPR16", "(", "Reg", ")", ";", "return", "Match_Success", ";", "}", "return", "Match_InvalidOperand", ";", "}", ""], "natrual_language": ["Allow", "a", "target", "to", "add", "special", "case", "operand", "matching", "for", "things", "that", "tblgen", "doesn't/ca", "n't", "handle", "effectively", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV::FPR64RegClassID", "RISCV", "RISCV::FPR64CRegClassID"], "File": "RISCVAsmParser", "Func": "validateTargetOperandClass", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 38, "Length": 139, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVAsmPrinter", "::", "emitEndOfAsmFile", "(", "Module", "&", "M", ")", "{", "RISCVTargetStreamer", "&", "RTS", "=", "static_cast", "<", "RISCVTargetStreamer", "&", ">", "(", "*", "OutStreamer", "->", "getTargetStreamer", "(", ")", ")", ";", "if", "(", "TM", ".", "getTargetTriple", "(", ")", ".", "isOSBinFormatELF", "(", ")", ")", "RTS", ".", "finishAttributeSection", "(", ")", ";", "}", ""], "natrual_language": ["This", "virtual", "method", "can", "be", "overridden", "by", "targets", "that", "want", "to", "emit", "something", "at", "the", "end", "of", "their", "file", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV"], "File": "RISCVAsmPrinter", "Func": "emitEndOfAsmFile", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 39, "Length": 47, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVAsmPrinter", "::", "emitInstruction", "(", "const", "MachineInstr", "*", "MI", ")", "{", "if", "(", "emitPseudoExpansionLowering", "(", "*", "OutStreamer", ",", "MI", ")", ")", "return", ";", "MCInst", "TmpInst", ";", "LowerRISCVMachineInstrToMCInst", "(", "MI", ",", "TmpInst", ",", "*", "this", ")", ";", "EmitToStreamer", "(", "*", "OutStreamer", ",", "TmpInst", ")", ";", "}", ""], "natrual_language": ["Targets", "should", "implement", "this", "to", "emit", "instructions", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVAsmPrinter", "Func": "emitInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 40, "Length": 45, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVAsmPrinter", "::", "emitStartOfAsmFile", "(", "Module", "&", "M", ")", "{", "if", "(", "TM", ".", "getTargetTriple", "(", ")", ".", "isOSBinFormatELF", "(", ")", ")", "emitAttributes", "(", ")", ";", "}", ""], "natrual_language": ["This", "virtual", "method", "can", "be", "overridden", "by", "targets", "that", "want", "to", "emit", "something", "at", "the", "start", "of", "their", "file", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVAsmPrinter", "Func": "emitStartOfAsmFile", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 41, "Length": 27, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "\"RISCV Assembly Printer\"", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "\"RISCV Assembly Printer\""], "File": "RISCVAsmPrinter", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 42, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "lowerOperand", "(", "const", "MachineOperand", "&", "MO", ",", "MCOperand", "&", "MCOp", ")", "const", "{", "return", "LowerRISCVMachineOperandToMCOperand", "(", "MO", ",", "MCOp", ",", "*", "this", ")", ";", "}", ""], "natrual_language": ["Wrapper", "for", "MCInstLowering.lowerOperand", "(", ")", "for", "the", "tblgen'erated", "pseudo", "lowering", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVAsmPrinter", "Func": "lowerOperand", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 43, "Length": 26, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmPrinter", "::", "PrintAsmMemoryOperand", "(", "const", "MachineInstr", "*", "MI", ",", "unsigned", "OpNo", ",", "const", "char", "*", "ExtraCode", ",", "raw_ostream", "&", "OS", ")", "{", "if", "(", "!", "ExtraCode", ")", "{", "const", "MachineOperand", "&", "MO", "=", "MI", "->", "getOperand", "(", "OpNo", ")", ";", "if", "(", "!", "MO", ".", "isReg", "(", ")", ")", "return", "true", ";", "OS", "<<", "\"0(\"", "<<", "RISCVInstPrinter", "::", "getRegisterName", "(", "MO", ".", "getReg", "(", ")", ")", "<<", "\")\"", ";", "return", "false", ";", "}", "return", "AsmPrinter", "::", "PrintAsmMemoryOperand", "(", "MI", ",", "OpNo", ",", "ExtraCode", ",", "OS", ")", ";", "}", ""], "natrual_language": ["Print", "the", "specified", "operand", "of", "MI", ",", "an", "INLINEASM", "instruction", ",", "using", "the", "specified", "assembler", "variant", "as", "an", "address", "."], "TS_V_token": ["RI5CY", "RISCV", "\"0(\"", "RISCV", "\")\""], "File": "RISCVAsmPrinter", "Func": "PrintAsmMemoryOperand", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 44, "Length": 89, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmPrinter", "::", "PrintAsmOperand", "(", "const", "MachineInstr", "*", "MI", ",", "unsigned", "OpNo", ",", "const", "char", "*", "ExtraCode", ",", "raw_ostream", "&", "OS", ")", "{", "if", "(", "!", "AsmPrinter", "::", "PrintAsmOperand", "(", "MI", ",", "OpNo", ",", "ExtraCode", ",", "OS", ")", ")", "return", "false", ";", "const", "MachineOperand", "&", "MO", "=", "MI", "->", "getOperand", "(", "OpNo", ")", ";", "if", "(", "ExtraCode", "&&", "ExtraCode", "[", "0", "]", ")", "{", "if", "(", "ExtraCode", "[", "1", "]", "!=", "0", ")", "return", "true", ";", "switch", "(", "ExtraCode", "[", "0", "]", ")", "{", "default", ":", "return", "true", ";", "case", "'z'", ":", "if", "(", "MO", ".", "isImm", "(", ")", "&&", "MO", ".", "getImm", "(", ")", "==", "0", ")", "{", "OS", "<<", "RISCVInstPrinter", "::", "getRegisterName", "(", "RISCV", "::", "X0", ")", ";", "return", "false", ";", "}", "break", ";", "case", "'i'", ":", "if", "(", "!", "MO", ".", "isReg", "(", ")", ")", "OS", "<<", "'i'", ";", "return", "false", ";", "}", "}", "switch", "(", "MO", ".", "getType", "(", ")", ")", "{", "case", "MachineOperand", "::", "MO_Immediate", ":", "OS", "<<", "MO", ".", "getImm", "(", ")", ";", "return", "false", ";", "case", "MachineOperand", "::", "MO_Register", ":", "OS", "<<", "RISCVInstPrinter", "::", "getRegisterName", "(", "MO", ".", "getReg", "(", ")", ")", ";", "return", "false", ";", "case", "MachineOperand", "::", "MO_GlobalAddress", ":", "PrintSymbolOperand", "(", "MO", ",", "OS", ")", ";", "return", "false", ";", "case", "MachineOperand", "::", "MO_BlockAddress", ":", "{", "MCSymbol", "*", "Sym", "=", "GetBlockAddressSymbol", "(", "MO", ".", "getBlockAddress", "(", ")", ")", ";", "Sym", "->", "print", "(", "OS", ",", "MAI", ")", ";", "return", "false", ";", "}", "default", ":", "break", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["PrintAsmOperand", "-", "Print", "out", "an", "operand", "for", "an", "inline", "asm", "expression", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "1", "0", "0", "0", "RISCV", "RISCV::X0", "RISCV"], "File": "RISCVAsmPrinter", "Func": "PrintAsmOperand", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 45, "Length": 249, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVAsmPrinter", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "MCSubtargetInfo", "&", "NewSTI", "=", "OutStreamer", "->", "getContext", "(", ")", ".", "getSubtargetCopy", "(", "*", "TM", ".", "getMCSubtargetInfo", "(", ")", ")", ";", "NewSTI", ".", "setFeatureBits", "(", "MF", ".", "getSubtarget", "(", ")", ".", "getFeatureBits", "(", ")", ")", ";", "STI", "=", "&", "NewSTI", ";", "SetupMachineFunction", "(", "MF", ")", ";", "emitFunctionBody", "(", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVAsmPrinter", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 46, "Length": 63, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVCallLowering", "::", "lowerCall", "(", "MachineIRBuilder", "&", "MIRBuilder", ",", "CallLoweringInfo", "&", "Info", ")", "const", "{", "return", "false", ";", "}", ""], "natrual_language": ["This", "hook", "must", "be", "implemented", "to", "lower", "the", "given", "call", "instruction", ",", "including", "argument", "and", "return", "value", "marshalling", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVCallLowering", "Func": "lowerCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 47, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVCallLowering", "::", "lowerFormalArguments", "(", "MachineIRBuilder", "&", "MIRBuilder", ",", "const", "Function", "&", "F", ",", "ArrayRef", "<", "ArrayRef", "<", "Register", ">>", "VRegs", ",", "FunctionLoweringInfo", "&", "FLI", ")", "const", "{", "if", "(", "F", ".", "arg_empty", "(", ")", ")", "return", "true", ";", "return", "false", ";", "}", ""], "natrual_language": ["This", "hook", "must", "be", "implemented", "to", "lower", "the", "incoming", "(", "formal", ")", "arguments", ",", "described", "by", "VRegs", ",", "for", "GlobalISel", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVCallLowering", "Func": "lowerFormalArguments", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 48, "Length": 43, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVCallLowering", "::", "lowerReturn", "(", "MachineIRBuilder", "&", "MIRBuilder", ",", "const", "Value", "*", "Val", ",", "ArrayRef", "<", "Register", ">", "VRegs", ",", "FunctionLoweringInfo", "&", "FLI", ")", "const", "{", "MachineInstrBuilder", "Ret", "=", "MIRBuilder", ".", "buildInstrNoInsert", "(", "RISCV", "::", "PseudoRET", ")", ";", "if", "(", "Val", "!=", "nullptr", ")", "{", "return", "false", ";", "}", "MIRBuilder", ".", "insertInstr", "(", "Ret", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["This", "hook", "behaves", "as", "the", "extended", "lowerReturn", "function", ",", "but", "for", "targets", "that", "do", "not", "support", "swifterror", "value", "promotion", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::PseudoRET"], "File": "RISCVCallLowering", "Func": "lowerReturn", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 49, "Length": 60, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "getAnalysisUsage", "(", "AnalysisUsage", "&", "AU", ")", "const", "override", "{", "AU", ".", "setPreservesCFG", "(", ")", ";", "MachineFunctionPass", "::", "getAnalysisUsage", "(", "AU", ")", ";", "}", ""], "natrual_language": ["getAnalysisUsage", "-", "Subclasses", "that", "override", "getAnalysisUsage", "must", "call", "this", "."], "TS_V_token": ["RI5CY"], "File": "RISCVCleanupVSETVLI", "Func": "getAnalysisUsage", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 50, "Length": 24, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_CLEANUP_VSETVLI_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVCleanupVSETVLI", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 51, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVCleanupVSETVLI", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "if", "(", "skipFunction", "(", "MF", ".", "getFunction", "(", ")", ")", ")", "return", "false", ";", "const", "RISCVSubtarget", "&", "ST", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "if", "(", "!", "ST", ".", "hasStdExtV", "(", ")", ")", "return", "false", ";", "bool", "Changed", "=", "false", ";", "for", "(", "MachineBasicBlock", "&", "MBB", ":", "MF", ")", "Changed", "|=", "runOnMachineBasicBlock", "(", "MBB", ")", ";", "return", "Changed", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV"], "File": "RISCVCleanupVSETVLI", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 52, "Length": 74, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "DecodeStatus", "RISCVDisassembler", "::", "getInstruction", "(", "MCInst", "&", "MI", ",", "uint64_t", "&", "Size", ",", "ArrayRef", "<", "uint8_t", ">", "Bytes", ",", "uint64_t", "Address", ",", "raw_ostream", "&", "CS", ")", "const", "{", "uint32_t", "Insn", ";", "DecodeStatus", "Result", ";", "if", "(", "(", "Bytes", "[", "0", "]", "&", "0x3", ")", "==", "0x3", ")", "{", "if", "(", "Bytes", ".", "size", "(", ")", "<", "4", ")", "{", "Size", "=", "0", ";", "return", "MCDisassembler", "::", "Fail", ";", "}", "Insn", "=", "support", "::", "endian", "::", "read32le", "(", "Bytes", ".", "data", "(", ")", ")", ";", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"Trying RISCV32 table :\\n\"", ")", ";", "Result", "=", "decodeInstruction", "(", "DecoderTable32", ",", "MI", ",", "Insn", ",", "Address", ",", "this", ",", "STI", ")", ";", "Size", "=", "4", ";", "}", "else", "{", "if", "(", "Bytes", ".", "size", "(", ")", "<", "2", ")", "{", "Size", "=", "0", ";", "return", "MCDisassembler", "::", "Fail", ";", "}", "Insn", "=", "support", "::", "endian", "::", "read16le", "(", "Bytes", ".", "data", "(", ")", ")", ";", "if", "(", "!", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "Feature64Bit", "]", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"Trying RISCV32Only_16 table (16-bit Instruction):\\n\"", ")", ";", "Result", "=", "decodeInstruction", "(", "DecoderTableRISCV32Only_16", ",", "MI", ",", "Insn", ",", "Address", ",", "this", ",", "STI", ")", ";", "if", "(", "Result", "!=", "MCDisassembler", "::", "Fail", ")", "{", "Size", "=", "2", ";", "return", "Result", ";", "}", "}", "if", "(", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureExtZbproposedc", "]", "&&", "STI", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureStdExtC", "]", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"Trying RVBC32 table (BitManip 16-bit Instruction):\\n\"", ")", ";", "Result", "=", "decodeInstruction", "(", "DecoderTableRVBC16", ",", "MI", ",", "Insn", ",", "Address", ",", "this", ",", "STI", ")", ";", "if", "(", "Result", "!=", "MCDisassembler", "::", "Fail", ")", "{", "Size", "=", "2", ";", "return", "Result", ";", "}", "}", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"Trying RISCV_C table (16-bit Instruction):\\n\"", ")", ";", "Result", "=", "decodeInstruction", "(", "DecoderTable16", ",", "MI", ",", "Insn", ",", "Address", ",", "this", ",", "STI", ")", ";", "Size", "=", "2", ";", "}", "return", "Result", ";", "}", ""], "natrual_language": ["Returns", "the", "disassembly", "of", "a", "single", "instruction", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "0x3", "0x3", "4", "0", "support::endian", "\"Trying RISCV32 table :\\n\"", "4", "2", "0", "support::endian", "RISCV::Feature64Bit", "\"Trying RISCV32Only_16 table (16-bit Instruction):\\n\"", "RISCV", "2", "RISCV::FeatureExtZbproposedc", "RISCV::FeatureStdExtC", "\"Trying RVBC32 table (BitManip 16-bit Instruction):\\n\"", "2", "\"Trying RISCV_C table (16-bit Instruction):\\n\"", "2"], "File": "RISCVDisassembler", "Func": "getInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 53, "Length": 316, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MCELFStreamer", "&", "RISCVTargetELFStreamer", "::", "getStreamer", "(", ")", "{", "return", "static_cast", "<", "MCELFStreamer", "&", ">", "(", "Streamer", ")", ";", "}", ""], "natrual_language": ["Return", "the", "output", "streamer", "for", "the", "assembler", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVELFStreamer", "Func": "getStreamer", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 54, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_EXPAND_ATOMIC_PSEUDO_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVExpandAtomicPseudoInsts", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 55, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVExpandAtomicPseudo", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "TII", "=", "static_cast", "<", "const", "RISCVInstrInfo", "*", ">", "(", "MF", ".", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ")", ";", "bool", "Modified", "=", "false", ";", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "Modified", "|=", "expandMBB", "(", "MBB", ")", ";", "return", "Modified", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVExpandAtomicPseudoInsts", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 56, "Length": 54, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_EXPAND_PSEUDO_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVExpandPseudoInsts", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 57, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVExpandPseudo", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "TII", "=", "static_cast", "<", "const", "RISCVInstrInfo", "*", ">", "(", "MF", ".", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ")", ";", "bool", "Modified", "=", "false", ";", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "Modified", "|=", "expandMBB", "(", "MBB", ")", ";", "return", "Modified", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVExpandPseudoInsts", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 58, "Length": 54, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_EXPAND_SDMA_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVExpandSDMAInsts", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 59, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVExpandSDMA", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "TII", "=", "static_cast", "<", "const", "RISCVInstrInfo", "*", ">", "(", "MF", ".", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ")", ";", "bool", "Modified", "=", "false", ";", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "Modified", "|=", "expandMBB", "(", "MBB", ")", ";", "return", "Modified", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVExpandSDMAInsts", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 60, "Length": 54, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_EXPAND_SSR_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVExpandSSRInsts", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 61, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVExpandSSR", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "TII", "=", "static_cast", "<", "const", "RISCVInstrInfo", "*", ">", "(", "MF", ".", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ")", ";", "this", "->", "MF", "=", "&", "MF", ";", "this", "->", "RVFI", "=", "MF", ".", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "Enabled", "=", "false", ";", "bool", "Modified", "=", "false", ";", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "Modified", "|=", "expandMBB", "(", "MBB", ")", ";", "RISCVExpandSSR", "::", "RegisterMergingPreferences", "RMP", "=", "gatherRegisterMergingPreferences", "(", ")", ";", "if", "(", "RMP", ".", "Enable", "&&", "RVFI", "->", "getUsedSSR", "(", ")", ")", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "mergePushPop", "(", "MBB", ")", ";", "if", "(", "Modified", ")", "{", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "{", "for", "(", "unsigned", "ssr_no", "=", "0", ";", "ssr_no", "<", "NUM_SSR", ";", "++", "ssr_no", ")", "MBB", ".", "addLiveIn", "(", "getSSRFtReg", "(", "ssr_no", ")", ")", ";", "MBB", ".", "sortUniqueLiveIns", "(", ")", ";", "}", "}", "return", "Modified", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "RISCV", "0"], "File": "RISCVExpandSSRInsts", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 62, "Length": 158, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "canUseAsEpilogue", "(", "const", "MachineBasicBlock", "&", "MBB", ")", "const", "{", "const", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "MachineBasicBlock", "*", "TmpMBB", "=", "const_cast", "<", "MachineBasicBlock", "*", ">", "(", "&", "MBB", ")", ";", "const", "auto", "*", "RVFI", "=", "MF", "->", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "if", "(", "!", "RVFI", "->", "useSaveRestoreLibCalls", "(", "*", "MF", ")", ")", "return", "true", ";", "if", "(", "MBB", ".", "succ_size", "(", ")", ">", "1", ")", "return", "false", ";", "MachineBasicBlock", "*", "SuccMBB", "=", "MBB", ".", "succ_empty", "(", ")", "?", "TmpMBB", "->", "getFallThrough", "(", ")", ":", "*", "MBB", ".", "succ_begin", "(", ")", ";", "if", "(", "!", "SuccMBB", ")", "return", "true", ";", "return", "SuccMBB", "->", "isReturnBlock", "(", ")", "&&", "SuccMBB", "->", "size", "(", ")", "==", "1", ";", "}", ""], "natrual_language": ["Check", "whether", "or", "not", "the", "given", "MBB", "can", "be", "used", "as", "a", "epilogue", "for", "the", "target", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "1", "1"], "File": "RISCVFrameLowering", "Func": "canUseAsEpilogue", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 63, "Length": 125, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "canUseAsPrologue", "(", "const", "MachineBasicBlock", "&", "MBB", ")", "const", "{", "MachineBasicBlock", "*", "TmpMBB", "=", "const_cast", "<", "MachineBasicBlock", "*", ">", "(", "&", "MBB", ")", ";", "const", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "const", "auto", "*", "RVFI", "=", "MF", "->", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "if", "(", "!", "RVFI", "->", "useSaveRestoreLibCalls", "(", "*", "MF", ")", ")", "return", "true", ";", "RegScavenger", "RS", ";", "RS", ".", "enterBasicBlock", "(", "*", "TmpMBB", ")", ";", "return", "!", "RS", ".", "isRegUsed", "(", "RISCV", "::", "X5", ")", ";", "}", ""], "natrual_language": ["Check", "whether", "or", "not", "the", "given", "MBB", "can", "be", "used", "as", "a", "prologue", "for", "the", "target", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV::X5"], "File": "RISCVFrameLowering", "Func": "canUseAsPrologue", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 64, "Length": 88, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVFrameLowering", "::", "determineCalleeSaves", "(", "MachineFunction", "&", "MF", ",", "BitVector", "&", "SavedRegs", ",", "RegScavenger", "*", "RS", ")", "const", "{", "TargetFrameLowering", "::", "determineCalleeSaves", "(", "MF", ",", "SavedRegs", ",", "RS", ")", ";", "if", "(", "hasFP", "(", "MF", ")", ")", "{", "SavedRegs", ".", "set", "(", "RISCV", "::", "X1", ")", ";", "SavedRegs", ".", "set", "(", "RISCV", "::", "X8", ")", ";", "}", "if", "(", "hasBP", "(", "MF", ")", ")", "SavedRegs", ".", "set", "(", "RISCVABI", "::", "getBPReg", "(", ")", ")", ";", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "if", "(", "MF", ".", "getFunction", "(", ")", ".", "hasFnAttribute", "(", "\"interrupt\"", ")", "&&", "MFI", ".", "hasCalls", "(", ")", ")", "{", "static", "const", "MCPhysReg", "CSRegs", "[", "]", "=", "{", "RISCV", "::", "X1", ",", "RISCV", "::", "X5", ",", "RISCV", "::", "X6", ",", "RISCV", "::", "X7", ",", "RISCV", "::", "X10", ",", "RISCV", "::", "X11", ",", "RISCV", "::", "X12", ",", "RISCV", "::", "X13", ",", "RISCV", "::", "X14", ",", "RISCV", "::", "X15", ",", "RISCV", "::", "X16", ",", "RISCV", "::", "X17", ",", "RISCV", "::", "X28", ",", "RISCV", "::", "X29", ",", "RISCV", "::", "X30", ",", "RISCV", "::", "X31", ",", "0", "}", ";", "for", "(", "unsigned", "i", "=", "0", ";", "CSRegs", "[", "i", "]", ";", "++", "i", ")", "SavedRegs", ".", "set", "(", "CSRegs", "[", "i", "]", ")", ";", "if", "(", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "hasStdExtF", "(", ")", ")", "{", "const", "MCPhysReg", "*", "Regs", "=", "MF", ".", "getRegInfo", "(", ")", ".", "getCalleeSavedRegs", "(", ")", ";", "for", "(", "unsigned", "i", "=", "0", ";", "Regs", "[", "i", "]", ";", "++", "i", ")", "if", "(", "RISCV", "::", "FPR16RegClass", ".", "contains", "(", "Regs", "[", "i", "]", ")", "||", "RISCV", "::", "FPR32RegClass", ".", "contains", "(", "Regs", "[", "i", "]", ")", "||", "RISCV", "::", "FPR64RegClass", ".", "contains", "(", "Regs", "[", "i", "]", ")", ")", "SavedRegs", ".", "set", "(", "Regs", "[", "i", "]", ")", ";", "}", "}", "}", ""], "natrual_language": ["This", "method", "determines", "which", "of", "the", "registers", "reported", "by", "TargetRegisterInfo", ":", ":getCalleeSavedRegs", "(", ")", "should", "actually", "get", "saved", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X1", "RISCV::X8", "RISCVABI::getBPReg", "\"interrupt\"", "RISCV::X1", "RISCV::X5", "RISCV::X6", "RISCV::X7", "RISCV::X10", "RISCV::X11", "RISCV::X12", "RISCV::X13", "RISCV::X14", "RISCV::X15", "RISCV::X16", "RISCV::X17", "RISCV::X28", "RISCV::X29", "RISCV::X30", "RISCV::X31", "0", "0", "RISCV", "0", "RISCV::FPR16RegClass", "RISCV::FPR32RegClass", "RISCV::FPR64RegClass"], "File": "RISCVFrameLowering", "Func": "determineCalleeSaves", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 65, "Length": 302, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVFrameLowering", "::", "determineFrameLayout", "(", "MachineFunction", "&", "MF", ")", "const", "{", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "uint64_t", "FrameSize", "=", "MFI", ".", "getStackSize", "(", ")", ";", "Align", "StackAlign", "=", "getStackAlign", "(", ")", ";", "uint64_t", "MaxCallSize", "=", "alignTo", "(", "MFI", ".", "getMaxCallFrameSize", "(", ")", ",", "StackAlign", ")", ";", "MFI", ".", "setMaxCallFrameSize", "(", "MaxCallSize", ")", ";", "FrameSize", "=", "alignTo", "(", "FrameSize", ",", "StackAlign", ")", ";", "MFI", ".", "setStackSize", "(", "FrameSize", ")", ";", "}", ""], "natrual_language": ["Determine", "the", "frame", "layout", "but", "do", "not", "update", "the", "machine", "function", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVFrameLowering", "Func": "determineFrameLayout", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 66, "Length": 75, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MachineBasicBlock", "::", "iterator", "RISCVFrameLowering", "::", "eliminateCallFramePseudoInstr", "(", "MachineFunction", "&", "MF", ",", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "MI", ")", "const", "{", "Register", "SPReg", "=", "RISCV", "::", "X2", ";", "DebugLoc", "DL", "=", "MI", "->", "getDebugLoc", "(", ")", ";", "if", "(", "!", "hasReservedCallFrame", "(", "MF", ")", ")", "{", "int64_t", "Amount", "=", "MI", "->", "getOperand", "(", "0", ")", ".", "getImm", "(", ")", ";", "if", "(", "Amount", "!=", "0", ")", "{", "Amount", "=", "alignSPAdjust", "(", "Amount", ")", ";", "if", "(", "MI", "->", "getOpcode", "(", ")", "==", "RISCV", "::", "ADJCALLSTACKDOWN", ")", "Amount", "=", "-", "Amount", ";", "adjustReg", "(", "MBB", ",", "MI", ",", "DL", ",", "SPReg", ",", "SPReg", ",", "Amount", ",", "MachineInstr", "::", "NoFlags", ")", ";", "}", "}", "return", "MBB", ".", "erase", "(", "MI", ")", ";", "}", ""], "natrual_language": ["This", "method", "is", "called", "during", "prolog/epilog", "code", "insertion", "to", "eliminate", "call", "frame", "setup", "and", "destroy", "pseudo", "instructions", "(", "but", "only", "if", "the", "Target", "is", "using", "them", ")", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X2", "0", "0", "RISCV::ADJCALLSTACKDOWN"], "File": "RISCVFrameLowering", "Func": "eliminateCallFramePseudoInstr", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 67, "Length": 122, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVFrameLowering", "::", "emitEpilogue", "(", "MachineFunction", "&", "MF", ",", "MachineBasicBlock", "&", "MBB", ")", "const", "{", "const", "RISCVRegisterInfo", "*", "RI", "=", "STI", ".", "getRegisterInfo", "(", ")", ";", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "auto", "*", "RVFI", "=", "MF", ".", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "Register", "FPReg", "=", "getFPReg", "(", "STI", ")", ";", "Register", "SPReg", "=", "getSPReg", "(", "STI", ")", ";", "if", "(", "MF", ".", "getFunction", "(", ")", ".", "getCallingConv", "(", ")", "==", "CallingConv", "::", "GHC", ")", "return", ";", "MachineBasicBlock", "::", "iterator", "MBBI", "=", "MBB", ".", "end", "(", ")", ";", "DebugLoc", "DL", ";", "if", "(", "!", "MBB", ".", "empty", "(", ")", ")", "{", "MBBI", "=", "MBB", ".", "getFirstTerminator", "(", ")", ";", "if", "(", "MBBI", "==", "MBB", ".", "end", "(", ")", ")", "MBBI", "=", "MBB", ".", "getLastNonDebugInstr", "(", ")", ";", "DL", "=", "MBBI", "->", "getDebugLoc", "(", ")", ";", "if", "(", "!", "MBBI", "->", "isTerminator", "(", ")", ")", "MBBI", "=", "std", "::", "next", "(", "MBBI", ")", ";", "while", "(", "MBBI", "!=", "MBB", ".", "begin", "(", ")", "&&", "std", "::", "prev", "(", "MBBI", ")", "->", "getFlag", "(", "MachineInstr", "::", "FrameDestroy", ")", ")", "--", "MBBI", ";", "}", "const", "auto", "&", "CSI", "=", "getNonLibcallCSI", "(", "MFI", ".", "getCalleeSavedInfo", "(", ")", ")", ";", "auto", "LastFrameDestroy", "=", "MBBI", ";", "if", "(", "!", "CSI", ".", "empty", "(", ")", ")", "LastFrameDestroy", "=", "std", "::", "prev", "(", "MBBI", ",", "CSI", ".", "size", "(", ")", ")", ";", "uint64_t", "StackSize", "=", "MFI", ".", "getStackSize", "(", ")", ";", "uint64_t", "RealStackSize", "=", "StackSize", "+", "RVFI", "->", "getLibCallStackSize", "(", ")", ";", "uint64_t", "FPOffset", "=", "RealStackSize", "-", "RVFI", "->", "getVarArgsSaveSize", "(", ")", ";", "if", "(", "RI", "->", "needsStackRealignment", "(", "MF", ")", "||", "MFI", ".", "hasVarSizedObjects", "(", ")", ")", "{", "assert", "(", "hasFP", "(", "MF", ")", "&&", "\"frame pointer should not have been eliminated\"", ")", ";", "adjustReg", "(", "MBB", ",", "LastFrameDestroy", ",", "DL", ",", "SPReg", ",", "FPReg", ",", "-", "FPOffset", ",", "MachineInstr", "::", "FrameDestroy", ")", ";", "}", "uint64_t", "FirstSPAdjustAmount", "=", "getFirstSPAdjustAmount", "(", "MF", ")", ";", "if", "(", "FirstSPAdjustAmount", ")", "{", "uint64_t", "SecondSPAdjustAmount", "=", "MFI", ".", "getStackSize", "(", ")", "-", "FirstSPAdjustAmount", ";", "assert", "(", "SecondSPAdjustAmount", ">", "0", "&&", "\"SecondSPAdjustAmount should be greater than zero\"", ")", ";", "adjustReg", "(", "MBB", ",", "LastFrameDestroy", ",", "DL", ",", "SPReg", ",", "SPReg", ",", "SecondSPAdjustAmount", ",", "MachineInstr", "::", "FrameDestroy", ")", ";", "}", "if", "(", "FirstSPAdjustAmount", ")", "StackSize", "=", "FirstSPAdjustAmount", ";", "adjustReg", "(", "MBB", ",", "MBBI", ",", "DL", ",", "SPReg", ",", "SPReg", ",", "StackSize", ",", "MachineInstr", "::", "FrameDestroy", ")", ";", "emitSCSEpilogue", "(", "MF", ",", "MBB", ",", "MBBI", ",", "DL", ")", ";", "}", ""], "natrual_language": ["Insert", "epilog", "code", "into", "the", "function", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "\"frame pointer should not have been eliminated\"", "0", "\"SecondSPAdjustAmount should be greater than zero\""], "File": "RISCVFrameLowering", "Func": "emitEpilogue", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 68, "Length": 400, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StackOffset", "RISCVFrameLowering", "::", "getFrameIndexReference", "(", "const", "MachineFunction", "&", "MF", ",", "int", "FI", ",", "Register", "&", "FrameReg", ")", "const", "{", "const", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "const", "TargetRegisterInfo", "*", "RI", "=", "MF", ".", "getSubtarget", "(", ")", ".", "getRegisterInfo", "(", ")", ";", "const", "auto", "*", "RVFI", "=", "MF", ".", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "const", "auto", "&", "CSI", "=", "getNonLibcallCSI", "(", "MFI", ".", "getCalleeSavedInfo", "(", ")", ")", ";", "int", "MinCSFI", "=", "0", ";", "int", "MaxCSFI", "=", "-", "1", ";", "int", "Offset", "=", "MFI", ".", "getObjectOffset", "(", "FI", ")", "-", "getOffsetOfLocalArea", "(", ")", "+", "MFI", ".", "getOffsetAdjustment", "(", ")", ";", "uint64_t", "FirstSPAdjustAmount", "=", "getFirstSPAdjustAmount", "(", "MF", ")", ";", "if", "(", "CSI", ".", "size", "(", ")", ")", "{", "MinCSFI", "=", "CSI", "[", "0", "]", ".", "getFrameIdx", "(", ")", ";", "MaxCSFI", "=", "CSI", "[", "CSI", ".", "size", "(", ")", "-", "1", "]", ".", "getFrameIdx", "(", ")", ";", "}", "if", "(", "FI", ">=", "MinCSFI", "&&", "FI", "<=", "MaxCSFI", ")", "{", "FrameReg", "=", "RISCV", "::", "X2", ";", "if", "(", "FirstSPAdjustAmount", ")", "Offset", "+=", "FirstSPAdjustAmount", ";", "else", "Offset", "+=", "MFI", ".", "getStackSize", "(", ")", ";", "}", "else", "if", "(", "RI", "->", "needsStackRealignment", "(", "MF", ")", "&&", "!", "MFI", ".", "isFixedObjectIndex", "(", "FI", ")", ")", "{", "if", "(", "hasBP", "(", "MF", ")", ")", "FrameReg", "=", "RISCVABI", "::", "getBPReg", "(", ")", ";", "else", "FrameReg", "=", "RISCV", "::", "X2", ";", "Offset", "+=", "MFI", ".", "getStackSize", "(", ")", ";", "if", "(", "FI", "<", "0", ")", "Offset", "+=", "RVFI", "->", "getLibCallStackSize", "(", ")", ";", "}", "else", "{", "FrameReg", "=", "RI", "->", "getFrameRegister", "(", "MF", ")", ";", "if", "(", "hasFP", "(", "MF", ")", ")", "{", "Offset", "+=", "RVFI", "->", "getVarArgsSaveSize", "(", ")", ";", "if", "(", "FI", ">=", "0", ")", "Offset", "-=", "RVFI", "->", "getLibCallStackSize", "(", ")", ";", "}", "else", "{", "Offset", "+=", "MFI", ".", "getStackSize", "(", ")", ";", "if", "(", "FI", "<", "0", ")", "Offset", "+=", "RVFI", "->", "getLibCallStackSize", "(", ")", ";", "}", "}", "return", "StackOffset", "::", "getFixed", "(", "Offset", ")", ";", "}", ""], "natrual_language": ["getFrameIndexReference", "-", "This", "method", "should", "return", "the", "base", "register", "and", "offset", "used", "to", "reference", "a", "frame", "index", "location", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "0", "1", "0", "1", "RISCV::X2", "RISCVABI::getBPReg", "RISCV::X2", "0", "0", "0"], "File": "RISCVFrameLowering", "Func": "getFrameIndexReference", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 69, "Length": 326, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "hasFP", "(", "const", "MachineFunction", "&", "MF", ")", "const", "{", "const", "TargetRegisterInfo", "*", "RegInfo", "=", "MF", ".", "getSubtarget", "(", ")", ".", "getRegisterInfo", "(", ")", ";", "const", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "return", "MF", ".", "getTarget", "(", ")", ".", "Options", ".", "DisableFramePointerElim", "(", "MF", ")", "||", "RegInfo", "->", "needsStackRealignment", "(", "MF", ")", "||", "MFI", ".", "hasVarSizedObjects", "(", ")", "||", "MFI", ".", "isFrameAddressTaken", "(", ")", ";", "}", ""], "natrual_language": ["hasFP", "-", "Return", "true", "if", "the", "specified", "function", "should", "have", "a", "dedicated", "frame", "pointer", "register", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVFrameLowering", "Func": "hasFP", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 70, "Length": 72, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "hasReservedCallFrame", "(", "const", "MachineFunction", "&", "MF", ")", "const", "{", "return", "!", "MF", ".", "getFrameInfo", "(", ")", ".", "hasVarSizedObjects", "(", ")", ";", "}", ""], "natrual_language": ["hasReservedCallFrame", "-", "Under", "normal", "circumstances", ",", "when", "a", "frame", "pointer", "is", "not", "required", ",", "we", "reserve", "argument", "space", "for", "call", "sites", "in", "the", "function", "immediately", "on", "entry", "to", "the", "current", "function", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVFrameLowering", "Func": "hasReservedCallFrame", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 71, "Length": 25, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVFrameLowering", "::", "processFunctionBeforeFrameFinalized", "(", "MachineFunction", "&", "MF", ",", "RegScavenger", "*", "RS", ")", "const", "{", "const", "TargetRegisterInfo", "*", "RegInfo", "=", "MF", ".", "getSubtarget", "(", ")", ".", "getRegisterInfo", "(", ")", ";", "MachineFrameInfo", "&", "MFI", "=", "MF", ".", "getFrameInfo", "(", ")", ";", "const", "TargetRegisterClass", "*", "RC", "=", "&", "RISCV", "::", "GPRRegClass", ";", "if", "(", "!", "isInt", "<", "11", ">", "(", "MFI", ".", "estimateStackSize", "(", "MF", ")", ")", ")", "{", "int", "RegScavFI", "=", "MFI", ".", "CreateStackObject", "(", "RegInfo", "->", "getSpillSize", "(", "*", "RC", ")", ",", "RegInfo", "->", "getSpillAlign", "(", "*", "RC", ")", ",", "false", ")", ";", "RS", "->", "addScavengingFrameIndex", "(", "RegScavFI", ")", ";", "}", "}", ""], "natrual_language": ["processFunctionBeforeFrameFinalized", "-", "This", "method", "is", "called", "immediately", "before", "the", "specified", "function", "'s", "frame", "layout", "(", "MF.getFrameInfo", "(", ")", ")", "is", "finalized", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::GPRRegClass", "11"], "File": "RISCVFrameLowering", "Func": "processFunctionBeforeFrameFinalized", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 72, "Length": 102, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "restoreCalleeSavedRegisters", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "MI", ",", "MutableArrayRef", "<", "CalleeSavedInfo", ">", "CSI", ",", "const", "TargetRegisterInfo", "*", "TRI", ")", "const", "{", "if", "(", "CSI", ".", "empty", "(", ")", ")", "return", "true", ";", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "const", "TargetInstrInfo", "&", "TII", "=", "*", "MF", "->", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ";", "DebugLoc", "DL", ";", "if", "(", "MI", "!=", "MBB", ".", "end", "(", ")", "&&", "!", "MI", "->", "isDebugInstr", "(", ")", ")", "DL", "=", "MI", "->", "getDebugLoc", "(", ")", ";", "const", "auto", "&", "NonLibcallCSI", "=", "getNonLibcallCSI", "(", "CSI", ")", ";", "for", "(", "auto", "&", "CS", ":", "reverse", "(", "NonLibcallCSI", ")", ")", "{", "Register", "Reg", "=", "CS", ".", "getReg", "(", ")", ";", "const", "TargetRegisterClass", "*", "RC", "=", "TRI", "->", "getMinimalPhysRegClass", "(", "Reg", ")", ";", "TII", ".", "loadRegFromStackSlot", "(", "MBB", ",", "MI", ",", "Reg", ",", "CS", ".", "getFrameIdx", "(", ")", ",", "RC", ",", "TRI", ")", ";", "assert", "(", "MI", "!=", "MBB", ".", "begin", "(", ")", "&&", "\"loadRegFromStackSlot didn't insert any code!\"", ")", ";", "}", "const", "char", "*", "RestoreLibCall", "=", "getRestoreLibCallName", "(", "*", "MF", ",", "CSI", ")", ";", "if", "(", "RestoreLibCall", ")", "{", "MachineBasicBlock", "::", "iterator", "NewMI", "=", "BuildMI", "(", "MBB", ",", "MI", ",", "DL", ",", "TII", ".", "get", "(", "RISCV", "::", "PseudoTAIL", ")", ")", ".", "addExternalSymbol", "(", "RestoreLibCall", ",", "RISCVII", "::", "MO_CALL", ")", ".", "setMIFlag", "(", "MachineInstr", "::", "FrameDestroy", ")", ";", "if", "(", "MI", "!=", "MBB", ".", "end", "(", ")", "&&", "MI", "->", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoRET", ")", "{", "NewMI", "->", "copyImplicitOps", "(", "*", "MF", ",", "*", "MI", ")", ";", "MI", "->", "eraseFromParent", "(", ")", ";", "}", "}", "return", "true", ";", "}", ""], "natrual_language": ["restoreCalleeSavedRegisters", "-", "Issues", "instruction", "(", "s", ")", "to", "restore", "all", "callee", "saved", "registers", "and", "returns", "true", "if", "it", "is", "n't", "possible", "/", "profitable", "to", "do", "so", "by", "issuing", "a", "series", "of", "load", "instructions", "via", "loadRegToStackSlot", "(", ")", "."], "TS_V_token": ["RI5CY", "RISCV", "\"loadRegFromStackSlot didn't insert any code!\"", "RISCV::PseudoTAIL", "RISCVII::MO_CALL", "RISCV::PseudoRET"], "File": "RISCVFrameLowering", "Func": "restoreCalleeSavedRegisters", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 73, "Length": 271, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVFrameLowering", "::", "spillCalleeSavedRegisters", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "MI", ",", "ArrayRef", "<", "CalleeSavedInfo", ">", "CSI", ",", "const", "TargetRegisterInfo", "*", "TRI", ")", "const", "{", "if", "(", "CSI", ".", "empty", "(", ")", ")", "return", "true", ";", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "const", "TargetInstrInfo", "&", "TII", "=", "*", "MF", "->", "getSubtarget", "(", ")", ".", "getInstrInfo", "(", ")", ";", "DebugLoc", "DL", ";", "if", "(", "MI", "!=", "MBB", ".", "end", "(", ")", "&&", "!", "MI", "->", "isDebugInstr", "(", ")", ")", "DL", "=", "MI", "->", "getDebugLoc", "(", ")", ";", "const", "char", "*", "SpillLibCall", "=", "getSpillLibCallName", "(", "*", "MF", ",", "CSI", ")", ";", "if", "(", "SpillLibCall", ")", "{", "BuildMI", "(", "MBB", ",", "MI", ",", "DL", ",", "TII", ".", "get", "(", "RISCV", "::", "PseudoCALLReg", ")", ",", "RISCV", "::", "X5", ")", ".", "addExternalSymbol", "(", "SpillLibCall", ",", "RISCVII", "::", "MO_CALL", ")", ".", "setMIFlag", "(", "MachineInstr", "::", "FrameSetup", ")", ";", "for", "(", "auto", "&", "CS", ":", "CSI", ")", "MBB", ".", "addLiveIn", "(", "CS", ".", "getReg", "(", ")", ")", ";", "}", "const", "auto", "&", "NonLibcallCSI", "=", "getNonLibcallCSI", "(", "CSI", ")", ";", "for", "(", "auto", "&", "CS", ":", "NonLibcallCSI", ")", "{", "Register", "Reg", "=", "CS", ".", "getReg", "(", ")", ";", "const", "TargetRegisterClass", "*", "RC", "=", "TRI", "->", "getMinimalPhysRegClass", "(", "Reg", ")", ";", "TII", ".", "storeRegToStackSlot", "(", "MBB", ",", "MI", ",", "Reg", ",", "true", ",", "CS", ".", "getFrameIdx", "(", ")", ",", "RC", ",", "TRI", ")", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["spillCalleeSavedRegisters", "-", "Issues", "instruction", "(", "s", ")", "to", "spill", "all", "callee", "saved", "registers", "and", "returns", "true", "if", "it", "is", "n't", "possible", "/", "profitable", "to", "do", "so", "by", "issuing", "a", "series", "of", "store", "instructions", "via", "storeRegToStackSlot", "(", ")", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::PseudoCALLReg", "RISCV::X5", "RISCVII::MO_CALL"], "File": "RISCVFrameLowering", "Func": "spillCalleeSavedRegisters", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 74, "Length": 236, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstPrinter", "::", "applyTargetSpecificCLOption", "(", "StringRef", "Opt", ")", "{", "if", "(", "Opt", "==", "\"no-aliases\"", ")", "{", "NoAliases", "=", "true", ";", "return", "true", ";", "}", "if", "(", "Opt", "==", "\"numeric\"", ")", "{", "ArchRegNames", "=", "true", ";", "return", "true", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["Customize", "the", "printer", "according", "to", "a", "command", "line", "option", "."], "TS_V_token": ["RI5CY", "RISCV", "\"no-aliases\"", "\"numeric\""], "File": "RISCVInstPrinter", "Func": "applyTargetSpecificCLOption", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 75, "Length": 43, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstPrinter", "::", "printInst", "(", "const", "MCInst", "*", "MI", ",", "uint64_t", "Address", ",", "StringRef", "Annot", ",", "const", "MCSubtargetInfo", "&", "STI", ",", "raw_ostream", "&", "O", ")", "{", "bool", "Res", "=", "false", ";", "const", "MCInst", "*", "NewMI", "=", "MI", ";", "MCInst", "UncompressedMI", ";", "if", "(", "!", "NoAliases", ")", "Res", "=", "uncompressInst", "(", "UncompressedMI", ",", "*", "MI", ",", "MRI", ",", "STI", ")", ";", "if", "(", "Res", ")", "NewMI", "=", "const_cast", "<", "MCInst", "*", ">", "(", "&", "UncompressedMI", ")", ";", "if", "(", "NoAliases", "||", "!", "printAliasInstr", "(", "NewMI", ",", "Address", ",", "STI", ",", "O", ")", ")", "printInstruction", "(", "NewMI", ",", "Address", ",", "STI", ",", "O", ")", ";", "printAnnotation", "(", "O", ",", "Annot", ")", ";", "}", ""], "natrual_language": ["Print", "the", "specified", "MCInst", "to", "the", "specified", "raw_ostream", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVInstPrinter", "Func": "printInst", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 76, "Length": 111, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstPrinter", "::", "printRegName", "(", "raw_ostream", "&", "O", ",", "unsigned", "RegNo", ")", "const", "{", "O", "<<", "getRegisterName", "(", "RegNo", ")", ";", "}", ""], "natrual_language": ["Print", "the", "assembler", "register", "name", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVInstPrinter", "Func": "printRegName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 77, "Length": 22, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "analyzeBranch", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "*", "&", "TBB", ",", "MachineBasicBlock", "*", "&", "FBB", ",", "SmallVectorImpl", "<", "MachineOperand", ">", "&", "Cond", ",", "bool", "AllowModify", ")", "const", "{", "TBB", "=", "FBB", "=", "nullptr", ";", "Cond", ".", "clear", "(", ")", ";", "MachineBasicBlock", "::", "iterator", "I", "=", "MBB", ".", "getLastNonDebugInstr", "(", ")", ";", "if", "(", "I", "==", "MBB", ".", "end", "(", ")", "||", "!", "isUnpredicatedTerminator", "(", "*", "I", ")", ")", "return", "false", ";", "MachineBasicBlock", "::", "iterator", "FirstUncondOrIndirectBr", "=", "MBB", ".", "end", "(", ")", ";", "int", "NumTerminators", "=", "0", ";", "for", "(", "auto", "J", "=", "I", ".", "getReverse", "(", ")", ";", "J", "!=", "MBB", ".", "rend", "(", ")", "&&", "isUnpredicatedTerminator", "(", "*", "J", ")", ";", "J", "++", ")", "{", "NumTerminators", "++", ";", "if", "(", "J", "->", "getDesc", "(", ")", ".", "isUnconditionalBranch", "(", ")", "||", "J", "->", "getDesc", "(", ")", ".", "isIndirectBranch", "(", ")", ")", "{", "FirstUncondOrIndirectBr", "=", "J", ".", "getReverse", "(", ")", ";", "}", "}", "if", "(", "AllowModify", "&&", "FirstUncondOrIndirectBr", "!=", "MBB", ".", "end", "(", ")", ")", "{", "while", "(", "std", "::", "next", "(", "FirstUncondOrIndirectBr", ")", "!=", "MBB", ".", "end", "(", ")", ")", "{", "std", "::", "next", "(", "FirstUncondOrIndirectBr", ")", "->", "eraseFromParent", "(", ")", ";", "NumTerminators", "--", ";", "}", "I", "=", "FirstUncondOrIndirectBr", ";", "}", "if", "(", "I", "->", "getDesc", "(", ")", ".", "isIndirectBranch", "(", ")", ")", "return", "true", ";", "if", "(", "NumTerminators", ">", "2", ")", "return", "true", ";", "if", "(", "NumTerminators", "==", "1", "&&", "I", "->", "getDesc", "(", ")", ".", "isUnconditionalBranch", "(", ")", ")", "{", "TBB", "=", "getBranchDestBlock", "(", "*", "I", ")", ";", "return", "false", ";", "}", "if", "(", "NumTerminators", "==", "1", "&&", "I", "->", "getDesc", "(", ")", ".", "isConditionalBranch", "(", ")", ")", "{", "parseCondBranch", "(", "*", "I", ",", "TBB", ",", "Cond", ")", ";", "return", "false", ";", "}", "if", "(", "NumTerminators", "==", "2", "&&", "std", "::", "prev", "(", "I", ")", "->", "getDesc", "(", ")", ".", "isConditionalBranch", "(", ")", "&&", "I", "->", "getDesc", "(", ")", ".", "isUnconditionalBranch", "(", ")", ")", "{", "parseCondBranch", "(", "*", "std", "::", "prev", "(", "I", ")", ",", "TBB", ",", "Cond", ")", ";", "FBB", "=", "getBranchDestBlock", "(", "*", "I", ")", ";", "return", "false", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["analyzeBranch", "-", "Analyze", "the", "branching", "code", "at", "the", "end", "of", "MBB", ",", "returning", "true", "if", "it", "can", "not", "be", "understood", "(", "e.g", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "2", "1", "1", "2"], "File": "RISCVInstrInfo", "Func": "analyzeBranch", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 78, "Length": 351, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "areMemAccessesTriviallyDisjoint", "(", "const", "MachineInstr", "&", "MIa", ",", "const", "MachineInstr", "&", "MIb", ")", "const", "{", "assert", "(", "MIa", ".", "mayLoadOrStore", "(", ")", "&&", "\"MIa must be a load or store.\"", ")", ";", "assert", "(", "MIb", ".", "mayLoadOrStore", "(", ")", "&&", "\"MIb must be a load or store.\"", ")", ";", "if", "(", "MIa", ".", "hasUnmodeledSideEffects", "(", ")", "||", "MIb", ".", "hasUnmodeledSideEffects", "(", ")", "||", "MIa", ".", "hasOrderedMemoryRef", "(", ")", "||", "MIb", ".", "hasOrderedMemoryRef", "(", ")", ")", "return", "false", ";", "const", "TargetRegisterInfo", "*", "TRI", "=", "STI", ".", "getRegisterInfo", "(", ")", ";", "const", "MachineOperand", "*", "BaseOpA", "=", "nullptr", ",", "*", "BaseOpB", "=", "nullptr", ";", "int64_t", "OffsetA", "=", "0", ",", "OffsetB", "=", "0", ";", "unsigned", "int", "WidthA", "=", "0", ",", "WidthB", "=", "0", ";", "if", "(", "getMemOperandWithOffsetWidth", "(", "MIa", ",", "BaseOpA", ",", "OffsetA", ",", "WidthA", ",", "TRI", ")", "&&", "getMemOperandWithOffsetWidth", "(", "MIb", ",", "BaseOpB", ",", "OffsetB", ",", "WidthB", ",", "TRI", ")", ")", "{", "if", "(", "BaseOpA", "->", "isIdenticalTo", "(", "*", "BaseOpB", ")", ")", "{", "int", "LowOffset", "=", "std", "::", "min", "(", "OffsetA", ",", "OffsetB", ")", ";", "int", "HighOffset", "=", "std", "::", "max", "(", "OffsetA", ",", "OffsetB", ")", ";", "int", "LowWidth", "=", "(", "LowOffset", "==", "OffsetA", ")", "?", "WidthA", ":", "WidthB", ";", "if", "(", "LowOffset", "+", "LowWidth", "<=", "HighOffset", ")", "return", "true", ";", "}", "}", "return", "false", ";", "}", ""], "natrual_language": ["Sometimes", ",", "it", "is", "possible", "for", "the", "target", "to", "tell", ",", "even", "without", "aliasing", "information", ",", "that", "two", "MIs", "access", "different", "memory", "addresses", "."], "TS_V_token": ["RI5CY", "RISCV", "\"MIa must be a load or store.\"", "\"MIb must be a load or store.\"", "0", "0", "0", "0"], "File": "RISCVInstrInfo", "Func": "areMemAccessesTriviallyDisjoint", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 79, "Length": 204, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstrInfo", "::", "buildOutlinedFrame", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineFunction", "&", "MF", ",", "const", "outliner", "::", "OutlinedFunction", "&", "OF", ")", "const", "{", "bool", "Changed", "=", "true", ";", "while", "(", "Changed", ")", "{", "Changed", "=", "false", ";", "auto", "I", "=", "MBB", ".", "begin", "(", ")", ";", "auto", "E", "=", "MBB", ".", "end", "(", ")", ";", "for", "(", ";", "I", "!=", "E", ";", "++", "I", ")", "{", "if", "(", "I", "->", "isCFIInstruction", "(", ")", ")", "{", "I", "->", "removeFromParent", "(", ")", ";", "Changed", "=", "true", ";", "break", ";", "}", "}", "}", "MBB", ".", "addLiveIn", "(", "RISCV", "::", "X5", ")", ";", "MBB", ".", "insert", "(", "MBB", ".", "end", "(", ")", ",", "BuildMI", "(", "MF", ",", "DebugLoc", "(", ")", ",", "get", "(", "RISCV", "::", "JALR", ")", ")", ".", "addReg", "(", "RISCV", "::", "X0", ",", "RegState", "::", "Define", ")", ".", "addReg", "(", "RISCV", "::", "X5", ")", ".", "addImm", "(", "0", ")", ")", ";", "}", ""], "natrual_language": ["Insert", "a", "custom", "frame", "for", "outlined", "functions", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X5", "RISCV::JALR", "RISCV::X0", "RISCV::X5", "0"], "File": "RISCVInstrInfo", "Func": "buildOutlinedFrame", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 80, "Length": 149, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstrInfo", "::", "copyPhysReg", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "MBBI", ",", "const", "DebugLoc", "&", "DL", ",", "MCRegister", "DstReg", ",", "MCRegister", "SrcReg", ",", "bool", "KillSrc", ")", "const", "{", "if", "(", "RISCV", "::", "GPRRegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "{", "BuildMI", "(", "MBB", ",", "MBBI", ",", "DL", ",", "get", "(", "RISCV", "::", "ADDI", ")", ",", "DstReg", ")", ".", "addReg", "(", "SrcReg", ",", "getKillRegState", "(", "KillSrc", ")", ")", ".", "addImm", "(", "0", ")", ";", "return", ";", "}", "unsigned", "Opc", ";", "bool", "IsScalableVector", "=", "false", ";", "if", "(", "RISCV", "::", "FPR16RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "Opc", "=", "RISCV", "::", "FSGNJ_H", ";", "else", "if", "(", "RISCV", "::", "FPR32RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "Opc", "=", "RISCV", "::", "FSGNJ_S", ";", "else", "if", "(", "RISCV", "::", "FPR64RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "Opc", "=", "RISCV", "::", "FSGNJ_D", ";", "else", "if", "(", "RISCV", "::", "VRRegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "{", "Opc", "=", "RISCV", "::", "PseudoVMV1R_V", ";", "IsScalableVector", "=", "true", ";", "}", "else", "if", "(", "RISCV", "::", "VRM2RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "{", "Opc", "=", "RISCV", "::", "PseudoVMV2R_V", ";", "IsScalableVector", "=", "true", ";", "}", "else", "if", "(", "RISCV", "::", "VRM4RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "{", "Opc", "=", "RISCV", "::", "PseudoVMV4R_V", ";", "IsScalableVector", "=", "true", ";", "}", "else", "if", "(", "RISCV", "::", "VRM8RegClass", ".", "contains", "(", "DstReg", ",", "SrcReg", ")", ")", "{", "Opc", "=", "RISCV", "::", "PseudoVMV8R_V", ";", "IsScalableVector", "=", "true", ";", "}", "else", "llvm_unreachable", "(", "\"Impossible reg-to-reg copy\"", ")", ";", "if", "(", "IsScalableVector", ")", "BuildMI", "(", "MBB", ",", "MBBI", ",", "DL", ",", "get", "(", "Opc", ")", ",", "DstReg", ")", ".", "addReg", "(", "SrcReg", ",", "getKillRegState", "(", "KillSrc", ")", ")", ";", "else", "BuildMI", "(", "MBB", ",", "MBBI", ",", "DL", ",", "get", "(", "Opc", ")", ",", "DstReg", ")", ".", "addReg", "(", "SrcReg", ",", "getKillRegState", "(", "KillSrc", ")", ")", ".", "addReg", "(", "SrcReg", ",", "getKillRegState", "(", "KillSrc", ")", ")", ";", "}", ""], "natrual_language": ["}", "Branch", "Analysis", "&", "Modification"], "TS_V_token": ["RI5CY", "RISCV", "RISCV::GPRRegClass", "RISCV::ADDI", "0", "RISCV::FPR16RegClass", "RISCV::FSGNJ_H", "RISCV::FPR32RegClass", "RISCV::FSGNJ_S", "RISCV::FPR64RegClass", "RISCV::FSGNJ_D", "RISCV::VRRegClass", "RISCV::PseudoVMV1R_V", "RISCV::VRM2RegClass", "RISCV::PseudoVMV2R_V", "RISCV::VRM4RegClass", "RISCV::PseudoVMV4R_V", "RISCV::VRM8RegClass", "RISCV::PseudoVMV8R_V", "\"Impossible reg-to-reg copy\""], "File": "RISCVInstrInfo", "Func": "copyPhysReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 81, "Length": 325, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "std", "::", "pair", "<", "unsigned", ",", "unsigned", ">", "RISCVInstrInfo", "::", "decomposeMachineOperandsTargetFlags", "(", "unsigned", "TF", ")", "const", "{", "const", "unsigned", "Mask", "=", "RISCVII", "::", "MO_DIRECT_FLAG_MASK", ";", "return", "std", "::", "make_pair", "(", "TF", "&", "Mask", ",", "TF", "&", "~", "Mask", ")", ";", "}", ""], "natrual_language": ["Decompose", "the", "machine", "operand", "'s", "target", "flags", "into", "two", "values", "-", "the", "direct", "target", "flag", "value", "and", "any", "of", "bit", "flags", "that", "are", "applied", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCVII::MO_DIRECT_FLAG_MASK"], "File": "RISCVInstrInfo", "Func": "decomposeMachineOperandsTargetFlags", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 82, "Length": 41, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "getInstSizeInBytes", "(", "const", "MachineInstr", "&", "MI", ")", "const", "{", "unsigned", "Opcode", "=", "MI", ".", "getOpcode", "(", ")", ";", "switch", "(", "Opcode", ")", "{", "default", ":", "{", "if", "(", "MI", ".", "getParent", "(", ")", "&&", "MI", ".", "getParent", "(", ")", "->", "getParent", "(", ")", ")", "{", "const", "auto", "MF", "=", "MI", ".", "getMF", "(", ")", ";", "const", "auto", "&", "TM", "=", "static_cast", "<", "const", "RISCVTargetMachine", "&", ">", "(", "MF", "->", "getTarget", "(", ")", ")", ";", "const", "MCRegisterInfo", "&", "MRI", "=", "*", "TM", ".", "getMCRegisterInfo", "(", ")", ";", "const", "MCSubtargetInfo", "&", "STI", "=", "*", "TM", ".", "getMCSubtargetInfo", "(", ")", ";", "const", "RISCVSubtarget", "&", "ST", "=", "MF", "->", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "if", "(", "isCompressibleInst", "(", "MI", ",", "&", "ST", ",", "MRI", ",", "STI", ")", ")", "return", "2", ";", "}", "return", "get", "(", "Opcode", ")", ".", "getSize", "(", ")", ";", "}", "case", "TargetOpcode", "::", "EH_LABEL", ":", "case", "TargetOpcode", "::", "IMPLICIT_DEF", ":", "case", "TargetOpcode", "::", "KILL", ":", "case", "TargetOpcode", "::", "DBG_VALUE", ":", "return", "0", ";", "case", "RISCV", "::", "PseudoCALLReg", ":", "case", "RISCV", "::", "PseudoCALL", ":", "case", "RISCV", "::", "PseudoJump", ":", "case", "RISCV", "::", "PseudoTAIL", ":", "case", "RISCV", "::", "PseudoLLA", ":", "case", "RISCV", "::", "PseudoLA", ":", "case", "RISCV", "::", "PseudoLA_TLS_IE", ":", "case", "RISCV", "::", "PseudoLA_TLS_GD", ":", "return", "8", ";", "case", "RISCV", "::", "PseudoAtomicLoadNand32", ":", "case", "RISCV", "::", "PseudoAtomicLoadNand64", ":", "return", "20", ";", "case", "RISCV", "::", "PseudoMaskedAtomicSwap32", ":", "case", "RISCV", "::", "PseudoMaskedAtomicLoadAdd32", ":", "case", "RISCV", "::", "PseudoMaskedAtomicLoadSub32", ":", "return", "28", ";", "case", "RISCV", "::", "PseudoMaskedAtomicLoadNand32", ":", "return", "32", ";", "case", "RISCV", "::", "PseudoMaskedAtomicLoadMax32", ":", "case", "RISCV", "::", "PseudoMaskedAtomicLoadMin32", ":", "return", "44", ";", "case", "RISCV", "::", "PseudoMaskedAtomicLoadUMax32", ":", "case", "RISCV", "::", "PseudoMaskedAtomicLoadUMin32", ":", "return", "36", ";", "case", "RISCV", "::", "PseudoCmpXchg32", ":", "case", "RISCV", "::", "PseudoCmpXchg64", ":", "return", "16", ";", "case", "RISCV", "::", "PseudoMaskedCmpXchg32", ":", "return", "32", ";", "case", "TargetOpcode", "::", "INLINEASM", ":", "case", "TargetOpcode", "::", "INLINEASM_BR", ":", "{", "const", "MachineFunction", "&", "MF", "=", "*", "MI", ".", "getParent", "(", ")", "->", "getParent", "(", ")", ";", "const", "auto", "&", "TM", "=", "static_cast", "<", "const", "RISCVTargetMachine", "&", ">", "(", "MF", ".", "getTarget", "(", ")", ")", ";", "return", "getInlineAsmLength", "(", "MI", ".", "getOperand", "(", "0", ")", ".", "getSymbolName", "(", ")", ",", "*", "TM", ".", "getMCAsmInfo", "(", ")", ")", ";", "}", "}", "}", ""], "natrual_language": ["Returns", "the", "size", "in", "bytes", "of", "the", "specified", "MachineInstr", ",", "or", "~0U", "when", "this", "function", "is", "not", "implemented", "by", "a", "target", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "RISCV", "2", "0", "RISCV::PseudoCALLReg", "RISCV::PseudoCALL", "RISCV::PseudoJump", "RISCV::PseudoTAIL", "RISCV::PseudoLLA", "RISCV::PseudoLA", "RISCV::PseudoLA_TLS_IE", "RISCV::PseudoLA_TLS_GD", "8", "RISCV::PseudoAtomicLoadNand32", "RISCV::PseudoAtomicLoadNand64", "20", "RISCV::PseudoMaskedAtomicSwap32", "RISCV::PseudoMaskedAtomicLoadAdd32", "RISCV::PseudoMaskedAtomicLoadSub32", "28", "RISCV::PseudoMaskedAtomicLoadNand32", "32", "RISCV::PseudoMaskedAtomicLoadMax32", "RISCV::PseudoMaskedAtomicLoadMin32", "44", "RISCV::PseudoMaskedAtomicLoadUMax32", "RISCV::PseudoMaskedAtomicLoadUMin32", "36", "RISCV::PseudoCmpXchg32", "RISCV::PseudoCmpXchg64", "16", "RISCV::PseudoMaskedCmpXchg32", "32", "RISCV", "0"], "File": "RISCVInstrInfo", "Func": "getInstSizeInBytes", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 83, "Length": 367, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "getMemOperandWithOffsetWidth", "(", "const", "MachineInstr", "&", "LdSt", ",", "const", "MachineOperand", "*", "&", "BaseReg", ",", "int64_t", "&", "Offset", ",", "unsigned", "&", "Width", ",", "const", "TargetRegisterInfo", "*", "TRI", ")", "const", "{", "if", "(", "!", "LdSt", ".", "mayLoadOrStore", "(", ")", ")", "return", "false", ";", "if", "(", "LdSt", ".", "getNumExplicitOperands", "(", ")", "!=", "3", ")", "return", "false", ";", "if", "(", "!", "LdSt", ".", "getOperand", "(", "1", ")", ".", "isReg", "(", ")", "||", "!", "LdSt", ".", "getOperand", "(", "2", ")", ".", "isImm", "(", ")", ")", "return", "false", ";", "if", "(", "!", "LdSt", ".", "hasOneMemOperand", "(", ")", ")", "return", "false", ";", "Width", "=", "(", "*", "LdSt", ".", "memoperands_begin", "(", ")", ")", "->", "getSize", "(", ")", ";", "BaseReg", "=", "&", "LdSt", ".", "getOperand", "(", "1", ")", ";", "Offset", "=", "LdSt", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["Return", "true", "if", "get", "the", "base", "operand", ",", "byte", "offset", "of", "an", "instruction", "and", "the", "memory", "width", "."], "TS_V_token": ["RI5CY", "RISCV", "3", "1", "2", "1", "2"], "File": "RISCVInstrInfo", "Func": "getMemOperandWithOffsetWidth", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 84, "Length": 139, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "outliner", "::", "OutlinedFunction", "RISCVInstrInfo", "::", "getOutliningCandidateInfo", "(", "std", "::", "vector", "<", "outliner", "::", "Candidate", ">", "&", "RepeatedSequenceLocs", ")", "const", "{", "auto", "CannotInsertCall", "=", "[", "]", "(", "outliner", "::", "Candidate", "&", "C", ")", "{", "const", "TargetRegisterInfo", "*", "TRI", "=", "C", ".", "getMF", "(", ")", "->", "getSubtarget", "(", ")", ".", "getRegisterInfo", "(", ")", ";", "C", ".", "initLRU", "(", "*", "TRI", ")", ";", "LiveRegUnits", "LRU", "=", "C", ".", "LRU", ";", "return", "!", "LRU", ".", "available", "(", "RISCV", "::", "X5", ")", ";", "}", ";", "llvm", "::", "erase_if", "(", "RepeatedSequenceLocs", ",", "CannotInsertCall", ")", ";", "if", "(", "RepeatedSequenceLocs", ".", "size", "(", ")", "<", "2", ")", "return", "outliner", "::", "OutlinedFunction", "(", ")", ";", "unsigned", "SequenceSize", "=", "0", ";", "auto", "I", "=", "RepeatedSequenceLocs", "[", "0", "]", ".", "front", "(", ")", ";", "auto", "E", "=", "std", "::", "next", "(", "RepeatedSequenceLocs", "[", "0", "]", ".", "back", "(", ")", ")", ";", "for", "(", ";", "I", "!=", "E", ";", "++", "I", ")", "SequenceSize", "+=", "getInstSizeInBytes", "(", "*", "I", ")", ";", "unsigned", "CallOverhead", "=", "8", ";", "for", "(", "auto", "&", "C", ":", "RepeatedSequenceLocs", ")", "C", ".", "setCallInfo", "(", "MachineOutlinerDefault", ",", "CallOverhead", ")", ";", "unsigned", "FrameOverhead", "=", "4", ";", "if", "(", "RepeatedSequenceLocs", "[", "0", "]", ".", "getMF", "(", ")", "->", "getSubtarget", "(", ")", ".", "getFeatureBits", "(", ")", "[", "RISCV", "::", "FeatureStdExtC", "]", ")", "FrameOverhead", "=", "2", ";", "return", "outliner", "::", "OutlinedFunction", "(", "RepeatedSequenceLocs", ",", "SequenceSize", ",", "FrameOverhead", ",", "MachineOutlinerDefault", ")", ";", "}", ""], "natrual_language": ["Returns", "a", "outliner", ":", ":OutlinedFunction", "struct", "containing", "target-specific", "information", "for", "a", "set", "of", "outlining", "candidates", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X5", "2", "0", "0", "0", "8", "4", "0", "RISCV::FeatureStdExtC", "2"], "File": "RISCVInstrInfo", "Func": "getOutliningCandidateInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 85, "Length": 228, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "outliner", "::", "InstrType", "RISCVInstrInfo", "::", "getOutliningType", "(", "MachineBasicBlock", "::", "iterator", "&", "MBBI", ",", "unsigned", "Flags", ")", "const", "{", "MachineInstr", "&", "MI", "=", "*", "MBBI", ";", "MachineBasicBlock", "*", "MBB", "=", "MI", ".", "getParent", "(", ")", ";", "const", "TargetRegisterInfo", "*", "TRI", "=", "MBB", "->", "getParent", "(", ")", "->", "getSubtarget", "(", ")", ".", "getRegisterInfo", "(", ")", ";", "if", "(", "MI", ".", "isPosition", "(", ")", ")", "{", "if", "(", "MI", ".", "isCFIInstruction", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Invisible", ";", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "}", "if", "(", "MI", ".", "isInlineAsm", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "if", "(", "MI", ".", "isTerminator", "(", ")", "&&", "!", "MBB", "->", "succ_empty", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "if", "(", "MI", ".", "isReturn", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "if", "(", "MI", ".", "modifiesRegister", "(", "RISCV", "::", "X5", ",", "TRI", ")", "||", "MI", ".", "getDesc", "(", ")", ".", "hasImplicitDefOfPhysReg", "(", "RISCV", "::", "X5", ")", ")", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "for", "(", "const", "auto", "&", "MO", ":", "MI", ".", "operands", "(", ")", ")", "if", "(", "MO", ".", "isMBB", "(", ")", "||", "MO", ".", "isBlockAddress", "(", ")", "||", "MO", ".", "isCPI", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Illegal", ";", "if", "(", "MI", ".", "isMetaInstruction", "(", ")", ")", "return", "outliner", "::", "InstrType", "::", "Invisible", ";", "return", "outliner", "::", "InstrType", "::", "Legal", ";", "}", ""], "natrual_language": ["Returns", "how", "or", "if", "MIT", "should", "be", "outlined", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X5", "RISCV::X5"], "File": "RISCVInstrInfo", "Func": "getOutliningType", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 86, "Length": 234, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "ArrayRef", "<", "std", "::", "pair", "<", "unsigned", ",", "const", "char", "*", ">>", "RISCVInstrInfo", "::", "getSerializableDirectMachineOperandTargetFlags", "(", ")", "const", "{", "using", "namespace", "RISCVII", ";", "static", "const", "std", "::", "pair", "<", "unsigned", ",", "const", "char", "*", ">", "TargetFlags", "[", "]", "=", "{", "{", "MO_CALL", ",", "\"riscv-call\"", "}", ",", "{", "MO_PLT", ",", "\"riscv-plt\"", "}", ",", "{", "MO_LO", ",", "\"riscv-lo\"", "}", ",", "{", "MO_HI", ",", "\"riscv-hi\"", "}", ",", "{", "MO_PCREL_LO", ",", "\"riscv-pcrel-lo\"", "}", ",", "{", "MO_PCREL_HI", ",", "\"riscv-pcrel-hi\"", "}", ",", "{", "MO_GOT_HI", ",", "\"riscv-got-hi\"", "}", ",", "{", "MO_TPREL_LO", ",", "\"riscv-tprel-lo\"", "}", ",", "{", "MO_TPREL_HI", ",", "\"riscv-tprel-hi\"", "}", ",", "{", "MO_TPREL_ADD", ",", "\"riscv-tprel-add\"", "}", ",", "{", "MO_TLS_GOT_HI", ",", "\"riscv-tls-got-hi\"", "}", ",", "{", "MO_TLS_GD_HI", ",", "\"riscv-tls-gd-hi\"", "}", "}", ";", "return", "makeArrayRef", "(", "TargetFlags", ")", ";", "}", ""], "natrual_language": ["Return", "an", "array", "that", "contains", "the", "direct", "target", "flag", "values", "and", "their", "names", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "\"riscv-call\"", "\"riscv-plt\"", "\"riscv-lo\"", "\"riscv-hi\"", "\"riscv-pcrel-lo\"", "\"riscv-pcrel-hi\"", "\"riscv-got-hi\"", "\"riscv-tprel-lo\"", "\"riscv-tprel-hi\"", "\"riscv-tprel-add\"", "\"riscv-tls-got-hi\"", "\"riscv-tls-gd-hi\""], "File": "RISCVInstrInfo", "Func": "getSerializableDirectMachineOperandTargetFlags", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 87, "Length": 120, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "insertBranch", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "*", "TBB", ",", "MachineBasicBlock", "*", "FBB", ",", "ArrayRef", "<", "MachineOperand", ">", "Cond", ",", "const", "DebugLoc", "&", "DL", ",", "int", "*", "BytesAdded", ")", "const", "{", "if", "(", "BytesAdded", ")", "*", "BytesAdded", "=", "0", ";", "assert", "(", "TBB", "&&", "\"insertBranch must not be told to insert a fallthrough\"", ")", ";", "assert", "(", "(", "Cond", ".", "size", "(", ")", "==", "3", "||", "Cond", ".", "size", "(", ")", "==", "0", ")", "&&", "\"RISCV branch conditions have two components!\"", ")", ";", "if", "(", "Cond", ".", "empty", "(", ")", ")", "{", "MachineInstr", "&", "MI", "=", "*", "BuildMI", "(", "&", "MBB", ",", "DL", ",", "get", "(", "RISCV", "::", "PseudoBR", ")", ")", ".", "addMBB", "(", "TBB", ")", ";", "if", "(", "BytesAdded", ")", "*", "BytesAdded", "+=", "getInstSizeInBytes", "(", "MI", ")", ";", "return", "1", ";", "}", "unsigned", "Opc", "=", "Cond", "[", "0", "]", ".", "getImm", "(", ")", ";", "MachineInstr", "&", "CondMI", "=", "*", "BuildMI", "(", "&", "MBB", ",", "DL", ",", "get", "(", "Opc", ")", ")", ".", "add", "(", "Cond", "[", "1", "]", ")", ".", "add", "(", "Cond", "[", "2", "]", ")", ".", "addMBB", "(", "TBB", ")", ";", "if", "(", "BytesAdded", ")", "*", "BytesAdded", "+=", "getInstSizeInBytes", "(", "CondMI", ")", ";", "if", "(", "!", "FBB", ")", "return", "1", ";", "MachineInstr", "&", "MI", "=", "*", "BuildMI", "(", "&", "MBB", ",", "DL", ",", "get", "(", "RISCV", "::", "PseudoBR", ")", ")", ".", "addMBB", "(", "FBB", ")", ";", "if", "(", "BytesAdded", ")", "*", "BytesAdded", "+=", "getInstSizeInBytes", "(", "MI", ")", ";", "return", "2", ";", "}", ""], "natrual_language": ["Insert", "branch", "code", "into", "the", "end", "of", "the", "specified", "MachineBasicBlock", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "\"insertBranch must not be told to insert a fallthrough\"", "3", "0", "\"RISCV branch conditions have two components!\"", "RISCV::PseudoBR", "1", "0", "1", "2", "1", "RISCV::PseudoBR", "2"], "File": "RISCVInstrInfo", "Func": "insertBranch", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 88, "Length": 235, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "insertIndirectBranch", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "&", "DestBB", ",", "const", "DebugLoc", "&", "DL", ",", "int64_t", "BrOffset", ",", "RegScavenger", "*", "RS", ")", "const", "{", "assert", "(", "RS", "&&", "\"RegScavenger required for long branching\"", ")", ";", "assert", "(", "MBB", ".", "empty", "(", ")", "&&", "\"new block should be inserted for expanding unconditional branch\"", ")", ";", "assert", "(", "MBB", ".", "pred_size", "(", ")", "==", "1", ")", ";", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "MachineRegisterInfo", "&", "MRI", "=", "MF", "->", "getRegInfo", "(", ")", ";", "if", "(", "!", "isInt", "<", "32", ">", "(", "BrOffset", ")", ")", "report_fatal_error", "(", "\"Branch offsets outside of the signed 32-bit range not supported\"", ")", ";", "Register", "ScratchReg", "=", "MRI", ".", "createVirtualRegister", "(", "&", "RISCV", "::", "GPRRegClass", ")", ";", "auto", "II", "=", "MBB", ".", "end", "(", ")", ";", "MachineInstr", "&", "MI", "=", "*", "BuildMI", "(", "MBB", ",", "II", ",", "DL", ",", "get", "(", "RISCV", "::", "PseudoJump", ")", ")", ".", "addReg", "(", "ScratchReg", ",", "RegState", "::", "Define", "|", "RegState", "::", "Dead", ")", ".", "addMBB", "(", "&", "DestBB", ",", "RISCVII", "::", "MO_CALL", ")", ";", "RS", "->", "enterBasicBlockEnd", "(", "MBB", ")", ";", "unsigned", "Scav", "=", "RS", "->", "scavengeRegisterBackwards", "(", "RISCV", "::", "GPRRegClass", ",", "MI", ".", "getIterator", "(", ")", ",", "false", ",", "0", ")", ";", "MRI", ".", "replaceRegWith", "(", "ScratchReg", ",", "Scav", ")", ";", "MRI", ".", "clearVirtRegs", "(", ")", ";", "RS", "->", "setRegUsed", "(", "Scav", ")", ";", "return", "8", ";", "}", ""], "natrual_language": ["Insert", "an", "unconditional", "indirect", "branch", "at", "the", "end", "of", "MBB", "to", "NewDestBB", "."], "TS_V_token": ["RI5CY", "RISCV", "\"RegScavenger required for long branching\"", "\"new block should be inserted for expanding unconditional branch\"", "1", "32", "\"Branch offsets outside of the signed 32-bit range not supported\"", "RISCV::GPRRegClass", "RISCV::PseudoJump", "RISCVII::MO_CALL", "RISCV::GPRRegClass", "0", "8"], "File": "RISCVInstrInfo", "Func": "insertIndirectBranch", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 89, "Length": 213, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MachineBasicBlock", "::", "iterator", "RISCVInstrInfo", "::", "insertOutlinedCall", "(", "Module", "&", "M", ",", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "&", "It", ",", "MachineFunction", "&", "MF", ",", "const", "outliner", "::", "Candidate", "&", "C", ")", "const", "{", "It", "=", "MBB", ".", "insert", "(", "It", ",", "BuildMI", "(", "MF", ",", "DebugLoc", "(", ")", ",", "get", "(", "RISCV", "::", "PseudoCALLReg", ")", ",", "RISCV", "::", "X5", ")", ".", "addGlobalAddress", "(", "M", ".", "getNamedValue", "(", "MF", ".", "getName", "(", ")", ")", ",", "0", ",", "RISCVII", "::", "MO_CALL", ")", ")", ";", "return", "It", ";", "}", ""], "natrual_language": ["Insert", "a", "call", "to", "an", "outlined", "function", "into", "the", "program", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::PseudoCALLReg", "RISCV::X5", "0", "RISCVII::MO_CALL"], "File": "RISCVInstrInfo", "Func": "insertOutlinedCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 90, "Length": 87, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "isAsCheapAsAMove", "(", "const", "MachineInstr", "&", "MI", ")", "const", "{", "const", "unsigned", "Opcode", "=", "MI", ".", "getOpcode", "(", ")", ";", "switch", "(", "Opcode", ")", "{", "default", ":", "break", ";", "case", "RISCV", "::", "FSGNJ_D", ":", "case", "RISCV", "::", "FSGNJ_S", ":", "return", "MI", ".", "getOperand", "(", "1", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "1", ")", ".", "getReg", "(", ")", "==", "MI", ".", "getOperand", "(", "2", ")", ".", "getReg", "(", ")", ";", "case", "RISCV", "::", "ADDI", ":", "case", "RISCV", "::", "ORI", ":", "case", "RISCV", "::", "XORI", ":", "return", "(", "MI", ".", "getOperand", "(", "1", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "1", ")", ".", "getReg", "(", ")", "==", "RISCV", "::", "X0", ")", "||", "(", "MI", ".", "getOperand", "(", "2", ")", ".", "isImm", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", "==", "0", ")", ";", "}", "return", "MI", ".", "isAsCheapAsAMove", "(", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "the", "instruction", "is", "as", "cheap", "as", "a", "move", "instruction", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FSGNJ_D", "RISCV::FSGNJ_S", "1", "2", "1", "2", "RISCV::ADDI", "RISCV::ORI", "RISCV::XORI", "1", "1", "RISCV::X0", "2", "2", "0"], "File": "RISCVInstrInfo", "Func": "isAsCheapAsAMove", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 91, "Length": 165, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "isBranchOffsetInRange", "(", "unsigned", "BranchOp", ",", "int64_t", "BrOffset", ")", "const", "{", "unsigned", "XLen", "=", "STI", ".", "getXLen", "(", ")", ";", "switch", "(", "BranchOp", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unexpected opcode!\"", ")", ";", "case", "RISCV", "::", "BEQ", ":", "case", "RISCV", "::", "BNE", ":", "case", "RISCV", "::", "BLT", ":", "case", "RISCV", "::", "BGE", ":", "case", "RISCV", "::", "BLTU", ":", "case", "RISCV", "::", "BGEU", ":", "case", "RISCV", "::", "P_BEQIMM", ":", "case", "RISCV", "::", "P_BNEIMM", ":", "return", "isIntN", "(", "13", ",", "BrOffset", ")", ";", "case", "RISCV", "::", "JAL", ":", "case", "RISCV", "::", "PseudoBR", ":", "return", "isIntN", "(", "21", ",", "BrOffset", ")", ";", "case", "RISCV", "::", "PseudoJump", ":", "return", "isIntN", "(", "32", ",", "SignExtend64", "(", "BrOffset", "+", "0x800", ",", "XLen", ")", ")", ";", "}", "}", ""], "natrual_language": ["Determine", "if", "the", "branch", "target", "is", "in", "range", "."], "TS_V_token": ["RI5CY", "RISCV", "\"Unexpected opcode!\"", "RISCV::BEQ", "RISCV::BNE", "RISCV::BLT", "RISCV::BGE", "RISCV::BLTU", "RISCV::BGEU", "RISCV::P_BEQIMM", "RISCV::P_BNEIMM", "13", "RISCV::JAL", "RISCV::PseudoBR", "21", "RISCV::PseudoJump", "32", "0x800"], "File": "RISCVInstrInfo", "Func": "isBranchOffsetInRange", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 92, "Length": 122, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Optional", "<", "DestSourcePair", ">", "RISCVInstrInfo", "::", "isCopyInstrImpl", "(", "const", "MachineInstr", "&", "MI", ")", "const", "{", "if", "(", "MI", ".", "isMoveReg", "(", ")", ")", "return", "DestSourcePair", "{", "MI", ".", "getOperand", "(", "0", ")", ",", "MI", ".", "getOperand", "(", "1", ")", "}", ";", "switch", "(", "MI", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "break", ";", "case", "RISCV", "::", "ADDI", ":", "if", "(", "MI", ".", "getOperand", "(", "1", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "isImm", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", "==", "0", ")", "return", "DestSourcePair", "{", "MI", ".", "getOperand", "(", "0", ")", ",", "MI", ".", "getOperand", "(", "1", ")", "}", ";", "break", ";", "case", "RISCV", "::", "FSGNJ_D", ":", "case", "RISCV", "::", "FSGNJ_S", ":", "if", "(", "MI", ".", "getOperand", "(", "1", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "isReg", "(", ")", "&&", "MI", ".", "getOperand", "(", "1", ")", ".", "getReg", "(", ")", "==", "MI", ".", "getOperand", "(", "2", ")", ".", "getReg", "(", ")", ")", "return", "DestSourcePair", "{", "MI", ".", "getOperand", "(", "0", ")", ",", "MI", ".", "getOperand", "(", "1", ")", "}", ";", "break", ";", "}", "return", "None", ";", "}", ""], "natrual_language": ["If", "the", "specific", "machine", "instruction", "is", "a", "instruction", "that", "moves/copies", "value", "from", "one", "register", "to", "another", "register", "return", "destination", "and", "source", "registers", "as", "machine", "operands", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "1", "RISCV::ADDI", "1", "2", "2", "0", "0", "1", "RISCV::FSGNJ_D", "RISCV::FSGNJ_S", "1", "2", "1", "2", "0", "1"], "File": "RISCVInstrInfo", "Func": "isCopyInstrImpl", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 93, "Length": 197, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "isFunctionSafeToOutlineFrom", "(", "MachineFunction", "&", "MF", ",", "bool", "OutlineFromLinkOnceODRs", ")", "const", "{", "const", "Function", "&", "F", "=", "MF", ".", "getFunction", "(", ")", ";", "if", "(", "!", "OutlineFromLinkOnceODRs", "&&", "F", ".", "hasLinkOnceODRLinkage", "(", ")", ")", "return", "false", ";", "if", "(", "F", ".", "hasSection", "(", ")", ")", "return", "false", ";", "return", "true", ";", "}", ""], "natrual_language": ["Return", "true", "if", "the", "function", "can", "safely", "be", "outlined", "from", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVInstrInfo", "Func": "isFunctionSafeToOutlineFrom", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 94, "Length": 54, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "isLoadFromStackSlot", "(", "const", "MachineInstr", "&", "MI", ",", "int", "&", "FrameIndex", ")", "const", "{", "switch", "(", "MI", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "return", "0", ";", "case", "RISCV", "::", "LB", ":", "case", "RISCV", "::", "LBU", ":", "case", "RISCV", "::", "LH", ":", "case", "RISCV", "::", "LHU", ":", "case", "RISCV", "::", "FLH", ":", "case", "RISCV", "::", "LW", ":", "case", "RISCV", "::", "FLW", ":", "case", "RISCV", "::", "LWU", ":", "case", "RISCV", "::", "LD", ":", "case", "RISCV", "::", "FLD", ":", "break", ";", "}", "if", "(", "MI", ".", "getOperand", "(", "1", ")", ".", "isFI", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "isImm", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", "==", "0", ")", "{", "FrameIndex", "=", "MI", ".", "getOperand", "(", "1", ")", ".", "getIndex", "(", ")", ";", "return", "MI", ".", "getOperand", "(", "0", ")", ".", "getReg", "(", ")", ";", "}", "return", "0", ";", "}", ""], "natrual_language": ["isLoadFromStackSlot", "-", "If", "the", "specified", "machine", "instruction", "is", "a", "direct", "load", "from", "a", "stack", "slot", ",", "return", "the", "virtual", "or", "physical", "register", "number", "of", "the", "destination", "along", "with", "the", "FrameIndex", "of", "the", "loaded", "stack", "slot", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "RISCV::LB", "RISCV::LBU", "RISCV::LH", "RISCV::LHU", "RISCV::FLH", "RISCV::LW", "RISCV::FLW", "RISCV::LWU", "RISCV::LD", "RISCV::FLD", "1", "2", "2", "0", "1", "0", "0"], "File": "RISCVInstrInfo", "Func": "isLoadFromStackSlot", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 95, "Length": 151, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "isMBBSafeToOutlineFrom", "(", "MachineBasicBlock", "&", "MBB", ",", "unsigned", "&", "Flags", ")", "const", "{", "return", "true", ";", "}", ""], "natrual_language": ["Optional", "target", "hook", "that", "returns", "true", "if", "MBB", "is", "safe", "to", "outline", "from", ",", "and", "returns", "any", "target-specific", "information", "in", "Flags", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVInstrInfo", "Func": "isMBBSafeToOutlineFrom", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 96, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "isSchedulingBoundary", "(", "const", "MachineInstr", "&", "MI", ",", "const", "MachineBasicBlock", "*", "MBB", ",", "const", "MachineFunction", "&", "MF", ")", "const", "{", "if", "(", "TargetInstrInfo", "::", "isSchedulingBoundary", "(", "MI", ",", "MBB", ",", "MF", ")", ")", "{", "return", "true", ";", "}", "switch", "(", "MI", ".", "getOpcode", "(", ")", ")", "{", "case", "RISCV", "::", "LOOP0setup", ":", "case", "RISCV", "::", "LOOP1setup", ":", "case", "RISCV", "::", "LOOP0setupi", ":", "case", "RISCV", "::", "LOOP1setupi", ":", "return", "true", ";", "default", ":", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["isSchedulingBoundary", "-", "Overrides", "the", "isSchedulingBoundary", "from", "Codegen/TargetInstrInfo.cpp", "to", "make", "it", "capable", "of", "identifying", "ENDBR", "intructions", "and", "prevent", "it", "from", "being", "re-scheduled", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::LOOP0setup", "RISCV::LOOP1setup", "RISCV::LOOP0setupi", "RISCV::LOOP1setupi"], "File": "RISCVInstrInfo", "Func": "isSchedulingBoundary", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 97, "Length": 80, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "isStoreToStackSlot", "(", "const", "MachineInstr", "&", "MI", ",", "int", "&", "FrameIndex", ")", "const", "{", "switch", "(", "MI", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "return", "0", ";", "case", "RISCV", "::", "SB", ":", "case", "RISCV", "::", "SH", ":", "case", "RISCV", "::", "SW", ":", "case", "RISCV", "::", "FSH", ":", "case", "RISCV", "::", "FSW", ":", "case", "RISCV", "::", "SD", ":", "case", "RISCV", "::", "FSD", ":", "break", ";", "}", "if", "(", "MI", ".", "getOperand", "(", "1", ")", ".", "isFI", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "isImm", "(", ")", "&&", "MI", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", "==", "0", ")", "{", "FrameIndex", "=", "MI", ".", "getOperand", "(", "1", ")", ".", "getIndex", "(", ")", ";", "return", "MI", ".", "getOperand", "(", "0", ")", ".", "getReg", "(", ")", ";", "}", "return", "0", ";", "}", ""], "natrual_language": ["isStoreToStackSlot", "-", "If", "the", "specified", "machine", "instruction", "is", "a", "direct", "store", "to", "a", "stack", "slot", ",", "return", "the", "virtual", "or", "physical", "register", "number", "of", "the", "source", "reg", "along", "with", "the", "FrameIndex", "of", "the", "loaded", "stack", "slot", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "RISCV::SB", "RISCV::SH", "RISCV::SW", "RISCV::FSH", "RISCV::FSW", "RISCV::SD", "RISCV::FSD", "1", "2", "2", "0", "1", "0", "0"], "File": "RISCVInstrInfo", "Func": "isStoreToStackSlot", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 98, "Length": 136, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstrInfo", "::", "loadRegFromStackSlot", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "I", ",", "Register", "DstReg", ",", "int", "FI", ",", "const", "TargetRegisterClass", "*", "RC", ",", "const", "TargetRegisterInfo", "*", "TRI", ")", "const", "{", "DebugLoc", "DL", ";", "if", "(", "I", "!=", "MBB", ".", "end", "(", ")", ")", "DL", "=", "I", "->", "getDebugLoc", "(", ")", ";", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "const", "MachineFrameInfo", "&", "MFI", "=", "MF", "->", "getFrameInfo", "(", ")", ";", "MachineMemOperand", "*", "MMO", "=", "MF", "->", "getMachineMemOperand", "(", "MachinePointerInfo", "::", "getFixedStack", "(", "*", "MF", ",", "FI", ")", ",", "MachineMemOperand", "::", "MOLoad", ",", "MFI", ".", "getObjectSize", "(", "FI", ")", ",", "MFI", ".", "getObjectAlign", "(", "FI", ")", ")", ";", "unsigned", "Opcode", ";", "if", "(", "RISCV", "::", "GPRRegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "TRI", "->", "getRegSizeInBits", "(", "RISCV", "::", "GPRRegClass", ")", "==", "32", "?", "RISCV", "::", "LW", ":", "RISCV", "::", "LD", ";", "else", "if", "(", "RISCV", "::", "FPR16RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FLH", ";", "else", "if", "(", "RISCV", "::", "FPR32RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FLW", ";", "else", "if", "(", "RISCV", "::", "FPR64RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FLD", ";", "else", "llvm_unreachable", "(", "\"Can't load this register from stack slot\"", ")", ";", "BuildMI", "(", "MBB", ",", "I", ",", "DL", ",", "get", "(", "Opcode", ")", ",", "DstReg", ")", ".", "addFrameIndex", "(", "FI", ")", ".", "addImm", "(", "0", ")", ".", "addMemOperand", "(", "MMO", ")", ";", "}", ""], "natrual_language": ["Load", "the", "specified", "register", "of", "the", "given", "register", "class", "from", "the", "specified", "stack", "frame", "index", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::GPRRegClass", "RISCV::GPRRegClass", "32", "RISCV::LW", "RISCV::LD", "RISCV::FPR16RegClass", "RISCV::FLH", "RISCV::FPR32RegClass", "RISCV::FLW", "RISCV::FPR64RegClass", "RISCV::FLD", "\"Can't load this register from stack slot\"", "0"], "File": "RISCVInstrInfo", "Func": "loadRegFromStackSlot", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 99, "Length": 238, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVInstrInfo", "::", "removeBranch", "(", "MachineBasicBlock", "&", "MBB", ",", "int", "*", "BytesRemoved", ")", "const", "{", "if", "(", "BytesRemoved", ")", "*", "BytesRemoved", "=", "0", ";", "MachineBasicBlock", "::", "iterator", "I", "=", "MBB", ".", "getLastNonDebugInstr", "(", ")", ";", "if", "(", "I", "==", "MBB", ".", "end", "(", ")", ")", "return", "0", ";", "if", "(", "!", "I", "->", "getDesc", "(", ")", ".", "isUnconditionalBranch", "(", ")", "&&", "!", "I", "->", "getDesc", "(", ")", ".", "isConditionalBranch", "(", ")", ")", "return", "0", ";", "if", "(", "BytesRemoved", ")", "*", "BytesRemoved", "+=", "getInstSizeInBytes", "(", "*", "I", ")", ";", "I", "->", "eraseFromParent", "(", ")", ";", "I", "=", "MBB", ".", "end", "(", ")", ";", "if", "(", "I", "==", "MBB", ".", "begin", "(", ")", ")", "return", "1", ";", "--", "I", ";", "if", "(", "!", "I", "->", "getDesc", "(", ")", ".", "isConditionalBranch", "(", ")", ")", "return", "1", ";", "if", "(", "BytesRemoved", ")", "*", "BytesRemoved", "+=", "getInstSizeInBytes", "(", "*", "I", ")", ";", "I", "->", "eraseFromParent", "(", ")", ";", "return", "2", ";", "}", ""], "natrual_language": ["Remove", "the", "branching", "code", "at", "the", "end", "of", "the", "specific", "MBB", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "0", "0", "1", "1", "2"], "File": "RISCVInstrInfo", "Func": "removeBranch", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 100, "Length": 157, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "reverseBranchCondition", "(", "SmallVectorImpl", "<", "MachineOperand", ">", "&", "Cond", ")", "const", "{", "assert", "(", "(", "Cond", ".", "size", "(", ")", "==", "3", ")", "&&", "\"Invalid branch condition!\"", ")", ";", "Cond", "[", "0", "]", ".", "setImm", "(", "getOppositeBranchOpcode", "(", "Cond", "[", "0", "]", ".", "getImm", "(", ")", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["Reverses", "the", "branch", "condition", "of", "the", "specified", "condition", "list", ",", "returning", "false", "on", "success", "and", "true", "if", "it", "can", "not", "be", "reversed", "."], "TS_V_token": ["RI5CY", "RISCV", "3", "\"Invalid branch condition!\"", "0", "0"], "File": "RISCVInstrInfo", "Func": "reverseBranchCondition", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 101, "Length": 53, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVInstrInfo", "::", "storeRegToStackSlot", "(", "MachineBasicBlock", "&", "MBB", ",", "MachineBasicBlock", "::", "iterator", "I", ",", "Register", "SrcReg", ",", "bool", "IsKill", ",", "int", "FI", ",", "const", "TargetRegisterClass", "*", "RC", ",", "const", "TargetRegisterInfo", "*", "TRI", ")", "const", "{", "DebugLoc", "DL", ";", "if", "(", "I", "!=", "MBB", ".", "end", "(", ")", ")", "DL", "=", "I", "->", "getDebugLoc", "(", ")", ";", "MachineFunction", "*", "MF", "=", "MBB", ".", "getParent", "(", ")", ";", "const", "MachineFrameInfo", "&", "MFI", "=", "MF", "->", "getFrameInfo", "(", ")", ";", "MachineMemOperand", "*", "MMO", "=", "MF", "->", "getMachineMemOperand", "(", "MachinePointerInfo", "::", "getFixedStack", "(", "*", "MF", ",", "FI", ")", ",", "MachineMemOperand", "::", "MOStore", ",", "MFI", ".", "getObjectSize", "(", "FI", ")", ",", "MFI", ".", "getObjectAlign", "(", "FI", ")", ")", ";", "unsigned", "Opcode", ";", "if", "(", "RISCV", "::", "GPRRegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "TRI", "->", "getRegSizeInBits", "(", "RISCV", "::", "GPRRegClass", ")", "==", "32", "?", "RISCV", "::", "SW", ":", "RISCV", "::", "SD", ";", "else", "if", "(", "RISCV", "::", "FPR16RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FSH", ";", "else", "if", "(", "RISCV", "::", "FPR32RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FSW", ";", "else", "if", "(", "RISCV", "::", "FPR64RegClass", ".", "hasSubClassEq", "(", "RC", ")", ")", "Opcode", "=", "RISCV", "::", "FSD", ";", "else", "llvm_unreachable", "(", "\"Can't store this register to stack slot\"", ")", ";", "BuildMI", "(", "MBB", ",", "I", ",", "DL", ",", "get", "(", "Opcode", ")", ")", ".", "addReg", "(", "SrcReg", ",", "getKillRegState", "(", "IsKill", ")", ")", ".", "addFrameIndex", "(", "FI", ")", ".", "addImm", "(", "0", ")", ".", "addMemOperand", "(", "MMO", ")", ";", "}", ""], "natrual_language": ["Store", "the", "specified", "register", "of", "the", "given", "register", "class", "to", "the", "specified", "stack", "frame", "index", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::GPRRegClass", "RISCV::GPRRegClass", "32", "RISCV::SW", "RISCV::SD", "RISCV::FPR16RegClass", "RISCV::FSH", "RISCV::FPR32RegClass", "RISCV::FSW", "RISCV::FPR64RegClass", "RISCV::FSD", "\"Can't store this register to stack slot\"", "0"], "File": "RISCVInstrInfo", "Func": "storeRegToStackSlot", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 102, "Length": 249, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstrInfo", "::", "verifyInstruction", "(", "const", "MachineInstr", "&", "MI", ",", "StringRef", "&", "ErrInfo", ")", "const", "{", "const", "MCInstrInfo", "*", "MCII", "=", "STI", ".", "getInstrInfo", "(", ")", ";", "MCInstrDesc", "const", "&", "Desc", "=", "MCII", "->", "get", "(", "MI", ".", "getOpcode", "(", ")", ")", ";", "for", "(", "auto", "&", "OI", ":", "enumerate", "(", "Desc", ".", "operands", "(", ")", ")", ")", "{", "unsigned", "OpType", "=", "OI", ".", "value", "(", ")", ".", "OperandType", ";", "if", "(", "OpType", ">=", "RISCVOp", "::", "OPERAND_FIRST_RISCV_IMM", "&&", "OpType", "<=", "RISCVOp", "::", "OPERAND_LAST_RISCV_IMM", ")", "{", "const", "MachineOperand", "&", "MO", "=", "MI", ".", "getOperand", "(", "OI", ".", "index", "(", ")", ")", ";", "if", "(", "MO", ".", "isImm", "(", ")", ")", "{", "int64_t", "Imm", "=", "MO", ".", "getImm", "(", ")", ";", "bool", "Ok", ";", "switch", "(", "OpType", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unexpected operand type\"", ")", ";", "case", "RISCVOp", "::", "OPERAND_UIMM4", ":", "Ok", "=", "isUInt", "<", "4", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMM5", ":", "Ok", "=", "isUInt", "<", "5", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMM12", ":", "Ok", "=", "isUInt", "<", "12", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMM12M1", ":", "Ok", "=", "isUInt", "<", "12", ">", "(", "Imm", ")", "&&", "(", "Imm", "!=", "0", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMM3", ":", "Ok", "=", "isUInt", "<", "3", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_SIMM12", ":", "Ok", "=", "isInt", "<", "12", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMM20", ":", "Ok", "=", "isUInt", "<", "20", ">", "(", "Imm", ")", ";", "break", ";", "case", "RISCVOp", "::", "OPERAND_UIMMLOG2XLEN", ":", "if", "(", "STI", ".", "getTargetTriple", "(", ")", ".", "isArch64Bit", "(", ")", ")", "Ok", "=", "isUInt", "<", "6", ">", "(", "Imm", ")", ";", "else", "Ok", "=", "isUInt", "<", "5", ">", "(", "Imm", ")", ";", "break", ";", "}", "if", "(", "!", "Ok", ")", "{", "ErrInfo", "=", "\"Invalid immediate\"", ";", "return", "false", ";", "}", "}", "}", "}", "return", "true", ";", "}", ""], "natrual_language": ["Perform", "target-specific", "instruction", "verification", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCVOp::OPERAND_FIRST_RISCV_IMM", "RISCVOp::OPERAND_LAST_RISCV_IMM", "\"Unexpected operand type\"", "RISCVOp::OPERAND_UIMM4", "4", "RISCVOp::OPERAND_UIMM5", "5", "RISCVOp::OPERAND_UIMM12", "12", "RISCVOp::OPERAND_UIMM12M1", "12", "0", "RISCVOp::OPERAND_UIMM3", "3", "RISCVOp::OPERAND_SIMM12", "12", "RISCVOp::OPERAND_UIMM20", "20", "RISCVOp::OPERAND_UIMMLOG2XLEN", "6", "5", "\"Invalid immediate\""], "File": "RISCVInstrInfo", "Func": "verifyInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 103, "Length": 321, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "static", "const", "char", "*", "getName", "(", ")", "{", "return", "DEBUG_TYPE", ";", "}", ""], "natrual_language": ["Return", "a", "string", "with", "the", "name", "of", "the", "plan", "and", "the", "applicable", "VFs", "and", "UFs", "."], "TS_V_token": ["RI5CY"], "File": "RISCVInstructionSelector", "Func": "getName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 104, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVInstructionSelector", "::", "select", "(", "MachineInstr", "&", "I", ")", "{", "if", "(", "!", "isPreISelGenericOpcode", "(", "I", ".", "getOpcode", "(", ")", ")", ")", "{", "return", "true", ";", "}", "if", "(", "selectImpl", "(", "I", ",", "*", "CoverageInfo", ")", ")", "return", "true", ";", "return", "false", ";", "}", ""], "natrual_language": ["Select", "the", "(", "possibly", "generic", ")", "instruction", "I", "to", "only", "use", "target-specific", "opcodes", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVInstructionSelector", "Func": "select", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 105, "Length": 44, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "\"RISCV DAG->DAG Pattern Instruction Selection\"", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "\"RISCV DAG->DAG Pattern Instruction Selection\""], "File": "RISCVISelDAGToDAG", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 106, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVDAGToDAGISel", "::", "PostprocessISelDAG", "(", ")", "{", "doPeepholeLoadStoreADDI", "(", ")", ";", "}", ""], "natrual_language": ["PostprocessISelDAG", "(", ")", "-", "This", "hook", "allows", "the", "target", "to", "hack", "on", "the", "graph", "right", "after", "selection", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelDAGToDAG", "Func": "PostprocessISelDAG", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 107, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "override", "{", "Subtarget", "=", "&", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "return", "SelectionDAGISel", "::", "runOnMachineFunction", "(", "MF", ")", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelDAGToDAG", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 108, "Length": 30, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVDAGToDAGISel", "::", "SelectInlineAsmMemoryOperand", "(", "const", "SDValue", "&", "Op", ",", "unsigned", "ConstraintID", ",", "std", "::", "vector", "<", "SDValue", ">", "&", "OutOps", ")", "{", "switch", "(", "ConstraintID", ")", "{", "case", "InlineAsm", "::", "Constraint_m", ":", "OutOps", ".", "push_back", "(", "Op", ")", ";", "return", "false", ";", "case", "InlineAsm", "::", "Constraint_A", ":", "OutOps", ".", "push_back", "(", "Op", ")", ";", "return", "false", ";", "default", ":", "break", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["SelectInlineAsmMemoryOperand", "-", "Select", "the", "specified", "address", "as", "a", "target", "addressing", "mode", ",", "according", "to", "the", "specified", "constraint", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelDAGToDAG", "Func": "SelectInlineAsmMemoryOperand", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 109, "Length": 67, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "allowsMisalignedMemoryAccesses", "(", "EVT", "VT", ",", "unsigned", "AddrSpace", "=", "0", ",", "unsigned", "Align", "=", "1", ",", "MachineMemOperand", "::", "Flags", "Flags", "=", "MachineMemOperand", "::", "MONone", ",", "bool", "*", "Fast", "=", "nullptr", ")", "const", "{", "if", "(", "Subtarget", ".", "hasPULPExtV2", "(", ")", ")", "{", "if", "(", "Fast", ")", "{", "*", "Fast", "=", "false", ";", "}", "return", "true", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "the", "target", "allows", "unaligned", "memory", "accesses", "of", "the", "specified", "type", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "1"], "File": "RISCVISelLowering", "Func": "allowsMisalignedMemoryAccesses", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 110, "Length": 63, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "CanLowerReturn", "(", "CallingConv", "::", "ID", "CallConv", ",", "MachineFunction", "&", "MF", ",", "bool", "IsVarArg", ",", "const", "SmallVectorImpl", "<", "ISD", "::", "OutputArg", ">", "&", "Outs", ",", "LLVMContext", "&", "Context", ")", "const", "{", "SmallVector", "<", "CCValAssign", ",", "16", ">", "RVLocs", ";", "CCState", "CCInfo", "(", "CallConv", ",", "IsVarArg", ",", "MF", ",", "RVLocs", ",", "Context", ")", ";", "Optional", "<", "unsigned", ">", "FirstMaskArgument", ";", "if", "(", "Subtarget", ".", "hasStdExtV", "(", ")", ")", "FirstMaskArgument", "=", "preAssignMask", "(", "Outs", ")", ";", "for", "(", "unsigned", "i", "=", "0", ",", "e", "=", "Outs", ".", "size", "(", ")", ";", "i", "!=", "e", ";", "++", "i", ")", "{", "MVT", "VT", "=", "Outs", "[", "i", "]", ".", "VT", ";", "ISD", "::", "ArgFlagsTy", "ArgFlags", "=", "Outs", "[", "i", "]", ".", "Flags", ";", "RISCVABI", "::", "ABI", "ABI", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "getTargetABI", "(", ")", ";", "if", "(", "CC_RISCV", "(", "MF", ".", "getDataLayout", "(", ")", ",", "ABI", ",", "i", ",", "VT", ",", "VT", ",", "CCValAssign", "::", "Full", ",", "ArgFlags", ",", "CCInfo", ",", "true", ",", "true", ",", "nullptr", ",", "*", "this", ",", "FirstMaskArgument", ")", ")", "return", "false", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["This", "hook", "should", "be", "implemented", "to", "check", "whether", "the", "return", "values", "described", "by", "the", "Outs", "array", "can", "fit", "into", "the", "return", "registers", "."], "TS_V_token": ["RI5CY", "RISCV", "ISD::OutputArg", "16", "0", "ISD::ArgFlagsTy", "RISCVABI::ABI", "RISCV", "RISCV"], "File": "RISCVISelLowering", "Func": "CanLowerReturn", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 111, "Length": 185, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVTargetLowering", "::", "computeKnownBitsForTargetNode", "(", "const", "SDValue", "Op", ",", "KnownBits", "&", "Known", ",", "const", "APInt", "&", "DemandedElts", ",", "const", "SelectionDAG", "&", "DAG", ",", "unsigned", "Depth", ")", "const", "{", "unsigned", "BitWidth", "=", "Known", ".", "getBitWidth", "(", ")", ";", "unsigned", "Opc", "=", "Op", ".", "getOpcode", "(", ")", ";", "assert", "(", "(", "Opc", ">=", "ISD", "::", "BUILTIN_OP_END", "||", "Opc", "==", "ISD", "::", "INTRINSIC_WO_CHAIN", "||", "Opc", "==", "ISD", "::", "INTRINSIC_W_CHAIN", "||", "Opc", "==", "ISD", "::", "INTRINSIC_VOID", ")", "&&", "\"Should use MaskedValueIsZero if you don't know whether Op\"", "\" is a target node!\"", ")", ";", "Known", ".", "resetAll", "(", ")", ";", "switch", "(", "Opc", ")", "{", "default", ":", "break", ";", "case", "RISCVISD", "::", "REMUW", ":", "{", "KnownBits", "Known2", ";", "Known", "=", "DAG", ".", "computeKnownBits", "(", "Op", ".", "getOperand", "(", "0", ")", ",", "DemandedElts", ",", "Depth", "+", "1", ")", ";", "Known2", "=", "DAG", ".", "computeKnownBits", "(", "Op", ".", "getOperand", "(", "1", ")", ",", "DemandedElts", ",", "Depth", "+", "1", ")", ";", "Known", "=", "KnownBits", "::", "urem", "(", "Known", ".", "trunc", "(", "32", ")", ",", "Known2", ".", "trunc", "(", "32", ")", ")", ";", "Known", "=", "Known", ".", "sext", "(", "BitWidth", ")", ";", "break", ";", "}", "case", "RISCVISD", "::", "DIVUW", ":", "{", "KnownBits", "Known2", ";", "Known", "=", "DAG", ".", "computeKnownBits", "(", "Op", ".", "getOperand", "(", "0", ")", ",", "DemandedElts", ",", "Depth", "+", "1", ")", ";", "Known2", "=", "DAG", ".", "computeKnownBits", "(", "Op", ".", "getOperand", "(", "1", ")", ",", "DemandedElts", ",", "Depth", "+", "1", ")", ";", "Known", "=", "KnownBits", "::", "udiv", "(", "Known", ".", "trunc", "(", "32", ")", ",", "Known2", ".", "trunc", "(", "32", ")", ")", ";", "Known", "=", "Known", ".", "sext", "(", "BitWidth", ")", ";", "break", ";", "}", "case", "RISCVISD", "::", "READ_VLENB", ":", "Known", ".", "Zero", ".", "setLowBits", "(", "3", ")", ";", "break", ";", "}", "}", ""], "natrual_language": ["Determine", "which", "of", "the", "bits", "specified", "in", "Mask", "are", "known", "to", "be", "either", "zero", "or", "one", "and", "return", "them", "in", "the", "KnownZero/KnownOne", "bitsets", "."], "TS_V_token": ["RI5CY", "RISCV", "ISD::BUILTIN_OP_END", "ISD::INTRINSIC_WO_CHAIN", "ISD::INTRINSIC_W_CHAIN", "ISD::INTRINSIC_VOID", "\"Should use MaskedValueIsZero if you don't know whether Op\"", "\" is a target node!\"", "RISCVISD::REMUW", "0", "1", "1", "1", "32", "32", "RISCVISD::DIVUW", "0", "1", "1", "1", "32", "32", "RISCVISD::READ_VLENB", "3"], "File": "RISCVISelLowering", "Func": "computeKnownBitsForTargetNode", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 112, "Length": 275, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVTargetLowering", "::", "ComputeNumSignBitsForTargetNode", "(", "SDValue", "Op", ",", "const", "APInt", "&", "DemandedElts", ",", "const", "SelectionDAG", "&", "DAG", ",", "unsigned", "Depth", ")", "const", "{", "switch", "(", "Op", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "break", ";", "case", "RISCVISD", "::", "SLLW", ":", "case", "RISCVISD", "::", "SRAW", ":", "case", "RISCVISD", "::", "SRLW", ":", "case", "RISCVISD", "::", "DIVW", ":", "case", "RISCVISD", "::", "DIVUW", ":", "case", "RISCVISD", "::", "REMUW", ":", "case", "RISCVISD", "::", "ROLW", ":", "case", "RISCVISD", "::", "RORW", ":", "case", "RISCVISD", "::", "GREVIW", ":", "case", "RISCVISD", "::", "GORCIW", ":", "case", "RISCVISD", "::", "FSLW", ":", "case", "RISCVISD", "::", "FSRW", ":", "return", "33", ";", "case", "RISCVISD", "::", "VMV_X_S", ":", "if", "(", "Op", ".", "getOperand", "(", "0", ")", ".", "getScalarValueSizeInBits", "(", ")", ">", "Subtarget", ".", "getXLen", "(", ")", ")", "return", "1", ";", "return", "Subtarget", ".", "getXLen", "(", ")", "-", "Op", ".", "getOperand", "(", "0", ")", ".", "getScalarValueSizeInBits", "(", ")", "+", "1", ";", "}", "return", "1", ";", "}", ""], "natrual_language": ["Determine", "the", "number", "of", "bits", "in", "the", "operation", "that", "are", "sign", "bits", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCVISD::SLLW", "RISCVISD::SRAW", "RISCVISD::SRLW", "RISCVISD::DIVW", "RISCVISD::DIVUW", "RISCVISD::REMUW", "RISCVISD::ROLW", "RISCVISD::RORW", "RISCVISD::GREVIW", "RISCVISD::GORCIW", "RISCVISD::FSLW", "RISCVISD::FSRW", "33", "RISCVISD::VMV_X_S", "0", "1", "0", "1", "1"], "File": "RISCVISelLowering", "Func": "ComputeNumSignBitsForTargetNode", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 113, "Length": 151, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "convertSelectOfConstantsToMath", "(", "EVT", "VT", ")", "const", "override", "{", "return", "true", ";", "}", ""], "natrual_language": ["Return", "true", "if", "a", "select", "of", "constants", "(", "select", "Cond", ",", "C1", ",", "C2", ")", "should", "be", "transformed", "into", "simple", "math", "ops", "with", "the", "condition", "value", "."], "TS_V_token": ["RI5CY"], "File": "RISCVISelLowering", "Func": "convertSelectOfConstantsToMath", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 114, "Length": 13, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "convertSetCCLogicToBitwiseLogic", "(", "EVT", "VT", ")", "const", "override", "{", "return", "VT", ".", "isScalarInteger", "(", ")", ";", "}", ""], "natrual_language": ["Use", "bitwise", "logic", "to", "make", "pairs", "of", "compares", "more", "efficient", "."], "TS_V_token": ["RI5CY"], "File": "RISCVISelLowering", "Func": "convertSetCCLogicToBitwiseLogic", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 115, "Length": 17, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "decomposeMulByConstant", "(", "LLVMContext", "&", "Context", ",", "EVT", "VT", ",", "SDValue", "C", ")", "const", "{", "if", "(", "VT", ".", "isScalarInteger", "(", ")", ")", "{", "if", "(", "Subtarget", ".", "hasStdExtM", "(", ")", "&&", "VT", ".", "getSizeInBits", "(", ")", ">", "Subtarget", ".", "getXLen", "(", ")", ")", "return", "false", ";", "if", "(", "auto", "*", "ConstNode", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "C", ".", "getNode", "(", ")", ")", ")", "{", "const", "APInt", "&", "Imm", "=", "ConstNode", "->", "getAPIntValue", "(", ")", ";", "if", "(", "(", "Imm", "+", "1", ")", ".", "isPowerOf2", "(", ")", "||", "(", "Imm", "-", "1", ")", ".", "isPowerOf2", "(", ")", "||", "(", "1", "-", "Imm", ")", ".", "isPowerOf2", "(", ")", "||", "(", "-", "1", "-", "Imm", ")", ".", "isPowerOf2", "(", ")", ")", "return", "true", ";", "if", "(", "Subtarget", ".", "hasStdExtM", "(", ")", "&&", "VT", ".", "getSizeInBits", "(", ")", ">=", "Subtarget", ".", "getXLen", "(", ")", ")", "return", "false", ";", "if", "(", "!", "Imm", ".", "isSignedIntN", "(", "12", ")", "&&", "Imm", ".", "countTrailingZeros", "(", ")", "<", "12", ")", "{", "APInt", "ImmS", "=", "Imm", ".", "ashr", "(", "Imm", ".", "countTrailingZeros", "(", ")", ")", ";", "if", "(", "(", "ImmS", "+", "1", ")", ".", "isPowerOf2", "(", ")", "||", "(", "ImmS", "-", "1", ")", ".", "isPowerOf2", "(", ")", "||", "(", "1", "-", "ImmS", ")", ".", "isPowerOf2", "(", ")", ")", "return", "true", ";", "}", "}", "}", "return", "false", ";", "}", ""], "natrual_language": ["Return", "true", "if", "it", "is", "profitable", "to", "transform", "an", "integer", "multiplication-by-constant", "into", "simpler", "operations", "like", "shifts", "and", "adds", "."], "TS_V_token": ["RI5CY", "RISCV", "1", "1", "1", "1", "12", "12", "1", "1", "1"], "File": "RISCVISelLowering", "Func": "decomposeMulByConstant", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 116, "Length": 223, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MachineBasicBlock", "*", "RISCVTargetLowering", "::", "EmitInstrWithCustomInserter", "(", "MachineInstr", "&", "MI", ",", "MachineBasicBlock", "*", "BB", ")", "const", "{", "uint64_t", "TSFlags", "=", "MI", ".", "getDesc", "(", ")", ".", "TSFlags", ";", "if", "(", "TSFlags", "&", "RISCVII", "::", "HasSEWOpMask", ")", "{", "unsigned", "NumOperands", "=", "MI", ".", "getNumExplicitOperands", "(", ")", ";", "int", "VLIndex", "=", "(", "TSFlags", "&", "RISCVII", "::", "HasVLOpMask", ")", "?", "NumOperands", "-", "2", ":", "-", "1", ";", "unsigned", "SEWIndex", "=", "NumOperands", "-", "1", ";", "bool", "WritesElement0", "=", "TSFlags", "&", "RISCVII", "::", "WritesElement0Mask", ";", "RISCVVLMUL", "VLMul", "=", "static_cast", "<", "RISCVVLMUL", ">", "(", "(", "TSFlags", "&", "RISCVII", "::", "VLMulMask", ")", ">>", "RISCVII", "::", "VLMulShift", ")", ";", "return", "addVSetVL", "(", "MI", ",", "BB", ",", "VLIndex", ",", "SEWIndex", ",", "VLMul", ",", "WritesElement0", ")", ";", "}", "switch", "(", "MI", ".", "getOpcode", "(", ")", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unexpected instr type to insert\"", ")", ";", "case", "RISCV", "::", "ReadCycleWide", ":", "assert", "(", "!", "Subtarget", ".", "is64Bit", "(", ")", "&&", "\"ReadCycleWrite is only to be used on riscv32\"", ")", ";", "return", "emitReadCycleWidePseudo", "(", "MI", ",", "BB", ")", ";", "case", "RISCV", "::", "Select_GPR_Using_CC_GPR", ":", "case", "RISCV", "::", "Select_FPR16_Using_CC_GPR", ":", "case", "RISCV", "::", "Select_FPR32_Using_CC_GPR", ":", "case", "RISCV", "::", "Select_FPR64_Using_CC_GPR", ":", "return", "emitSelectPseudo", "(", "MI", ",", "BB", ")", ";", "case", "RISCV", "::", "BuildPairF64Pseudo", ":", "return", "emitBuildPairF64Pseudo", "(", "MI", ",", "BB", ")", ";", "case", "RISCV", "::", "SplitF64Pseudo", ":", "return", "emitSplitF64Pseudo", "(", "MI", ",", "BB", ")", ";", "}", "}", ""], "natrual_language": ["This", "method", "should", "be", "implemented", "by", "targets", "that", "mark", "instructions", "with", "the", "'usesCustomInserter", "'", "flag", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCVII::HasSEWOpMask", "RISCVII::HasVLOpMask", "2", "1", "1", "RISCVII::WritesElement0Mask", "RISCV", "RISCV", "RISCVII::VLMulMask", "RISCVII::VLMulShift", "\"Unexpected instr type to insert\"", "RISCV::ReadCycleWide", "\"ReadCycleWrite is only to be used on riscv32\"", "RISCV::Select_GPR_Using_CC_GPR", "RISCV::Select_FPR16_Using_CC_GPR", "RISCV::Select_FPR32_Using_CC_GPR", "RISCV::Select_FPR64_Using_CC_GPR", "RISCV::BuildPairF64Pseudo", "RISCV::SplitF64Pseudo"], "File": "RISCVISelLowering", "Func": "EmitInstrWithCustomInserter", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 117, "Length": 214, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Instruction", "*", "RISCVTargetLowering", "::", "emitLeadingFence", "(", "IRBuilder", "<", ">", "&", "Builder", ",", "Instruction", "*", "Inst", ",", "AtomicOrdering", "Ord", ")", "const", "{", "if", "(", "isa", "<", "LoadInst", ">", "(", "Inst", ")", "&&", "Ord", "==", "AtomicOrdering", "::", "SequentiallyConsistent", ")", "return", "Builder", ".", "CreateFence", "(", "Ord", ")", ";", "if", "(", "isa", "<", "StoreInst", ">", "(", "Inst", ")", "&&", "isReleaseOrStronger", "(", "Ord", ")", ")", "return", "Builder", ".", "CreateFence", "(", "AtomicOrdering", "::", "Release", ")", ";", "return", "nullptr", ";", "}", ""], "natrual_language": ["Custom", "Lower", "{", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "emitLeadingFence", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 118, "Length": 74, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Value", "*", "RISCVTargetLowering", "::", "emitMaskedAtomicCmpXchgIntrinsic", "(", "IRBuilder", "<", ">", "&", "Builder", ",", "AtomicCmpXchgInst", "*", "CI", ",", "Value", "*", "AlignedAddr", ",", "Value", "*", "CmpVal", ",", "Value", "*", "NewVal", ",", "Value", "*", "Mask", ",", "AtomicOrdering", "Ord", ")", "const", "{", "unsigned", "XLen", "=", "Subtarget", ".", "getXLen", "(", ")", ";", "Value", "*", "Ordering", "=", "Builder", ".", "getIntN", "(", "XLen", ",", "static_cast", "<", "uint64_t", ">", "(", "Ord", ")", ")", ";", "Intrinsic", "::", "ID", "CmpXchgIntrID", "=", "Intrinsic", "::", "riscv_masked_cmpxchg_i32", ";", "if", "(", "XLen", "==", "64", ")", "{", "CmpVal", "=", "Builder", ".", "CreateSExt", "(", "CmpVal", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "NewVal", "=", "Builder", ".", "CreateSExt", "(", "NewVal", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "Mask", "=", "Builder", ".", "CreateSExt", "(", "Mask", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "CmpXchgIntrID", "=", "Intrinsic", "::", "riscv_masked_cmpxchg_i64", ";", "}", "Type", "*", "Tys", "[", "]", "=", "{", "AlignedAddr", "->", "getType", "(", ")", "}", ";", "Function", "*", "MaskedCmpXchg", "=", "Intrinsic", "::", "getDeclaration", "(", "CI", "->", "getModule", "(", ")", ",", "CmpXchgIntrID", ",", "Tys", ")", ";", "Value", "*", "Result", "=", "Builder", ".", "CreateCall", "(", "MaskedCmpXchg", ",", "{", "AlignedAddr", ",", "CmpVal", ",", "NewVal", ",", "Mask", ",", "Ordering", "}", ")", ";", "if", "(", "XLen", "==", "64", ")", "Result", "=", "Builder", ".", "CreateTrunc", "(", "Result", ",", "Builder", ".", "getInt32Ty", "(", ")", ")", ";", "return", "Result", ";", "}", ""], "natrual_language": ["Perform", "a", "masked", "cmpxchg", "using", "a", "target-specific", "intrinsic", "."], "TS_V_token": ["RI5CY", "RISCV", "Intrinsic::ID", "Intrinsic::riscv_masked_cmpxchg_i32", "64", "Intrinsic::riscv_masked_cmpxchg_i64", "Intrinsic::getDeclaration", "64"], "File": "RISCVISelLowering", "Func": "emitMaskedAtomicCmpXchgIntrinsic", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 119, "Length": 214, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Value", "*", "RISCVTargetLowering", "::", "emitMaskedAtomicRMWIntrinsic", "(", "IRBuilder", "<", ">", "&", "Builder", ",", "AtomicRMWInst", "*", "AI", ",", "Value", "*", "AlignedAddr", ",", "Value", "*", "Incr", ",", "Value", "*", "Mask", ",", "Value", "*", "ShiftAmt", ",", "AtomicOrdering", "Ord", ")", "const", "{", "unsigned", "XLen", "=", "Subtarget", ".", "getXLen", "(", ")", ";", "Value", "*", "Ordering", "=", "Builder", ".", "getIntN", "(", "XLen", ",", "static_cast", "<", "uint64_t", ">", "(", "AI", "->", "getOrdering", "(", ")", ")", ")", ";", "Type", "*", "Tys", "[", "]", "=", "{", "AlignedAddr", "->", "getType", "(", ")", "}", ";", "Function", "*", "LrwOpScwLoop", "=", "Intrinsic", "::", "getDeclaration", "(", "AI", "->", "getModule", "(", ")", ",", "getIntrinsicForMaskedAtomicRMWBinOp", "(", "XLen", ",", "AI", "->", "getOperation", "(", ")", ")", ",", "Tys", ")", ";", "if", "(", "XLen", "==", "64", ")", "{", "Incr", "=", "Builder", ".", "CreateSExt", "(", "Incr", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "Mask", "=", "Builder", ".", "CreateSExt", "(", "Mask", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "ShiftAmt", "=", "Builder", ".", "CreateSExt", "(", "ShiftAmt", ",", "Builder", ".", "getInt64Ty", "(", ")", ")", ";", "}", "Value", "*", "Result", ";", "if", "(", "AI", "->", "getOperation", "(", ")", "==", "AtomicRMWInst", "::", "Min", "||", "AI", "->", "getOperation", "(", ")", "==", "AtomicRMWInst", "::", "Max", ")", "{", "const", "DataLayout", "&", "DL", "=", "AI", "->", "getModule", "(", ")", "->", "getDataLayout", "(", ")", ";", "unsigned", "ValWidth", "=", "DL", ".", "getTypeStoreSizeInBits", "(", "AI", "->", "getValOperand", "(", ")", "->", "getType", "(", ")", ")", ";", "Value", "*", "SextShamt", "=", "Builder", ".", "CreateSub", "(", "Builder", ".", "getIntN", "(", "XLen", ",", "XLen", "-", "ValWidth", ")", ",", "ShiftAmt", ")", ";", "Result", "=", "Builder", ".", "CreateCall", "(", "LrwOpScwLoop", ",", "{", "AlignedAddr", ",", "Incr", ",", "Mask", ",", "SextShamt", ",", "Ordering", "}", ")", ";", "}", "else", "{", "Result", "=", "Builder", ".", "CreateCall", "(", "LrwOpScwLoop", ",", "{", "AlignedAddr", ",", "Incr", ",", "Mask", ",", "Ordering", "}", ")", ";", "}", "if", "(", "XLen", "==", "64", ")", "Result", "=", "Builder", ".", "CreateTrunc", "(", "Result", ",", "Builder", ".", "getInt32Ty", "(", ")", ")", ";", "return", "Result", ";", "}", ""], "natrual_language": ["Perform", "a", "masked", "atomicrmw", "using", "a", "target-specific", "intrinsic", "."], "TS_V_token": ["RI5CY", "RISCV", "Intrinsic::getDeclaration", "64", "64"], "File": "RISCVISelLowering", "Func": "emitMaskedAtomicRMWIntrinsic", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 120, "Length": 315, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "SDValue", "RISCVTargetLowering", "::", "getAddr", "(", "NodeTy", "*", "N", ",", "SelectionDAG", "&", "DAG", ",", "bool", "IsLocal", ")", "const", "{", "SDLoc", "DL", "(", "N", ")", ";", "EVT", "Ty", "=", "getPointerTy", "(", "DAG", ".", "getDataLayout", "(", ")", ")", ";", "if", "(", "isPositionIndependent", "(", ")", ")", "{", "SDValue", "Addr", "=", "getTargetNode", "(", "N", ",", "DL", ",", "Ty", ",", "DAG", ",", "0", ")", ";", "if", "(", "IsLocal", ")", "return", "SDValue", "(", "DAG", ".", "getMachineNode", "(", "RISCV", "::", "PseudoLLA", ",", "DL", ",", "Ty", ",", "Addr", ")", ",", "0", ")", ";", "return", "SDValue", "(", "DAG", ".", "getMachineNode", "(", "RISCV", "::", "PseudoLA", ",", "DL", ",", "Ty", ",", "Addr", ")", ",", "0", ")", ";", "}", "switch", "(", "getTargetMachine", "(", ")", ".", "getCodeModel", "(", ")", ")", "{", "default", ":", "report_fatal_error", "(", "\"Unsupported code model for lowering\"", ")", ";", "case", "CodeModel", "::", "Small", ":", "{", "SDValue", "AddrHi", "=", "getTargetNode", "(", "N", ",", "DL", ",", "Ty", ",", "DAG", ",", "RISCVII", "::", "MO_HI", ")", ";", "SDValue", "AddrLo", "=", "getTargetNode", "(", "N", ",", "DL", ",", "Ty", ",", "DAG", ",", "RISCVII", "::", "MO_LO", ")", ";", "SDValue", "MNHi", "=", "SDValue", "(", "DAG", ".", "getMachineNode", "(", "RISCV", "::", "LUI", ",", "DL", ",", "Ty", ",", "AddrHi", ")", ",", "0", ")", ";", "return", "SDValue", "(", "DAG", ".", "getMachineNode", "(", "RISCV", "::", "ADDI", ",", "DL", ",", "Ty", ",", "MNHi", ",", "AddrLo", ")", ",", "0", ")", ";", "}", "case", "CodeModel", "::", "Medium", ":", "{", "SDValue", "Addr", "=", "getTargetNode", "(", "N", ",", "DL", ",", "Ty", ",", "DAG", ",", "0", ")", ";", "return", "SDValue", "(", "DAG", ".", "getMachineNode", "(", "RISCV", "::", "PseudoLLA", ",", "DL", ",", "Ty", ",", "Addr", ")", ",", "0", ")", ";", "}", "}", "}", ""], "natrual_language": ["Return", "the", "address", "accessed", "by", "this", "recipe", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "RISCV::PseudoLLA", "0", "RISCV::PseudoLA", "0", "\"Unsupported code model for lowering\"", "RISCVII::MO_HI", "RISCVII::MO_LO", "RISCV::LUI", "0", "RISCV::ADDI", "0", "0", "RISCV::PseudoLLA", "0"], "File": "RISCVISelLowering", "Func": "getAddr", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 121, "Length": 259, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "RISCVTargetLowering", "::", "ConstraintType", "RISCVTargetLowering", "::", "getConstraintType", "(", "StringRef", "Constraint", ")", "const", "{", "if", "(", "Constraint", ".", "size", "(", ")", "==", "1", ")", "{", "switch", "(", "Constraint", "[", "0", "]", ")", "{", "default", ":", "break", ";", "case", "'f'", ":", "return", "C_RegisterClass", ";", "case", "'I'", ":", "case", "'J'", ":", "case", "'K'", ":", "return", "C_Immediate", ";", "case", "'A'", ":", "return", "C_Memory", ";", "}", "}", "return", "TargetLowering", "::", "getConstraintType", "(", "Constraint", ")", ";", "}", ""], "natrual_language": ["Given", "a", "constraint", "letter", ",", "return", "the", "type", "of", "constraint", "for", "this", "target", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "1", "0"], "File": "RISCVISelLowering", "Func": "getConstraintType", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 122, "Length": 70, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Register", "RISCVTargetLowering", "::", "getExceptionPointerRegister", "(", "const", "Constant", "*", "PersonalityFn", ")", "const", "{", "return", "RISCV", "::", "X10", ";", "}", ""], "natrual_language": ["If", "a", "physical", "register", ",", "this", "returns", "the", "register", "that", "receives", "the", "exception", "address", "on", "entry", "to", "an", "EH", "pad", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X10"], "File": "RISCVISelLowering", "Func": "getExceptionPointerRegister", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 123, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Register", "RISCVTargetLowering", "::", "getExceptionSelectorRegister", "(", "const", "Constant", "*", "PersonalityFn", ")", "const", "{", "return", "RISCV", "::", "X11", ";", "}", ""], "natrual_language": ["If", "a", "physical", "register", ",", "this", "returns", "the", "register", "that", "receives", "the", "exception", "typeid", "on", "entry", "to", "a", "landing", "pad", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X11"], "File": "RISCVISelLowering", "Func": "getExceptionSelectorRegister", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 124, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "ISD", "::", "NodeType", "getExtendForAtomicCmpSwapArg", "(", ")", "const", "override", "{", "return", "ISD", "::", "SIGN_EXTEND", ";", "}", ""], "natrual_language": ["Returns", "how", "the", "platform", "'s", "atomic", "compare", "and", "swap", "expects", "its", "comparison", "value", "to", "be", "extended", "(", "ZERO_EXTEND", ",", "SIGN_EXTEND", ",", "or", "ANY_EXTEND", ")", "."], "TS_V_token": ["RI5CY", "ISD::NodeType", "ISD::SIGN_EXTEND"], "File": "RISCVISelLowering", "Func": "getExtendForAtomicCmpSwapArg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 125, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "ISD", "::", "NodeType", "getExtendForAtomicOps", "(", ")", "const", "override", "{", "return", "ISD", "::", "SIGN_EXTEND", ";", "}", ""], "natrual_language": ["Returns", "how", "the", "platform", "'s", "atomic", "operations", "are", "extended", "(", "ZERO_EXTEND", ",", "SIGN_EXTEND", ",", "or", "ANY_EXTEND", ")", "."], "TS_V_token": ["RI5CY", "ISD::NodeType", "ISD::SIGN_EXTEND"], "File": "RISCVISelLowering", "Func": "getExtendForAtomicOps", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 126, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MVT", "RISCVTargetLowering", "::", "getPointerMemTy", "(", "const", "DataLayout", "&", "DL", ",", "uint32_t", "AS", ")", "const", "{", "if", "(", "AS", "==", "UINT32_MAX", ")", "{", "AS", "=", "0", ";", "}", "return", "MVT", "::", "getIntegerVT", "(", "DL", ".", "getPointerSizeInBits", "(", "AS", ")", ")", ";", "}", ""], "natrual_language": ["Return", "the", "in-memory", "pointer", "type", "for", "the", "given", "address", "space", ",", "defaults", "to", "the", "pointer", "type", "from", "the", "data", "layout", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "MVT::getIntegerVT"], "File": "RISCVISelLowering", "Func": "getPointerMemTy", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 127, "Length": 41, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MVT", "RISCVTargetLowering", "::", "getPointerTy", "(", "const", "DataLayout", "&", "DL", ",", "uint32_t", "AS", ")", "const", "{", "if", "(", "AS", "==", "UINT32_MAX", ")", "{", "AS", "=", "0", ";", "}", "return", "MVT", "::", "getIntegerVT", "(", "DL", ".", "getPointerSizeInBits", "(", "AS", ")", ")", ";", "}", ""], "natrual_language": ["Return", "the", "pointer", "type", "for", "the", "given", "address", "space", ",", "defaults", "to", "the", "pointer", "type", "from", "the", "data", "layout", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "MVT::getIntegerVT"], "File": "RISCVISelLowering", "Func": "getPointerTy", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 128, "Length": 41, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "getPostIndexedAddressParts", "(", "SDNode", "*", "N", ",", "SDNode", "*", "Op", ",", "SDValue", "&", "Base", ",", "SDValue", "&", "Offset", ",", "ISD", "::", "MemIndexedMode", "&", "AM", ",", "SelectionDAG", "&", "DAG", ")", "const", "{", "SDValue", "BaseFromLDST", ";", "EVT", "VT", ";", "if", "(", "LoadSDNode", "*", "LD", "=", "dyn_cast", "<", "LoadSDNode", ">", "(", "N", ")", ")", "{", "BaseFromLDST", "=", "LD", "->", "getBasePtr", "(", ")", ";", "VT", "=", "LD", "->", "getMemoryVT", "(", ")", ";", "}", "else", "if", "(", "StoreSDNode", "*", "ST", "=", "dyn_cast", "<", "StoreSDNode", ">", "(", "N", ")", ")", "{", "BaseFromLDST", "=", "ST", "->", "getBasePtr", "(", ")", ";", "VT", "=", "ST", "->", "getMemoryVT", "(", ")", ";", "}", "else", "{", "return", "false", ";", "}", "if", "(", "Op", "->", "getOpcode", "(", ")", "==", "ISD", "::", "ADD", ")", "{", "AM", "=", "ISD", "::", "POST_INC", ";", "Base", "=", "Op", "->", "getOperand", "(", "0", ")", ";", "Offset", "=", "Op", "->", "getOperand", "(", "1", ")", ";", "if", "(", "BaseFromLDST", "!=", "Base", "&&", "BaseFromLDST", "==", "Offset", ")", "{", "std", "::", "swap", "(", "Base", ",", "Offset", ")", ";", "}", "if", "(", "!", "(", "VT", "==", "MVT", "::", "i8", "||", "VT", "==", "MVT", "::", "i16", "||", "VT", "==", "MVT", "::", "i32", ")", ")", "{", "return", "false", ";", "}", "if", "(", "ConstantSDNode", "*", "ConstOffset", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "Offset", ")", ")", "{", "uint64_t", "imm", "=", "ConstOffset", "->", "getZExtValue", "(", ")", ";", "if", "(", "!", "isInt", "<", "12", ">", "(", "imm", ")", ")", "{", "return", "false", ";", "}", "}", "return", "BaseFromLDST", "==", "Base", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["Returns", "true", "by", "value", ",", "base", "pointer", "and", "offset", "pointer", "and", "addressing", "mode", "by", "reference", "if", "this", "node", "can", "be", "combined", "with", "a", "load", "/", "store", "to", "form", "a", "post-indexed", "load", "/", "store", "."], "TS_V_token": ["RI5CY", "RISCV", "ISD::MemIndexedMode", "ISD::ADD", "ISD::POST_INC", "0", "1", "MVT::i8", "MVT::i16", "MVT::i32", "12"], "File": "RISCVISelLowering", "Func": "getPostIndexedAddressParts", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 129, "Length": 247, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Register", "RISCVTargetLowering", "::", "getRegisterByName", "(", "const", "char", "*", "RegName", ",", "LLT", "VT", ",", "const", "MachineFunction", "&", "MF", ")", "const", "{", "Register", "Reg", "=", "MatchRegisterAltName", "(", "RegName", ")", ";", "if", "(", "Reg", "==", "RISCV", "::", "NoRegister", ")", "Reg", "=", "MatchRegisterName", "(", "RegName", ")", ";", "if", "(", "Reg", "==", "RISCV", "::", "NoRegister", ")", "report_fatal_error", "(", "Twine", "(", "\"Invalid register name \\\"\"", "+", "StringRef", "(", "RegName", ")", "+", "\"\\\".\"", ")", ")", ";", "BitVector", "ReservedRegs", "=", "Subtarget", ".", "getRegisterInfo", "(", ")", "->", "getReservedRegs", "(", "MF", ")", ";", "if", "(", "!", "ReservedRegs", ".", "test", "(", "Reg", ")", "&&", "!", "Subtarget", ".", "isRegisterReservedByUser", "(", "Reg", ")", ")", "report_fatal_error", "(", "Twine", "(", "\"Trying to obtain non-reserved register \\\"\"", "+", "StringRef", "(", "RegName", ")", "+", "\"\\\".\"", ")", ")", ";", "return", "Reg", ";", "}", ""], "natrual_language": ["Return", "the", "register", "ID", "of", "the", "name", "passed", "in", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::NoRegister", "RISCV::NoRegister", "\"Invalid register name \\\"\"", "\"\\\".\"", "\"Trying to obtain non-reserved register \\\"\"", "\"\\\".\""], "File": "RISCVISelLowering", "Func": "getRegisterByName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 130, "Length": 117, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MVT", "RISCVTargetLowering", "::", "getScalarShiftAmountTy", "(", "const", "DataLayout", "&", "DL", ",", "EVT", ")", "const", "{", "return", "Subtarget", ".", "getXLenVT", "(", ")", ";", "}", ""], "natrual_language": ["Return", "the", "type", "to", "use", "for", "a", "scalar", "shift", "opcode", ",", "given", "the", "shifted", "amount", "type", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "getScalarShiftAmountTy", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 131, "Length": 22, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "EVT", "RISCVTargetLowering", "::", "getSetCCResultType", "(", "const", "DataLayout", "&", "DL", ",", "LLVMContext", "&", ",", "EVT", "VT", ")", "const", "{", "if", "(", "!", "VT", ".", "isVector", "(", ")", ")", "return", "getPointerTy", "(", "DL", ")", ";", "if", "(", "Subtarget", ".", "hasStdExtV", "(", ")", ")", "return", "MVT", "::", "getVectorVT", "(", "MVT", "::", "i1", ",", "VT", ".", "getVectorElementCount", "(", ")", ")", ";", "return", "VT", ".", "changeVectorElementTypeToInteger", "(", ")", ";", "}", ""], "natrual_language": ["Return", "the", "value", "type", "to", "use", "for", "ISD", ":", ":SETCC", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::getVectorVT", "MVT::i1"], "File": "RISCVISelLowering", "Func": "getSetCCResultType", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 132, "Length": 65, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVSubtarget", "&", "getSubtarget", "(", ")", "const", "{", "return", "Subtarget", ";", "}", ""], "natrual_language": ["getSubtarget", "-", "Return", "the", "subtarget", "for", "which", "this", "machine", "code", "is", "being", "compiled", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "getSubtarget", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 133, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "static", "SDValue", "getTargetNode", "(", "JumpTableSDNode", "*", "N", ",", "SDLoc", "DL", ",", "EVT", "Ty", ",", "SelectionDAG", "&", "DAG", ",", "unsigned", "Flags", ")", "{", "return", "DAG", ".", "getTargetJumpTable", "(", "N", "->", "getIndex", "(", ")", ",", "Ty", ",", "Flags", ")", ";", "}", ""], "natrual_language": ["Retrieve", "the", "target", "node", "this", "edge", "connects", "to", "."], "TS_V_token": ["RI5CY"], "File": "RISCVISelLowering", "Func": "getTargetNode", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 134, "Length": 39, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "char", "*", "RISCVTargetLowering", "::", "getTargetNodeName", "(", "unsigned", "Opcode", ")", "const", "{", "case", "RISCVISD", "::", "NODE", ":", "\\", "return", "\"RISCVISD::\"", "#", "NODE", ";", "switch", "(", "(", "RISCVISD", "::", "NodeType", ")", "Opcode", ")", "{", "case", "RISCVISD", "::", "FIRST_NUMBER", ":", "break", ";", "NODE_NAME_CASE", "(", "RET_FLAG", ")", "NODE_NAME_CASE", "(", "URET_FLAG", ")", "NODE_NAME_CASE", "(", "SRET_FLAG", ")", "NODE_NAME_CASE", "(", "MRET_FLAG", ")", "NODE_NAME_CASE", "(", "CALL", ")", "NODE_NAME_CASE", "(", "SELECT_CC", ")", "NODE_NAME_CASE", "(", "BuildPairF64", ")", "NODE_NAME_CASE", "(", "SplitF64", ")", "NODE_NAME_CASE", "(", "TAIL", ")", "NODE_NAME_CASE", "(", "SLLW", ")", "NODE_NAME_CASE", "(", "SRAW", ")", "NODE_NAME_CASE", "(", "SRLW", ")", "NODE_NAME_CASE", "(", "DIVW", ")", "NODE_NAME_CASE", "(", "DIVUW", ")", "NODE_NAME_CASE", "(", "REMUW", ")", "NODE_NAME_CASE", "(", "ROLW", ")", "NODE_NAME_CASE", "(", "RORW", ")", "NODE_NAME_CASE", "(", "FSLW", ")", "NODE_NAME_CASE", "(", "FSRW", ")", "NODE_NAME_CASE", "(", "FMV_H_X", ")", "NODE_NAME_CASE", "(", "FMV_X_ANYEXTH", ")", "NODE_NAME_CASE", "(", "FMV_W_X_RV64", ")", "NODE_NAME_CASE", "(", "FMV_X_ANYEXTW_RV64", ")", "NODE_NAME_CASE", "(", "READ_CYCLE_WIDE", ")", "NODE_NAME_CASE", "(", "GREVI", ")", "NODE_NAME_CASE", "(", "GREVIW", ")", "NODE_NAME_CASE", "(", "GORCI", ")", "NODE_NAME_CASE", "(", "GORCIW", ")", "NODE_NAME_CASE", "(", "VMV_X_S", ")", "NODE_NAME_CASE", "(", "SPLAT_VECTOR_I64", ")", "NODE_NAME_CASE", "(", "READ_VLENB", ")", "NODE_NAME_CASE", "(", "TRUNCATE_VECTOR", ")", "NODE_NAME_CASE", "(", "VLEFF", ")", "NODE_NAME_CASE", "(", "VLEFF_MASK", ")", "NODE_NAME_CASE", "(", "VLSEGFF", ")", "NODE_NAME_CASE", "(", "VLSEGFF_MASK", ")", "NODE_NAME_CASE", "(", "READ_VL", ")", "NODE_NAME_CASE", "(", "VSLIDEUP", ")", "NODE_NAME_CASE", "(", "VSLIDEDOWN", ")", "NODE_NAME_CASE", "(", "VID", ")", "}", "return", "nullptr", ";", "}", ""], "natrual_language": ["getTargetNodeName", "-", "This", "method", "returns", "the", "name", "of", "a", "target", "specific"], "TS_V_token": ["RI5CY", "RISCV", "RISCVISD::NODE", "\"RISCVISD::\"", "RISCVISD::NodeType", "RISCVISD::FIRST_NUMBER"], "File": "RISCVISelLowering", "Func": "getTargetNodeName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 135, "Length": 205, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "getTgtMemIntrinsic", "(", "IntrinsicInfo", "&", "Info", ",", "const", "CallInst", "&", "I", ",", "MachineFunction", "&", "MF", ",", "unsigned", "Intrinsic", ")", "const", "{", "switch", "(", "Intrinsic", ")", "{", "default", ":", "return", "false", ";", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_xchg_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_add_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_sub_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_nand_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_max_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_min_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_umax_i32", ":", "case", "Intrinsic", "::", "riscv_masked_atomicrmw_umin_i32", ":", "case", "Intrinsic", "::", "riscv_masked_cmpxchg_i32", ":", "PointerType", "*", "PtrTy", "=", "cast", "<", "PointerType", ">", "(", "I", ".", "getArgOperand", "(", "0", ")", "->", "getType", "(", ")", ")", ";", "Info", ".", "opc", "=", "ISD", "::", "INTRINSIC_W_CHAIN", ";", "Info", ".", "memVT", "=", "MVT", "::", "getVT", "(", "PtrTy", "->", "getElementType", "(", ")", ")", ";", "Info", ".", "ptrVal", "=", "I", ".", "getArgOperand", "(", "0", ")", ";", "Info", ".", "offset", "=", "0", ";", "Info", ".", "align", "=", "Align", "(", "4", ")", ";", "Info", ".", "flags", "=", "MachineMemOperand", "::", "MOLoad", "|", "MachineMemOperand", "::", "MOStore", "|", "MachineMemOperand", "::", "MOVolatile", ";", "return", "true", ";", "}", "}", ""], "natrual_language": ["Given", "an", "intrinsic", ",", "checks", "if", "on", "the", "target", "the", "intrinsic", "will", "need", "to", "map", "to", "a", "MemIntrinsicNode", "(", "touches", "memory", ")", "."], "TS_V_token": ["RI5CY", "RISCV", "Intrinsic::riscv_masked_atomicrmw_xchg_i32", "Intrinsic::riscv_masked_atomicrmw_add_i32", "Intrinsic::riscv_masked_atomicrmw_sub_i32", "Intrinsic::riscv_masked_atomicrmw_nand_i32", "Intrinsic::riscv_masked_atomicrmw_max_i32", "Intrinsic::riscv_masked_atomicrmw_min_i32", "Intrinsic::riscv_masked_atomicrmw_umax_i32", "Intrinsic::riscv_masked_atomicrmw_umin_i32", "Intrinsic::riscv_masked_cmpxchg_i32", "0", "ISD::INTRINSIC_W_CHAIN", "MVT::getVT", "0", "0", "4"], "File": "RISCVISelLowering", "Func": "getTgtMemIntrinsic", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 136, "Length": 169, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isCheapToSpeculateCtlz", "(", ")", "const", "{", "return", "Subtarget", ".", "hasStdExtZbb", "(", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "it", "is", "cheap", "to", "speculate", "a", "call", "to", "intrinsic", "ctlz", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "isCheapToSpeculateCtlz", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 137, "Length": 16, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isCheapToSpeculateCttz", "(", ")", "const", "{", "return", "Subtarget", ".", "hasStdExtZbb", "(", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "it", "is", "cheap", "to", "speculate", "a", "call", "to", "intrinsic", "cttz", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "isCheapToSpeculateCttz", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 138, "Length": 16, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isDesirableToCommuteWithShift", "(", "const", "SDNode", "*", "N", ",", "CombineLevel", "Level", ")", "const", "{", "SDValue", "N0", "=", "N", "->", "getOperand", "(", "0", ")", ";", "EVT", "Ty", "=", "N0", ".", "getValueType", "(", ")", ";", "if", "(", "Ty", ".", "isScalarInteger", "(", ")", "&&", "(", "N0", ".", "getOpcode", "(", ")", "==", "ISD", "::", "ADD", "||", "N0", ".", "getOpcode", "(", ")", "==", "ISD", "::", "OR", ")", ")", "{", "auto", "*", "C1", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "N0", "->", "getOperand", "(", "1", ")", ")", ";", "auto", "*", "C2", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "N", "->", "getOperand", "(", "1", ")", ")", ";", "if", "(", "C1", "&&", "C2", ")", "{", "const", "APInt", "&", "C1Int", "=", "C1", "->", "getAPIntValue", "(", ")", ";", "APInt", "ShiftedC1Int", "=", "C1Int", "<<", "C2", "->", "getAPIntValue", "(", ")", ";", "if", "(", "ShiftedC1Int", ".", "getMinSignedBits", "(", ")", "<=", "64", "&&", "isLegalAddImmediate", "(", "ShiftedC1Int", ".", "getSExtValue", "(", ")", ")", ")", "return", "true", ";", "if", "(", "C1Int", ".", "getMinSignedBits", "(", ")", "<=", "64", "&&", "isLegalAddImmediate", "(", "C1Int", ".", "getSExtValue", "(", ")", ")", ")", "return", "false", ";", "int", "C1Cost", "=", "RISCVMatInt", "::", "getIntMatCost", "(", "C1Int", ",", "Ty", ".", "getSizeInBits", "(", ")", ",", "Subtarget", ".", "is64Bit", "(", ")", ")", ";", "int", "ShiftedC1Cost", "=", "RISCVMatInt", "::", "getIntMatCost", "(", "ShiftedC1Int", ",", "Ty", ".", "getSizeInBits", "(", ")", ",", "Subtarget", ".", "is64Bit", "(", ")", ")", ";", "if", "(", "C1Cost", "<", "ShiftedC1Cost", ")", "return", "false", ";", "}", "}", "return", "true", ";", "}", ""], "natrual_language": ["Return", "true", "if", "it", "is", "profitable", "to", "move", "this", "shift", "by", "a", "constant", "amount", "through", "its", "operand", ",", "adjusting", "any", "immediate", "operands", "as", "necessary", "to", "preserve", "semantics", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "ISD::ADD", "ISD::OR", "1", "1", "64", "64", "RISCVMatInt::getIntMatCost", "RISCVMatInt::getIntMatCost"], "File": "RISCVISelLowering", "Func": "isDesirableToCommuteWithShift", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 139, "Length": 231, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isEligibleForTailCallOptimization", "(", "CCState", "&", "CCInfo", ",", "CallLoweringInfo", "&", "CLI", ",", "MachineFunction", "&", "MF", ",", "const", "SmallVector", "<", "CCValAssign", ",", "16", ">", "&", "ArgLocs", ")", "const", "{", "auto", "&", "Callee", "=", "CLI", ".", "Callee", ";", "auto", "CalleeCC", "=", "CLI", ".", "CallConv", ";", "auto", "&", "Outs", "=", "CLI", ".", "Outs", ";", "auto", "&", "Caller", "=", "MF", ".", "getFunction", "(", ")", ";", "auto", "CallerCC", "=", "Caller", ".", "getCallingConv", "(", ")", ";", "if", "(", "Caller", ".", "hasFnAttribute", "(", "\"interrupt\"", ")", ")", "return", "false", ";", "if", "(", "CCInfo", ".", "getNextStackOffset", "(", ")", "!=", "0", ")", "return", "false", ";", "for", "(", "auto", "&", "VA", ":", "ArgLocs", ")", "if", "(", "VA", ".", "getLocInfo", "(", ")", "==", "CCValAssign", "::", "Indirect", ")", "return", "false", ";", "auto", "IsCallerStructRet", "=", "Caller", ".", "hasStructRetAttr", "(", ")", ";", "auto", "IsCalleeStructRet", "=", "Outs", ".", "empty", "(", ")", "?", "false", ":", "Outs", "[", "0", "]", ".", "Flags", ".", "isSRet", "(", ")", ";", "if", "(", "IsCallerStructRet", "||", "IsCalleeStructRet", ")", "return", "false", ";", "if", "(", "GlobalAddressSDNode", "*", "G", "=", "dyn_cast", "<", "GlobalAddressSDNode", ">", "(", "Callee", ")", ")", "{", "const", "GlobalValue", "*", "GV", "=", "G", "->", "getGlobal", "(", ")", ";", "if", "(", "GV", "->", "hasExternalWeakLinkage", "(", ")", ")", "return", "false", ";", "}", "const", "RISCVRegisterInfo", "*", "TRI", "=", "Subtarget", ".", "getRegisterInfo", "(", ")", ";", "const", "uint32_t", "*", "CallerPreserved", "=", "TRI", "->", "getCallPreservedMask", "(", "MF", ",", "CallerCC", ")", ";", "if", "(", "CalleeCC", "!=", "CallerCC", ")", "{", "const", "uint32_t", "*", "CalleePreserved", "=", "TRI", "->", "getCallPreservedMask", "(", "MF", ",", "CalleeCC", ")", ";", "if", "(", "!", "TRI", "->", "regmaskSubsetEqual", "(", "CallerPreserved", ",", "CalleePreserved", ")", ")", "return", "false", ";", "}", "for", "(", "auto", "&", "Arg", ":", "Outs", ")", "if", "(", "Arg", ".", "Flags", ".", "isByVal", "(", ")", ")", "return", "false", ";", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "the", "call", "can", "be", "lowered", "as", "a", "tail", "call", "."], "TS_V_token": ["RI5CY", "RISCV", "16", "\"interrupt\"", "0", "0", "RISCV"], "File": "RISCVISelLowering", "Func": "isEligibleForTailCallOptimization", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 140, "Length": 284, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isFMAFasterThanFMulAndFAdd", "(", "const", "MachineFunction", "&", "MF", ",", "EVT", "VT", ")", "const", "{", "VT", "=", "VT", ".", "getScalarType", "(", ")", ";", "if", "(", "!", "VT", ".", "isSimple", "(", ")", ")", "return", "false", ";", "switch", "(", "VT", ".", "getSimpleVT", "(", ")", ".", "SimpleTy", ")", "{", "case", "MVT", "::", "f16", ":", "return", "Subtarget", ".", "hasStdExtZfh", "(", ")", ";", "case", "MVT", "::", "f32", ":", "return", "Subtarget", ".", "hasStdExtF", "(", ")", ";", "case", "MVT", "::", "f64", ":", "return", "Subtarget", ".", "hasStdExtD", "(", ")", ";", "default", ":", "break", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["Return", "true", "if", "an", "FMA", "operation", "is", "faster", "than", "a", "pair", "of", "fmul", "and", "fadd", "instructions", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::f16", "MVT::f32", "MVT::f64"], "File": "RISCVISelLowering", "Func": "isFMAFasterThanFMulAndFAdd", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 141, "Length": 91, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isFPImmLegal", "(", "const", "APFloat", "&", "Imm", ",", "EVT", "VT", ",", "bool", "ForCodeSize", ")", "const", "{", "if", "(", "VT", "==", "MVT", "::", "f16", "&&", "!", "Subtarget", ".", "hasStdExtZfh", "(", ")", ")", "return", "false", ";", "if", "(", "VT", "==", "MVT", "::", "f32", "&&", "!", "Subtarget", ".", "hasStdExtF", "(", ")", ")", "return", "false", ";", "if", "(", "VT", "==", "MVT", "::", "f64", "&&", "!", "Subtarget", ".", "hasStdExtD", "(", ")", ")", "return", "false", ";", "if", "(", "Imm", ".", "isNegZero", "(", ")", ")", "return", "false", ";", "return", "Imm", ".", "isZero", "(", ")", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "the", "target", "can", "instruction", "select", "the", "specified", "FP", "immediate", "natively", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::f16", "MVT::f32", "MVT::f64"], "File": "RISCVISelLowering", "Func": "isFPImmLegal", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 142, "Length": 91, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isLegalAddImmediate", "(", "int64_t", "Imm", ")", "const", "{", "return", "isInt", "<", "12", ">", "(", "Imm", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "the", "specified", "immediate", "is", "legal", "add", "immediate", ",", "that", "is", "the", "target", "has", "add", "instructions", "which", "can", "add", "a", "register", "and", "the", "immediate", "without", "having", "to", "materialize", "the", "immediate", "into", "a", "register", "."], "TS_V_token": ["RI5CY", "RISCV", "12"], "File": "RISCVISelLowering", "Func": "isLegalAddImmediate", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 143, "Length": 20, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isLegalAddressingMode", "(", "const", "DataLayout", "&", "DL", ",", "const", "AddrMode", "&", "AM", ",", "Type", "*", "Ty", ",", "unsigned", "AS", ",", "Instruction", "*", "I", ")", "const", "{", "if", "(", "AM", ".", "BaseGV", ")", "return", "false", ";", "if", "(", "!", "isInt", "<", "12", ">", "(", "AM", ".", "BaseOffs", ")", ")", "return", "false", ";", "switch", "(", "AM", ".", "Scale", ")", "{", "case", "0", ":", "break", ";", "case", "1", ":", "if", "(", "!", "AM", ".", "HasBaseReg", ")", "break", ";", "return", "false", ";", "default", ":", "return", "false", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["isLegalAddressingMode", "-", "Return", "true", "if", "the", "addressing", "mode", "represented", "by", "AM", "is", "legal", "for", "this", "target", ",", "for", "a", "load/store", "of", "the", "specified", "type", "."], "TS_V_token": ["RI5CY", "RISCV", "12", "0", "1"], "File": "RISCVISelLowering", "Func": "isLegalAddressingMode", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 144, "Length": 90, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isLegalICmpImmediate", "(", "int64_t", "Imm", ")", "const", "{", "return", "isInt", "<", "12", ">", "(", "Imm", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "the", "specified", "immediate", "is", "legal", "icmp", "immediate", ",", "that", "is", "the", "target", "has", "icmp", "instructions", "which", "can", "compare", "a", "register", "against", "the", "immediate", "without", "having", "to", "materialize", "the", "immediate", "into", "a", "register", "."], "TS_V_token": ["RI5CY", "RISCV", "12"], "File": "RISCVISelLowering", "Func": "isLegalICmpImmediate", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 145, "Length": 20, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isSExtCheaperThanZExt", "(", "EVT", "SrcVT", ",", "EVT", "DstVT", ")", "const", "{", "return", "Subtarget", ".", "is64Bit", "(", ")", "&&", "SrcVT", "==", "MVT", "::", "i32", "&&", "DstVT", "==", "MVT", "::", "i64", ";", "}", ""], "natrual_language": ["Return", "true", "if", "sign-extension", "from", "FromTy", "to", "ToTy", "is", "cheaper", "than", "zero-extension", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::i32", "MVT::i64"], "File": "RISCVISelLowering", "Func": "isSExtCheaperThanZExt", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 146, "Length": 33, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isTruncateFree", "(", "EVT", "SrcVT", ",", "EVT", "DstVT", ")", "const", "{", "if", "(", "Subtarget", ".", "is64Bit", "(", ")", "||", "SrcVT", ".", "isVector", "(", ")", "||", "DstVT", ".", "isVector", "(", ")", "||", "!", "SrcVT", ".", "isInteger", "(", ")", "||", "!", "DstVT", ".", "isInteger", "(", ")", ")", "return", "false", ";", "unsigned", "SrcBits", "=", "SrcVT", ".", "getSizeInBits", "(", ")", ";", "unsigned", "DestBits", "=", "DstVT", ".", "getSizeInBits", "(", ")", ";", "return", "(", "SrcBits", "==", "64", "&&", "DestBits", "==", "32", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "it", "'s", "free", "to", "truncate", "a", "value", "of", "type", "Ty1", "to", "type", "Ty2", "."], "TS_V_token": ["RI5CY", "RISCV", "64", "32"], "File": "RISCVISelLowering", "Func": "isTruncateFree", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 147, "Length": 80, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "isZExtFree", "(", "SDValue", "Val", ",", "EVT", "VT2", ")", "const", "{", "if", "(", "auto", "*", "LD", "=", "dyn_cast", "<", "LoadSDNode", ">", "(", "Val", ")", ")", "{", "EVT", "MemVT", "=", "LD", "->", "getMemoryVT", "(", ")", ";", "if", "(", "(", "MemVT", "==", "MVT", "::", "i8", "||", "MemVT", "==", "MVT", "::", "i16", "||", "(", "Subtarget", ".", "is64Bit", "(", ")", "&&", "MemVT", "==", "MVT", "::", "i32", ")", ")", "&&", "(", "LD", "->", "getExtensionType", "(", ")", "==", "ISD", "::", "NON_EXTLOAD", "||", "LD", "->", "getExtensionType", "(", ")", "==", "ISD", "::", "ZEXTLOAD", ")", ")", "return", "true", ";", "}", "return", "TargetLowering", "::", "isZExtFree", "(", "Val", ",", "VT2", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "zero-extending", "the", "specific", "node", "Val", "to", "type", "VT2", "is", "free", "(", "either", "because", "it", "'s", "implicitly", "zero-extended", "such", "as", "ARM", "ldrb", "/", "ldrh", "or", "because", "it", "'s", "folded", "such", "as", "X86", "zero-extending", "loads", ")", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::i8", "MVT::i16", "MVT::i32", "ISD::NON_EXTLOAD", "ISD::ZEXTLOAD"], "File": "RISCVISelLowering", "Func": "isZExtFree", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 148, "Length": 104, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVTargetLowering", "::", "LowerAsmOperandForConstraint", "(", "SDValue", "Op", ",", "std", "::", "string", "&", "Constraint", ",", "std", "::", "vector", "<", "SDValue", ">", "&", "Ops", ",", "SelectionDAG", "&", "DAG", ")", "const", "{", "if", "(", "Constraint", ".", "length", "(", ")", "==", "1", ")", "{", "switch", "(", "Constraint", "[", "0", "]", ")", "{", "case", "'I'", ":", "if", "(", "auto", "*", "C", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "Op", ")", ")", "{", "uint64_t", "CVal", "=", "C", "->", "getSExtValue", "(", ")", ";", "if", "(", "isInt", "<", "12", ">", "(", "CVal", ")", ")", "Ops", ".", "push_back", "(", "DAG", ".", "getTargetConstant", "(", "CVal", ",", "SDLoc", "(", "Op", ")", ",", "Subtarget", ".", "getXLenVT", "(", ")", ")", ")", ";", "}", "return", ";", "case", "'J'", ":", "if", "(", "auto", "*", "C", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "Op", ")", ")", "if", "(", "C", "->", "getZExtValue", "(", ")", "==", "0", ")", "Ops", ".", "push_back", "(", "DAG", ".", "getTargetConstant", "(", "0", ",", "SDLoc", "(", "Op", ")", ",", "Subtarget", ".", "getXLenVT", "(", ")", ")", ")", ";", "return", ";", "case", "'K'", ":", "if", "(", "auto", "*", "C", "=", "dyn_cast", "<", "ConstantSDNode", ">", "(", "Op", ")", ")", "{", "uint64_t", "CVal", "=", "C", "->", "getZExtValue", "(", ")", ";", "if", "(", "isUInt", "<", "5", ">", "(", "CVal", ")", ")", "Ops", ".", "push_back", "(", "DAG", ".", "getTargetConstant", "(", "CVal", ",", "SDLoc", "(", "Op", ")", ",", "Subtarget", ".", "getXLenVT", "(", ")", ")", ")", ";", "}", "return", ";", "default", ":", "break", ";", "}", "}", "TargetLowering", "::", "LowerAsmOperandForConstraint", "(", "Op", ",", "Constraint", ",", "Ops", ",", "DAG", ")", ";", "}", ""], "natrual_language": ["Lower", "the", "specified", "operand", "into", "the", "Ops", "vector", "."], "TS_V_token": ["RI5CY", "RISCV", "1", "0", "12", "0", "0", "5"], "File": "RISCVISelLowering", "Func": "LowerAsmOperandForConstraint", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 149, "Length": 246, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "mayBeEmittedAsTailCall", "(", "const", "CallInst", "*", "CI", ")", "const", "{", "return", "CI", "->", "isTailCall", "(", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "the", "target", "may", "be", "able", "emit", "the", "call", "instruction", "as", "a", "tail", "call", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVISelLowering", "Func": "mayBeEmittedAsTailCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 150, "Length": 20, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "shouldConvertConstantLoadToIntImm", "(", "const", "APInt", "&", "Imm", ",", "Type", "*", "Ty", ")", "const", "override", "{", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "it", "is", "beneficial", "to", "convert", "a", "load", "of", "a", "constant", "to", "just", "the", "constant", "itself", "."], "TS_V_token": ["RI5CY"], "File": "RISCVISelLowering", "Func": "shouldConvertConstantLoadToIntImm", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 151, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "TargetLowering", "::", "AtomicExpansionKind", "RISCVTargetLowering", "::", "shouldExpandAtomicCmpXchgInIR", "(", "AtomicCmpXchgInst", "*", "CI", ")", "const", "{", "unsigned", "Size", "=", "CI", "->", "getCompareOperand", "(", ")", "->", "getType", "(", ")", "->", "getPrimitiveSizeInBits", "(", ")", ";", "if", "(", "Size", "==", "8", "||", "Size", "==", "16", ")", "return", "AtomicExpansionKind", "::", "MaskedIntrinsic", ";", "return", "AtomicExpansionKind", "::", "None", ";", "}", ""], "natrual_language": ["Returns", "how", "the", "given", "atomic", "cmpxchg", "should", "be", "expanded", "by", "the", "IR-level", "AtomicExpand", "pass", "."], "TS_V_token": ["RI5CY", "RISCV", "8", "16"], "File": "RISCVISelLowering", "Func": "shouldExpandAtomicCmpXchgInIR", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 152, "Length": 51, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "TargetLowering", "::", "AtomicExpansionKind", "RISCVTargetLowering", "::", "shouldExpandAtomicRMWInIR", "(", "AtomicRMWInst", "*", "AI", ")", "const", "{", "if", "(", "AI", "->", "isFloatingPointOperation", "(", ")", ")", "return", "AtomicExpansionKind", "::", "CmpXChg", ";", "unsigned", "Size", "=", "AI", "->", "getType", "(", ")", "->", "getPrimitiveSizeInBits", "(", ")", ";", "if", "(", "Size", "==", "8", "||", "Size", "==", "16", ")", "return", "AtomicExpansionKind", "::", "MaskedIntrinsic", ";", "return", "AtomicExpansionKind", "::", "None", ";", "}", ""], "natrual_language": ["Returns", "how", "the", "IR-level", "AtomicExpand", "pass", "should", "expand", "the", "given", "AtomicRMW", ",", "if", "at", "all", "."], "TS_V_token": ["RI5CY", "RISCV", "8", "16"], "File": "RISCVISelLowering", "Func": "shouldExpandAtomicRMWInIR", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 153, "Length": 60, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "shouldExtendTypeInLibCall", "(", "EVT", "Type", ")", "const", "{", "RISCVABI", "::", "ABI", "ABI", "=", "Subtarget", ".", "getTargetABI", "(", ")", ";", "if", "(", "ABI", "==", "RISCVABI", "::", "ABI_LP64", "&&", "(", "Type", "==", "MVT", "::", "f32", ")", ")", "return", "false", ";", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "arguments", "should", "be", "extended", "in", "lib", "calls", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCVABI::ABI", "RISCVABI::ABI_LP64", "MVT::f32"], "File": "RISCVISelLowering", "Func": "shouldExtendTypeInLibCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 154, "Length": 44, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "shouldInsertFencesForAtomic", "(", "const", "Instruction", "*", "I", ")", "const", "override", "{", "return", "isa", "<", "LoadInst", ">", "(", "I", ")", "||", "isa", "<", "StoreInst", ">", "(", "I", ")", ";", "}", ""], "natrual_language": ["Helper", "functions", "for", "atomic", "operations", "."], "TS_V_token": ["RI5CY"], "File": "RISCVISelLowering", "Func": "shouldInsertFencesForAtomic", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 155, "Length": 29, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetLowering", "::", "shouldSignExtendTypeInLibCall", "(", "EVT", "Type", ",", "bool", "IsSigned", ")", "const", "{", "if", "(", "Subtarget", ".", "is64Bit", "(", ")", "&&", "Type", "==", "MVT", "::", "i32", ")", "return", "true", ";", "return", "IsSigned", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "arguments", "should", "be", "sign-extended", "in", "lib", "calls", "."], "TS_V_token": ["RI5CY", "RISCV", "MVT::i32"], "File": "RISCVISelLowering", "Func": "shouldSignExtendTypeInLibCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 156, "Length": 34, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVMCCodeEmitter", "::", "encodeInstruction", "(", "const", "MCInst", "&", "MI", ",", "raw_ostream", "&", "OS", ",", "SmallVectorImpl", "<", "MCFixup", ">", "&", "Fixups", ",", "const", "MCSubtargetInfo", "&", "STI", ")", "const", "{", "verifyInstructionPredicates", "(", "MI", ",", "computeAvailableFeatures", "(", "STI", ".", "getFeatureBits", "(", ")", ")", ")", ";", "const", "MCInstrDesc", "&", "Desc", "=", "MCII", ".", "get", "(", "MI", ".", "getOpcode", "(", ")", ")", ";", "unsigned", "Size", "=", "Desc", ".", "getSize", "(", ")", ";", "if", "(", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoCALLReg", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoCALL", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoTAIL", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoJump", ")", "{", "expandFunctionCall", "(", "MI", ",", "OS", ",", "Fixups", ",", "STI", ")", ";", "MCNumEmitted", "+=", "2", ";", "return", ";", "}", "if", "(", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoAddTPRel", ")", "{", "expandAddTPRel", "(", "MI", ",", "OS", ",", "Fixups", ",", "STI", ")", ";", "MCNumEmitted", "+=", "1", ";", "return", ";", "}", "switch", "(", "Size", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unhandled encodeInstruction length!\"", ")", ";", "case", "2", ":", "{", "uint16_t", "Bits", "=", "getBinaryCodeForInstr", "(", "MI", ",", "Fixups", ",", "STI", ")", ";", "support", "::", "endian", "::", "write", "<", "uint16_t", ">", "(", "OS", ",", "Bits", ",", "support", "::", "little", ")", ";", "break", ";", "}", "case", "4", ":", "{", "uint32_t", "Bits", "=", "getBinaryCodeForInstr", "(", "MI", ",", "Fixups", ",", "STI", ")", ";", "support", "::", "endian", "::", "write", "(", "OS", ",", "Bits", ",", "support", "::", "little", ")", ";", "break", ";", "}", "}", "++", "MCNumEmitted", ";", "}", ""], "natrual_language": ["Encode", "the", "given", "Inst", "to", "bytes", "and", "append", "to", "CB", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::PseudoCALLReg", "RISCV::PseudoCALL", "RISCV::PseudoTAIL", "RISCV::PseudoJump", "2", "RISCV::PseudoAddTPRel", "1", "\"Unhandled encodeInstruction length!\"", "2", "support::endian", "support::little", "4", "support::endian", "support::little"], "File": "RISCVMCCodeEmitter", "Func": "encodeInstruction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 157, "Length": 247, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "unsigned", "RISCVMCCodeEmitter", "::", "getMachineOpValue", "(", "const", "MCInst", "&", "MI", ",", "const", "MCOperand", "&", "MO", ",", "SmallVectorImpl", "<", "MCFixup", ">", "&", "Fixups", ",", "const", "MCSubtargetInfo", "&", "STI", ")", "const", "{", "if", "(", "MO", ".", "isReg", "(", ")", ")", "return", "Ctx", ".", "getRegisterInfo", "(", ")", "->", "getEncodingValue", "(", "MO", ".", "getReg", "(", ")", ")", ";", "if", "(", "MO", ".", "isImm", "(", ")", ")", "return", "static_cast", "<", "unsigned", ">", "(", "MO", ".", "getImm", "(", ")", ")", ";", "if", "(", "MO", ".", "isExpr", "(", ")", "&&", "(", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0setup", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1setup", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0setupi", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1setupi", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0starti", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1starti", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0endi", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1endi", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0counti", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1counti", ")", ")", "{", "if", "(", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP0setupi", "||", "MI", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "LOOP1setupi", ")", "{", "RISCV", "::", "Fixups", "FixupKind", "=", "RISCV", "::", "fixup_pulpv2_loop_setupi", ";", "Fixups", ".", "push_back", "(", "MCFixup", "::", "create", "(", "0", ",", "MO", ".", "getExpr", "(", ")", ",", "MCFixupKind", "(", "FixupKind", ")", ",", "MI", ".", "getLoc", "(", ")", ")", ")", ";", "}", "else", "{", "RISCV", "::", "Fixups", "FixupKind", "=", "RISCV", "::", "fixup_pulpv2_loop_setup", ";", "Fixups", ".", "push_back", "(", "MCFixup", "::", "create", "(", "0", ",", "MO", ".", "getExpr", "(", ")", ",", "MCFixupKind", "(", "FixupKind", ")", ",", "MI", ".", "getLoc", "(", ")", ")", ")", ";", "}", "++", "MCNumFixups", ";", "return", "0", ";", "}", "llvm_unreachable", "(", "\"Unhandled expression!\"", ")", ";", "return", "0", ";", "}", ""], "natrual_language": ["getMachineOpValue", "-", "Return", "binary", "encoding", "of", "operand", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::LOOP0setup", "RISCV::LOOP1setup", "RISCV::LOOP0setupi", "RISCV::LOOP1setupi", "RISCV::LOOP0starti", "RISCV::LOOP1starti", "RISCV::LOOP0endi", "RISCV::LOOP1endi", "RISCV::LOOP0counti", "RISCV::LOOP1counti", "RISCV::LOOP0setupi", "RISCV::LOOP1setupi", "RISCV::Fixups", "RISCV::fixup_pulpv2_loop_setupi", "0", "RISCV::Fixups", "RISCV::fixup_pulpv2_loop_setup", "0", "0", "\"Unhandled expression!\"", "0"], "File": "RISCVMCCodeEmitter", "Func": "getMachineOpValue", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 158, "Length": 304, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "static", "bool", "classof", "(", "const", "RISCVMCExpr", "*", ")", "{", "return", "true", ";", "}", ""], "natrual_language": ["Methods", "for", "support", "type", "inquiry", "through", "isa", ",", "cast", ",", "and", "dyn_cast", ":"], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVMCExpr", "Func": "classof", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 159, "Length": 13, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVMCExpr", "*", "RISCVMCExpr", "::", "create", "(", "const", "MCExpr", "*", "Expr", ",", "VariantKind", "Kind", ",", "MCContext", "&", "Ctx", ")", "{", "return", "new", "(", "Ctx", ")", "RISCVMCExpr", "(", "Expr", ",", "Kind", ")", ";", "}", ""], "natrual_language": ["This", "creates", "an", "identified", "struct", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV"], "File": "RISCVMCExpr", "Func": "create", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 160, "Length": 33, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVMCExpr", "::", "evaluateAsConstant", "(", "int64_t", "&", "Res", ")", "const", "{", "MCValue", "Value", ";", "if", "(", "Kind", "==", "VK_RISCV_PCREL_HI", "||", "Kind", "==", "VK_RISCV_PCREL_LO", "||", "Kind", "==", "VK_RISCV_GOT_HI", "||", "Kind", "==", "VK_RISCV_TPREL_HI", "||", "Kind", "==", "VK_RISCV_TPREL_LO", "||", "Kind", "==", "VK_RISCV_TPREL_ADD", "||", "Kind", "==", "VK_RISCV_TLS_GOT_HI", "||", "Kind", "==", "VK_RISCV_TLS_GD_HI", "||", "Kind", "==", "VK_RISCV_CALL", "||", "Kind", "==", "VK_RISCV_CALL_PLT", ")", "return", "false", ";", "if", "(", "!", "getSubExpr", "(", ")", "->", "evaluateAsRelocatable", "(", "Value", ",", "nullptr", ",", "nullptr", ")", ")", "return", "false", ";", "if", "(", "!", "Value", ".", "isAbsolute", "(", ")", ")", "return", "false", ";", "Res", "=", "evaluateAsInt64", "(", "Value", ".", "getConstant", "(", ")", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["Evaluates", "the", "fixup", "as", "a", "constant", "value", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV"], "File": "RISCVMCExpr", "Func": "evaluateAsConstant", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 161, "Length": 105, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MCFragment", "*", "findAssociatedFragment", "(", ")", "const", "override", "{", "return", "getSubExpr", "(", ")", "->", "findAssociatedFragment", "(", ")", ";", "}", ""], "natrual_language": ["Find", "the", "``", "associated", "section", "''", "for", "this", "expression", ",", "which", "is", "currently", "defined", "as", "the", "absolute", "section", "for", "constants", ",", "or", "otherwise", "the", "section", "associated", "with", "the", "first", "defined", "symbol", "in", "the", "expression", "."], "TS_V_token": ["RI5CY"], "File": "RISCVMCExpr", "Func": "findAssociatedFragment", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 162, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "VariantKind", "getKind", "(", ")", "const", "{", "return", "Kind", ";", "}", ""], "natrual_language": ["Returns", "the", "Kind", "of", "lane", "offset", "."], "TS_V_token": ["RI5CY"], "File": "RISCVMCExpr", "Func": "getKind", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 163, "Length": 10, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "MCFixup", "*", "RISCVMCExpr", "::", "getPCRelHiFixup", "(", "const", "MCFragment", "*", "*", "DFOut", ")", "const", "{", "MCValue", "AUIPCLoc", ";", "if", "(", "!", "getSubExpr", "(", ")", "->", "evaluateAsRelocatable", "(", "AUIPCLoc", ",", "nullptr", ",", "nullptr", ")", ")", "return", "nullptr", ";", "const", "MCSymbolRefExpr", "*", "AUIPCSRE", "=", "AUIPCLoc", ".", "getSymA", "(", ")", ";", "if", "(", "!", "AUIPCSRE", ")", "return", "nullptr", ";", "const", "MCSymbol", "*", "AUIPCSymbol", "=", "&", "AUIPCSRE", "->", "getSymbol", "(", ")", ";", "const", "auto", "*", "DF", "=", "dyn_cast_or_null", "<", "MCDataFragment", ">", "(", "AUIPCSymbol", "->", "getFragment", "(", ")", ")", ";", "if", "(", "!", "DF", ")", "return", "nullptr", ";", "uint64_t", "Offset", "=", "AUIPCSymbol", "->", "getOffset", "(", ")", ";", "if", "(", "DF", "->", "getContents", "(", ")", ".", "size", "(", ")", "==", "Offset", ")", "{", "DF", "=", "dyn_cast_or_null", "<", "MCDataFragment", ">", "(", "DF", "->", "getNextNode", "(", ")", ")", ";", "if", "(", "!", "DF", ")", "return", "nullptr", ";", "Offset", "=", "0", ";", "}", "for", "(", "const", "MCFixup", "&", "F", ":", "DF", "->", "getFixups", "(", ")", ")", "{", "if", "(", "F", ".", "getOffset", "(", ")", "!=", "Offset", ")", "continue", ";", "switch", "(", "(", "unsigned", ")", "F", ".", "getKind", "(", ")", ")", "{", "default", ":", "continue", ";", "case", "RISCV", "::", "fixup_riscv_got_hi20", ":", "case", "RISCV", "::", "fixup_riscv_tls_got_hi20", ":", "case", "RISCV", "::", "fixup_riscv_tls_gd_hi20", ":", "case", "RISCV", "::", "fixup_riscv_pcrel_hi20", ":", "if", "(", "DFOut", ")", "*", "DFOut", "=", "DF", ";", "return", "&", "F", ";", "}", "}", "return", "nullptr", ";", "}", ""], "natrual_language": ["Get", "the", "corresponding", "PC-relative", "HI", "fixup", "that", "a", "VK_RISCV_PCREL_LO", "points", "to", ",", "and", "optionally", "the", "fragment", "containing", "it", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "RISCV::fixup_riscv_got_hi20", "RISCV::fixup_riscv_tls_got_hi20", "RISCV::fixup_riscv_tls_gd_hi20", "RISCV::fixup_riscv_pcrel_hi20"], "File": "RISCVMCExpr", "Func": "getPCRelHiFixup", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 164, "Length": 225, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "MCExpr", "*", "getSubExpr", "(", ")", "const", "{", "return", "Expr", ";", "}", ""], "natrual_language": ["getSubExpr", "-", "Get", "the", "child", "of", "this", "expression", "."], "TS_V_token": ["RI5CY"], "File": "RISCVMCExpr", "Func": "getSubExpr", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 165, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "RISCVMCExpr", "::", "getVariantKindName", "(", "VariantKind", "Kind", ")", "{", "switch", "(", "Kind", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Invalid ELF symbol kind\"", ")", ";", "case", "VK_RISCV_LO", ":", "return", "\"lo\"", ";", "case", "VK_RISCV_HI", ":", "return", "\"hi\"", ";", "case", "VK_RISCV_PCREL_LO", ":", "return", "\"pcrel_lo\"", ";", "case", "VK_RISCV_PCREL_HI", ":", "return", "\"pcrel_hi\"", ";", "case", "VK_RISCV_GOT_HI", ":", "return", "\"got_pcrel_hi\"", ";", "case", "VK_RISCV_TPREL_LO", ":", "return", "\"tprel_lo\"", ";", "case", "VK_RISCV_TPREL_HI", ":", "return", "\"tprel_hi\"", ";", "case", "VK_RISCV_TPREL_ADD", ":", "return", "\"tprel_add\"", ";", "case", "VK_RISCV_TLS_GOT_HI", ":", "return", "\"tls_ie_pcrel_hi\"", ";", "case", "VK_RISCV_TLS_GD_HI", ":", "return", "\"tls_gd_pcrel_hi\"", ";", "}", "}", ""], "natrual_language": ["Convert", "the", "variant", "kind", "into", "an", "ELF-appropriate", "modifier", "(", "e.g", "."], "TS_V_token": ["RI5CY", "RISCV", "\"Invalid ELF symbol kind\"", "RISCV", "\"lo\"", "RISCV", "\"hi\"", "RISCV", "\"pcrel_lo\"", "RISCV", "\"pcrel_hi\"", "RISCV", "\"got_pcrel_hi\"", "RISCV", "\"tprel_lo\"", "RISCV", "\"tprel_hi\"", "RISCV", "\"tprel_add\"", "RISCV", "\"tls_ie_pcrel_hi\"", "RISCV", "\"tls_gd_pcrel_hi\""], "File": "RISCVMCExpr", "Func": "getVariantKindName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 166, "Length": 83, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "evaluateBranch", "(", "const", "MCInst", "&", "Inst", ",", "uint64_t", "Addr", ",", "uint64_t", "Size", ",", "uint64_t", "&", "Target", ")", "const", "override", "{", "if", "(", "isConditionalBranch", "(", "Inst", ")", ")", "{", "int64_t", "Imm", ";", "if", "(", "Size", "==", "2", ")", "Imm", "=", "Inst", ".", "getOperand", "(", "1", ")", ".", "getImm", "(", ")", ";", "else", "Imm", "=", "Inst", ".", "getOperand", "(", "2", ")", ".", "getImm", "(", ")", ";", "Target", "=", "Addr", "+", "Imm", ";", "return", "true", ";", "}", "if", "(", "Inst", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "C_JAL", "||", "Inst", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "C_J", ")", "{", "Target", "=", "Addr", "+", "Inst", ".", "getOperand", "(", "0", ")", ".", "getImm", "(", ")", ";", "return", "true", ";", "}", "if", "(", "Inst", ".", "getOpcode", "(", ")", "==", "RISCV", "::", "JAL", ")", "{", "Target", "=", "Addr", "+", "Inst", ".", "getOperand", "(", "1", ")", ".", "getImm", "(", ")", ";", "return", "true", ";", "}", "return", "false", ";", "}", ""], "natrual_language": ["Given", "a", "branch", "instruction", "try", "to", "get", "the", "address", "the", "branch", "targets", "."], "TS_V_token": ["RI5CY", "2", "1", "2", "RISCV::C_JAL", "RISCV::C_J", "0", "RISCV::JAL", "1"], "File": "RISCVMCTargetDesc", "Func": "evaluateBranch", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 167, "Length": 153, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "RISCV_MERGE_BASE_OFFSET_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVMergeBaseOffset", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 168, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVMergeBaseOffsetOpt", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "Fn", ")", "{", "if", "(", "skipFunction", "(", "Fn", ".", "getFunction", "(", ")", ")", ")", "return", "false", ";", "DeadInstrs", ".", "clear", "(", ")", ";", "MRI", "=", "&", "Fn", ".", "getRegInfo", "(", ")", ";", "for", "(", "MachineBasicBlock", "&", "MBB", ":", "Fn", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"MBB: \"", "<<", "MBB", ".", "getName", "(", ")", "<<", "\"\\n\"", ")", ";", "for", "(", "MachineInstr", "&", "HiLUI", ":", "MBB", ")", "{", "MachineInstr", "*", "LoADDI", "=", "nullptr", ";", "if", "(", "!", "detectLuiAddiGlobal", "(", "HiLUI", ",", "LoADDI", ")", ")", "continue", ";", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\" Found lowered global address with one use: \"", "<<", "*", "LoADDI", "->", "getOperand", "(", "2", ")", ".", "getGlobal", "(", ")", "<<", "\"\\n\"", ")", ";", "detectAndFoldOffset", "(", "HiLUI", ",", "*", "LoADDI", ")", ";", "}", "}", "for", "(", "auto", "*", "MI", ":", "DeadInstrs", ")", "MI", "->", "eraseFromParent", "(", ")", ";", "return", "true", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "RISCV", "\"MBB: \"", "\"\\n\"", "\" Found lowered global address with one use: \"", "2", "\"\\n\""], "File": "RISCVMergeBaseOffset", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 169, "Length": 143, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVRegisterInfo", "::", "eliminateFrameIndex", "(", "MachineBasicBlock", "::", "iterator", "II", ",", "int", "SPAdj", ",", "unsigned", "FIOperandNum", ",", "RegScavenger", "*", "RS", ")", "const", "{", "assert", "(", "SPAdj", "==", "0", "&&", "\"Unexpected non-zero SPAdj value\"", ")", ";", "MachineInstr", "&", "MI", "=", "*", "II", ";", "MachineFunction", "&", "MF", "=", "*", "MI", ".", "getParent", "(", ")", "->", "getParent", "(", ")", ";", "MachineRegisterInfo", "&", "MRI", "=", "MF", ".", "getRegInfo", "(", ")", ";", "const", "RISCVInstrInfo", "*", "TII", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "getInstrInfo", "(", ")", ";", "DebugLoc", "DL", "=", "MI", ".", "getDebugLoc", "(", ")", ";", "int", "FrameIndex", "=", "MI", ".", "getOperand", "(", "FIOperandNum", ")", ".", "getIndex", "(", ")", ";", "Register", "FrameReg", ";", "int", "Offset", "=", "getFrameLowering", "(", "MF", ")", "->", "getFrameIndexReference", "(", "MF", ",", "FrameIndex", ",", "FrameReg", ")", ".", "getFixed", "(", ")", "+", "MI", ".", "getOperand", "(", "FIOperandNum", "+", "1", ")", ".", "getImm", "(", ")", ";", "if", "(", "!", "isInt", "<", "32", ">", "(", "Offset", ")", ")", "{", "report_fatal_error", "(", "\"Frame offsets outside of the signed 32-bit range not supported\"", ")", ";", "}", "MachineBasicBlock", "&", "MBB", "=", "*", "MI", ".", "getParent", "(", ")", ";", "bool", "FrameRegIsKill", "=", "false", ";", "if", "(", "!", "isInt", "<", "12", ">", "(", "Offset", ")", ")", "{", "assert", "(", "isInt", "<", "32", ">", "(", "Offset", ")", "&&", "\"Int32 expected\"", ")", ";", "Register", "ScratchReg", "=", "MRI", ".", "createVirtualRegister", "(", "&", "RISCV", "::", "GPRRegClass", ")", ";", "TII", "->", "movImm", "(", "MBB", ",", "II", ",", "DL", ",", "ScratchReg", ",", "Offset", ")", ";", "BuildMI", "(", "MBB", ",", "II", ",", "DL", ",", "TII", "->", "get", "(", "RISCV", "::", "ADD", ")", ",", "ScratchReg", ")", ".", "addReg", "(", "FrameReg", ")", ".", "addReg", "(", "ScratchReg", ",", "RegState", "::", "Kill", ")", ";", "Offset", "=", "0", ";", "FrameReg", "=", "ScratchReg", ";", "FrameRegIsKill", "=", "true", ";", "}", "MI", ".", "getOperand", "(", "FIOperandNum", ")", ".", "ChangeToRegister", "(", "FrameReg", ",", "false", ",", "false", ",", "FrameRegIsKill", ")", ";", "MI", ".", "getOperand", "(", "FIOperandNum", "+", "1", ")", ".", "ChangeToImmediate", "(", "Offset", ")", ";", "}", ""], "natrual_language": ["This", "method", "must", "be", "overriden", "to", "eliminate", "abstract", "frame", "indices", "from", "instructions", "which", "may", "use", "them", "."], "TS_V_token": ["RI5CY", "RISCV", "0", "\"Unexpected non-zero SPAdj value\"", "RISCV", "RISCV", "1", "32", "\"Frame offsets outside of the signed 32-bit range not supported\"", "12", "32", "\"Int32 expected\"", "RISCV::GPRRegClass", "RISCV::ADD", "0", "1"], "File": "RISCVRegisterInfo", "Func": "eliminateFrameIndex", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 170, "Length": 308, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "MCPhysReg", "*", "RISCVRegisterInfo", "::", "getCalleeSavedRegs", "(", "const", "MachineFunction", "*", "MF", ")", "const", "{", "auto", "&", "Subtarget", "=", "MF", "->", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "if", "(", "MF", "->", "getFunction", "(", ")", ".", "getCallingConv", "(", ")", "==", "CallingConv", "::", "GHC", ")", "return", "CSR_NoRegs_SaveList", ";", "if", "(", "MF", "->", "getFunction", "(", ")", ".", "hasFnAttribute", "(", "\"interrupt\"", ")", ")", "{", "if", "(", "Subtarget", ".", "hasStdExtD", "(", ")", ")", "return", "CSR_XLEN_F64_Interrupt_SaveList", ";", "if", "(", "Subtarget", ".", "hasStdExtF", "(", ")", ")", "return", "CSR_XLEN_F32_Interrupt_SaveList", ";", "return", "CSR_Interrupt_SaveList", ";", "}", "switch", "(", "Subtarget", ".", "getTargetABI", "(", ")", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unrecognized ABI\"", ")", ";", "case", "RISCVABI", "::", "ABI_ILP32", ":", "case", "RISCVABI", "::", "ABI_LP64", ":", "return", "CSR_ILP32_LP64_SaveList", ";", "case", "RISCVABI", "::", "ABI_ILP32F", ":", "case", "RISCVABI", "::", "ABI_LP64F", ":", "return", "CSR_ILP32F_LP64F_SaveList", ";", "case", "RISCVABI", "::", "ABI_ILP32D", ":", "case", "RISCVABI", "::", "ABI_LP64D", ":", "return", "CSR_ILP32D_LP64D_SaveList", ";", "}", "}", ""], "natrual_language": ["Code", "Generation", "virtual", "methods", "..."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "\"interrupt\"", "\"Unrecognized ABI\"", "RISCVABI::ABI_ILP32", "RISCVABI::ABI_LP64", "RISCVABI::ABI_ILP32F", "RISCVABI::ABI_LP64F", "RISCVABI::ABI_ILP32D", "RISCVABI::ABI_LP64D"], "File": "RISCVRegisterInfo", "Func": "getCalleeSavedRegs", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 171, "Length": 143, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "uint32_t", "*", "RISCVRegisterInfo", "::", "getCallPreservedMask", "(", "const", "MachineFunction", "&", "MF", ",", "CallingConv", "::", "ID", "CC", ")", "const", "{", "auto", "&", "Subtarget", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "if", "(", "CC", "==", "CallingConv", "::", "GHC", ")", "return", "CSR_NoRegs_RegMask", ";", "switch", "(", "Subtarget", ".", "getTargetABI", "(", ")", ")", "{", "default", ":", "llvm_unreachable", "(", "\"Unrecognized ABI\"", ")", ";", "case", "RISCVABI", "::", "ABI_ILP32", ":", "case", "RISCVABI", "::", "ABI_LP64", ":", "return", "CSR_ILP32_LP64_RegMask", ";", "case", "RISCVABI", "::", "ABI_ILP32F", ":", "case", "RISCVABI", "::", "ABI_LP64F", ":", "return", "CSR_ILP32F_LP64F_RegMask", ";", "case", "RISCVABI", "::", "ABI_ILP32D", ":", "case", "RISCVABI", "::", "ABI_LP64D", ":", "return", "CSR_ILP32D_LP64D_RegMask", ";", "}", "}", ""], "natrual_language": ["Return", "a", "mask", "of", "call-preserved", "registers", "for", "the", "given", "calling", "convention", "on", "the", "current", "function", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "\"Unrecognized ABI\"", "RISCVABI::ABI_ILP32", "RISCVABI::ABI_LP64", "RISCVABI::ABI_ILP32F", "RISCVABI::ABI_LP64F", "RISCVABI::ABI_ILP32D", "RISCVABI::ABI_LP64D"], "File": "RISCVRegisterInfo", "Func": "getCallPreservedMask", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 172, "Length": 100, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "Register", "RISCVRegisterInfo", "::", "getFrameRegister", "(", "const", "MachineFunction", "&", "MF", ")", "const", "{", "const", "TargetFrameLowering", "*", "TFI", "=", "getFrameLowering", "(", "MF", ")", ";", "return", "TFI", "->", "hasFP", "(", "MF", ")", "?", "RISCV", "::", "X8", ":", "RISCV", "::", "X2", ";", "}", ""], "natrual_language": ["Debug", "information", "queries", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X8", "RISCV::X2"], "File": "RISCVRegisterInfo", "Func": "getFrameRegister", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 173, "Length": 39, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "uint32_t", "*", "RISCVRegisterInfo", "::", "getNoPreservedMask", "(", ")", "const", "{", "return", "CSR_NoRegs_RegMask", ";", "}", ""], "natrual_language": ["Return", "a", "register", "mask", "that", "clobbers", "everything", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVRegisterInfo", "Func": "getNoPreservedMask", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 174, "Length": 14, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "TargetRegisterClass", "*", "getPointerRegClass", "(", "const", "MachineFunction", "&", "MF", ",", "unsigned", "Kind", "=", "0", ")", "const", "override", "{", "return", "&", "RISCV", "::", "GPRRegClass", ";", "}", ""], "natrual_language": ["getPointerRegClass", "-", "Returns", "a", "TargetRegisterClass", "used", "for", "pointer", "values", "."], "TS_V_token": ["RI5CY", "0", "RISCV::GPRRegClass"], "File": "RISCVRegisterInfo", "Func": "getPointerRegClass", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 175, "Length": 25, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "BitVector", "RISCVRegisterInfo", "::", "getReservedRegs", "(", "const", "MachineFunction", "&", "MF", ")", "const", "{", "const", "RISCVFrameLowering", "*", "TFI", "=", "getFrameLowering", "(", "MF", ")", ";", "BitVector", "Reserved", "(", "getNumRegs", "(", ")", ")", ";", "const", "auto", "*", "RVFI", "=", "MF", ".", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "for", "(", "size_t", "Reg", "=", "0", ";", "Reg", "<", "getNumRegs", "(", ")", ";", "Reg", "++", ")", "{", "if", "(", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "isRegisterReservedByUser", "(", "Reg", ")", ")", "markSuperRegs", "(", "Reserved", ",", "Reg", ")", ";", "}", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "X0", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "X2", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "X3", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "X4", ")", ";", "if", "(", "TFI", "->", "hasFP", "(", "MF", ")", ")", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "X8", ")", ";", "if", "(", "TFI", "->", "hasBP", "(", "MF", ")", ")", "markSuperRegs", "(", "Reserved", ",", "RISCVABI", "::", "getBPReg", "(", ")", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "VL", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "VTYPE", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "VXSAT", ")", ";", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "VXRM", ")", ";", "for", "(", "unsigned", "n", "=", "0", ";", "n", "!=", "8", ";", "++", "n", ")", "{", "if", "(", "RVFI", "->", "getUsedSSR", "(", ")", "&", "(", "1", "<<", "n", ")", ")", "markSuperRegs", "(", "Reserved", ",", "RISCV", "::", "F0_D", "+", "n", ")", ";", "}", "assert", "(", "checkAllSuperRegsMarked", "(", "Reserved", ")", ")", ";", "return", "Reserved", ";", "}", ""], "natrual_language": ["getReservedRegs", "-", "Returns", "a", "bitset", "indexed", "by", "physical", "register", "number", "indicating", "if", "a", "register", "is", "a", "special", "register", "that", "has", "particular", "uses", "and", "should", "be", "considered", "unavailable", "at", "all", "times", ",", "e.g", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "0", "RISCV", "RISCV::X0", "RISCV::X2", "RISCV::X3", "RISCV::X4", "RISCV::X8", "RISCVABI::getBPReg", "RISCV::VL", "RISCV::VTYPE", "RISCV::VXSAT", "RISCV::VXRM", "0", "8", "1", "RISCV::F0_D"], "File": "RISCVRegisterInfo", "Func": "getReservedRegs", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 176, "Length": 248, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVRegisterInfo", "::", "hasReservedSpillSlot", "(", "const", "MachineFunction", "&", "MF", ",", "Register", "Reg", ",", "int", "&", "FrameIdx", ")", "const", "{", "const", "auto", "*", "RVFI", "=", "MF", ".", "getInfo", "<", "RISCVMachineFunctionInfo", ">", "(", ")", ";", "if", "(", "!", "RVFI", "->", "useSaveRestoreLibCalls", "(", "MF", ")", ")", "return", "false", ";", "auto", "FII", "=", "FixedCSRFIMap", ".", "find", "(", "Reg", ")", ";", "if", "(", "FII", "==", "FixedCSRFIMap", ".", "end", "(", ")", ")", "return", "false", ";", "FrameIdx", "=", "FII", "->", "second", ";", "return", "true", ";", "}", ""], "natrual_language": ["Return", "true", "if", "target", "has", "reserved", "a", "spill", "slot", "in", "the", "stack", "frame", "of", "the", "given", "function", "for", "the", "specified", "register", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVRegisterInfo", "Func": "hasReservedSpillSlot", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 177, "Length": 79, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVRegisterInfo", "::", "isAsmClobberable", "(", "const", "MachineFunction", "&", "MF", ",", "MCRegister", "PhysReg", ")", "const", "{", "return", "!", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ".", "isRegisterReservedByUser", "(", "PhysReg", ")", ";", "}", ""], "natrual_language": ["Returns", "false", "if", "we", "ca", "n't", "guarantee", "that", "Physreg", ",", "specified", "as", "an", "IR", "asm", "clobber", "constraint", ",", "will", "be", "preserved", "across", "the", "statement", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVRegisterInfo", "Func": "isAsmClobberable", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 178, "Length": 32, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVRegisterInfo", "::", "isConstantPhysReg", "(", "MCRegister", "PhysReg", ")", "const", "{", "return", "PhysReg", "==", "RISCV", "::", "X0", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "PhysReg", "is", "unallocatable", "and", "constant", "throughout", "the", "function", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::X0"], "File": "RISCVRegisterInfo", "Func": "isConstantPhysReg", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 179, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "requiresFrameIndexScavenging", "(", "const", "MachineFunction", "&", "MF", ")", "const", "override", "{", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "the", "target", "requires", "post", "PEI", "scavenging", "of", "registers", "for", "materializing", "frame", "index", "constants", "."], "TS_V_token": ["RI5CY"], "File": "RISCVRegisterInfo", "Func": "requiresFrameIndexScavenging", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 180, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "requiresRegisterScavenging", "(", "const", "MachineFunction", "&", "MF", ")", "const", "override", "{", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "the", "target", "requires", "(", "and", "can", "make", "use", "of", ")", "the", "register", "scavenger", "."], "TS_V_token": ["RI5CY"], "File": "RISCVRegisterInfo", "Func": "requiresRegisterScavenging", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 181, "Length": 15, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "enableMachineScheduler", "(", ")", "const", "override", "{", "return", "true", ";", "}", ""], "natrual_language": ["Enable", "the", "MachineScheduler", "pass", "for", "all", "X86", "subtargets", "."], "TS_V_token": ["RI5CY"], "File": "RISCVSubtarget", "Func": "enableMachineScheduler", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 182, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "CallLowering", "*", "RISCVSubtarget", "::", "getCallLowering", "(", ")", "const", "{", "return", "CallLoweringInfo", ".", "get", "(", ")", ";", "}", ""], "natrual_language": ["Methods", "used", "by", "Global", "ISel", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVSubtarget", "Func": "getCallLowering", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 183, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVInstrInfo", "*", "getInstrInfo", "(", ")", "const", "override", "{", "return", "&", "InstrInfo", ";", "}", ""], "natrual_language": ["TargetInstrInfo", "getter", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVSubtarget", "Func": "getInstrInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 184, "Length": 14, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "LegalizerInfo", "*", "RISCVSubtarget", "::", "getLegalizerInfo", "(", ")", "const", "{", "return", "Legalizer", ".", "get", "(", ")", ";", "}", ""], "natrual_language": ["Expose", "LegalizerInfo", "so", "the", "clients", "can", "re-use", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVSubtarget", "Func": "getLegalizerInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 185, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RegisterBankInfo", "*", "RISCVSubtarget", "::", "getRegBankInfo", "(", ")", "const", "{", "return", "RegBankInfo", ".", "get", "(", ")", ";", "}", ""], "natrual_language": ["If", "the", "information", "for", "the", "register", "banks", "is", "available", ",", "return", "it", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVSubtarget", "Func": "getRegBankInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 186, "Length": 18, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVRegisterInfo", "*", "getRegisterInfo", "(", ")", "const", "override", "{", "return", "&", "RegInfo", ";", "}", ""], "natrual_language": ["getRegisterInfo", "-", "TargetInstrInfo", "is", "a", "superset", "of", "MRegister", "info", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVSubtarget", "Func": "getRegisterInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 187, "Length": 14, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "RISCVSubtarget", "&", "RISCVSubtarget", "::", "initializeSubtargetDependencies", "(", "const", "Triple", "&", "TT", ",", "StringRef", "CPU", ",", "StringRef", "TuneCPU", ",", "StringRef", "FS", ",", "StringRef", "ABIName", ")", "{", "bool", "Is64Bit", "=", "TT", ".", "isArch64Bit", "(", ")", ";", "std", "::", "string", "CPUName", "=", "std", "::", "string", "(", "CPU", ")", ";", "std", "::", "string", "TuneCPUName", "=", "std", "::", "string", "(", "TuneCPU", ")", ";", "if", "(", "CPUName", ".", "empty", "(", ")", ")", "CPUName", "=", "Is64Bit", "?", "\"generic-rv64\"", ":", "\"generic-rv32\"", ";", "if", "(", "TuneCPUName", ".", "empty", "(", ")", ")", "TuneCPUName", "=", "CPUName", ";", "ParseSubtargetFeatures", "(", "CPUName", ",", "TuneCPUName", ",", "FS", ")", ";", "if", "(", "Is64Bit", ")", "{", "XLenVT", "=", "MVT", "::", "i64", ";", "XLen", "=", "64", ";", "}", "TargetABI", "=", "RISCVABI", "::", "computeTargetABI", "(", "TT", ",", "getFeatureBits", "(", ")", ",", "ABIName", ")", ";", "RISCVFeatures", "::", "validate", "(", "TT", ",", "getFeatureBits", "(", ")", ")", ";", "if", "(", "TT", ".", "getVendor", "(", ")", "==", "Triple", "::", "HERO", ")", "{", "IsPULP", "=", "true", ";", "}", "return", "*", "this", ";", "}", ""], "natrual_language": ["initializeSubtargetDependencies", "-", "Initializes", "using", "a", "CPU", ",", "a", "TuneCPU", ",", "and", "feature", "string", "so", "that", "we", "can", "use", "initializer", "lists", "for", "subtarget", "initialization", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "\"generic-rv64\"", "\"generic-rv32\"", "MVT::i64", "64", "RISCVABI::computeTargetABI", "RISCVFeatures::validate"], "File": "RISCVSubtarget", "Func": "initializeSubtargetDependencies", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 188, "Length": 159, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVPassConfig", "::", "addGlobalInstructionSelect", "(", ")", "{", "addPass", "(", "new", "InstructionSelect", "(", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["This", "method", "should", "install", "a", "(", "global", ")", "instruction", "selector", "pass", ",", "which", "converts", "possibly", "generic", "instructions", "to", "fully", "target-specific", "instructions", ",", "thereby", "constraining", "all", "generic", "virtual", "registers", "to", "register", "classes", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addGlobalInstructionSelect", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 189, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVPassConfig", "::", "addInstSelector", "(", ")", "{", "addPass", "(", "createRISCVISelDag", "(", "getRISCVTargetMachine", "(", ")", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["addInstSelector", "-", "This", "method", "should", "install", "an", "instruction", "selector", "pass", ",", "which", "converts", "from", "LLVM", "code", "to", "machine", "instructions", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV"], "File": "RISCVTargetMachine", "Func": "addInstSelector", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 190, "Length": 21, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVPassConfig", "::", "addIRPasses", "(", ")", "{", "addPass", "(", "createAtomicExpandPass", "(", ")", ")", ";", "TargetPassConfig", "::", "addIRPasses", "(", ")", ";", "}", ""], "natrual_language": ["Add", "common", "target", "configurable", "passes", "that", "perform", "LLVM", "IR", "to", "IR", "transforms", "following", "machine", "independent", "optimization", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addIRPasses", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 191, "Length": 21, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVPassConfig", "::", "addIRTranslator", "(", ")", "{", "addPass", "(", "new", "IRTranslator", "(", "getOptLevel", "(", ")", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["This", "method", "should", "install", "an", "IR", "translator", "pass", ",", "which", "converts", "from", "LLVM", "code", "to", "machine", "instructions", "with", "possibly", "generic", "opcodes", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addIRTranslator", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 192, "Length": 22, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVPassConfig", "::", "addLegalizeMachineIR", "(", ")", "{", "addPass", "(", "new", "Legalizer", "(", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["This", "method", "should", "install", "a", "legalize", "pass", ",", "which", "converts", "the", "instruction", "sequence", "into", "one", "that", "can", "be", "selected", "by", "the", "target", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addLegalizeMachineIR", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 193, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVPassConfig", "::", "addPreEmitPass", "(", ")", "{", "addPass", "(", "&", "BranchRelaxationPassID", ")", ";", "}", ""], "natrual_language": ["This", "pass", "may", "be", "implemented", "by", "targets", "that", "want", "to", "run", "passes", "immediately", "before", "machine", "code", "is", "emitted", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addPreEmitPass", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 194, "Length": 14, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVPassConfig", "::", "addPreEmitPass2", "(", ")", "{", "addPass", "(", "createRISCVExpandPseudoPass", "(", ")", ")", ";", "addPass", "(", "createPULPFixupHwLoops", "(", ")", ")", ";", "addPass", "(", "createRISCVExpandAtomicPseudoPass", "(", ")", ")", ";", "}", ""], "natrual_language": ["Targets", "may", "add", "passes", "immediately", "before", "machine", "code", "is", "emitted", "in", "this", "callback", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV"], "File": "RISCVTargetMachine", "Func": "addPreEmitPass2", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 195, "Length": 29, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVPassConfig", "::", "addPreRegAlloc", "(", ")", "{", "addPass", "(", "createRISCVExpandSDMAPass", "(", ")", ")", ";", "addPass", "(", "createRISCVExpandSSRPass", "(", ")", ")", ";", "addPass", "(", "createSNITCHFrepLoopsPass", "(", ")", ")", ";", "if", "(", "TM", "->", "getOptLevel", "(", ")", "!=", "CodeGenOpt", "::", "None", ")", "{", "addPass", "(", "createRISCVMergeBaseOffsetOptPass", "(", ")", ")", ";", "addPass", "(", "createRISCVCleanupVSETVLIPass", "(", ")", ")", ";", "addPass", "(", "createPULPHardwareLoops", "(", ")", ")", ";", "}", "}", ""], "natrual_language": ["This", "method", "may", "be", "implemented", "by", "targets", "that", "want", "to", "run", "passes", "immediately", "before", "register", "allocation", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "RISCV", "RISCV", "RISCV"], "File": "RISCVTargetMachine", "Func": "addPreRegAlloc", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 196, "Length": 64, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVPassConfig", "::", "addPreSched2", "(", ")", "{", "}", ""], "natrual_language": ["This", "method", "may", "be", "implemented", "by", "targets", "that", "want", "to", "run", "passes", "after", "prolog-epilog", "insertion", "and", "before", "the", "second", "instruction", "scheduling", "pass", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addPreSched2", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 197, "Length": 8, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVPassConfig", "::", "addRegBankSelect", "(", ")", "{", "addPass", "(", "new", "RegBankSelect", "(", ")", ")", ";", "return", "false", ";", "}", ""], "natrual_language": ["This", "method", "should", "install", "a", "register", "bank", "selector", "pass", ",", "which", "assigns", "register", "banks", "to", "virtual", "registers", "without", "a", "register", "class", "or", "register", "banks", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "addRegBankSelect", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 198, "Length": 19, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "TargetPassConfig", "*", "RISCVTargetMachine", "::", "createPassConfig", "(", "PassManagerBase", "&", "PM", ")", "{", "return", "new", "RISCVPassConfig", "(", "*", "this", ",", "PM", ")", ";", "}", ""], "natrual_language": ["Create", "a", "pass", "configuration", "object", "to", "be", "used", "by", "addPassToEmitX", "methods", "for", "generating", "a", "pipeline", "of", "CodeGen", "passes", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVTargetMachine", "Func": "createPassConfig", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 199, "Length": 22, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "TargetLoweringObjectFile", "*", "getObjFileLowering", "(", ")", "const", "override", "{", "return", "TLOF", ".", "get", "(", ")", ";", "}", ""], "natrual_language": ["Return", "information", "about", "object", "file", "lowering", "."], "TS_V_token": ["RI5CY"], "File": "RISCVTargetMachine", "Func": "getObjFileLowering", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 200, "Length": 16, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVSubtarget", "*", "RISCVTargetMachine", "::", "getSubtargetImpl", "(", "const", "Function", "&", "F", ")", "const", "{", "Attribute", "CPUAttr", "=", "F", ".", "getFnAttribute", "(", "\"target-cpu\"", ")", ";", "Attribute", "TuneAttr", "=", "F", ".", "getFnAttribute", "(", "\"tune-cpu\"", ")", ";", "Attribute", "FSAttr", "=", "F", ".", "getFnAttribute", "(", "\"target-features\"", ")", ";", "std", "::", "string", "CPU", "=", "CPUAttr", ".", "isValid", "(", ")", "?", "CPUAttr", ".", "getValueAsString", "(", ")", ".", "str", "(", ")", ":", "TargetCPU", ";", "std", "::", "string", "TuneCPU", "=", "TuneAttr", ".", "isValid", "(", ")", "?", "TuneAttr", ".", "getValueAsString", "(", ")", ".", "str", "(", ")", ":", "CPU", ";", "std", "::", "string", "FS", "=", "FSAttr", ".", "isValid", "(", ")", "?", "FSAttr", ".", "getValueAsString", "(", ")", ".", "str", "(", ")", ":", "TargetFS", ";", "std", "::", "string", "Key", "=", "CPU", "+", "TuneCPU", "+", "FS", ";", "auto", "&", "I", "=", "SubtargetMap", "[", "Key", "]", ";", "if", "(", "!", "I", ")", "{", "resetTargetOptions", "(", "F", ")", ";", "auto", "ABIName", "=", "Options", ".", "MCOptions", ".", "getABIName", "(", ")", ";", "if", "(", "const", "MDString", "*", "ModuleTargetABI", "=", "dyn_cast_or_null", "<", "MDString", ">", "(", "F", ".", "getParent", "(", ")", "->", "getModuleFlag", "(", "\"target-abi\"", ")", ")", ")", "{", "auto", "TargetABI", "=", "RISCVABI", "::", "getTargetABI", "(", "ABIName", ")", ";", "if", "(", "TargetABI", "!=", "RISCVABI", "::", "ABI_Unknown", "&&", "ModuleTargetABI", "->", "getString", "(", ")", "!=", "ABIName", ")", "{", "report_fatal_error", "(", "\"-target-abi option != target-abi module flag\"", ")", ";", "}", "ABIName", "=", "ModuleTargetABI", "->", "getString", "(", ")", ";", "}", "I", "=", "std", "::", "make_unique", "<", "RISCVSubtarget", ">", "(", "TargetTriple", ",", "CPU", ",", "TuneCPU", ",", "FS", ",", "ABIName", ",", "*", "this", ")", ";", "}", "return", "I", ".", "get", "(", ")", ";", "}", ""], "natrual_language": ["Virtual", "method", "implemented", "by", "subclasses", "that", "returns", "a", "reference", "to", "that", "target", "'s", "TargetSubtargetInfo-derived", "member", "variable", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV", "\"target-cpu\"", "\"tune-cpu\"", "\"target-features\"", "\"target-abi\"", "RISCVABI::getTargetABI", "RISCVABI::ABI_Unknown", "\"-target-abi option != target-abi module flag\"", "RISCV"], "File": "RISCVTargetMachine", "Func": "getSubtargetImpl", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 201, "Length": 254, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "TargetTransformInfo", "RISCVTargetMachine", "::", "getTargetTransformInfo", "(", "const", "Function", "&", "F", ")", "{", "return", "TargetTransformInfo", "(", "RISCVTTIImpl", "(", "this", ",", "F", ")", ")", ";", "}", ""], "natrual_language": ["Get", "a", "TargetTransformInfo", "implementation", "for", "the", "target", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV"], "File": "RISCVTargetMachine", "Func": "getTargetTransformInfo", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 202, "Length": 23, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTargetMachine", "::", "isNoopAddrSpaceCast", "(", "unsigned", "SrcAS", ",", "unsigned", "DstAS", ")", "const", "{", "return", "true", ";", "}", ""], "natrual_language": ["Returns", "true", "if", "a", "cast", "between", "SrcAS", "and", "DestAS", "is", "a", "noop", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetMachine", "Func": "isNoopAddrSpaceCast", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 203, "Length": 17, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVELFTargetObjectFile", "::", "getModuleMetadata", "(", "Module", "&", "M", ")", "{", "SmallVector", "<", "Module", "::", "ModuleFlagEntry", ",", "8", ">", "ModuleFlags", ";", "M", ".", "getModuleFlagsMetadata", "(", "ModuleFlags", ")", ";", "for", "(", "const", "auto", "&", "MFE", ":", "ModuleFlags", ")", "{", "StringRef", "Key", "=", "MFE", ".", "Key", "->", "getString", "(", ")", ";", "if", "(", "Key", "==", "\"SmallDataLimit\"", ")", "{", "SSThreshold", "=", "mdconst", "::", "extract", "<", "ConstantInt", ">", "(", "MFE", ".", "Val", ")", "->", "getZExtValue", "(", ")", ";", "break", ";", "}", "}", "}", ""], "natrual_language": ["Get", "the", "module-level", "metadata", "that", "the", "platform", "cares", "about", "."], "TS_V_token": ["RI5CY", "RISCV", "8", "\"SmallDataLimit\""], "File": "RISCVTargetObjectFile", "Func": "getModuleMetadata", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 204, "Length": 78, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "MCSection", "*", "RISCVELFTargetObjectFile", "::", "getSectionForConstant", "(", "const", "DataLayout", "&", "DL", ",", "SectionKind", "Kind", ",", "const", "Constant", "*", "C", ",", "Align", "&", "Alignment", ")", "const", "{", "if", "(", "isConstantInSmallSection", "(", "DL", ",", "C", ")", ")", "return", "SmallDataSection", ";", "return", "TargetLoweringObjectFileELF", "::", "getSectionForConstant", "(", "DL", ",", "Kind", ",", "C", ",", "Alignment", ")", ";", "}", ""], "natrual_language": ["Given", "a", "constant", "with", "the", "SectionKind", ",", "return", "a", "section", "that", "it", "should", "be", "placed", "in", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetObjectFile", "Func": "getSectionForConstant", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 205, "Length": 52, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVELFTargetObjectFile", "::", "Initialize", "(", "MCContext", "&", "Ctx", ",", "const", "TargetMachine", "&", "TM", ")", "{", "TargetLoweringObjectFileELF", "::", "Initialize", "(", "Ctx", ",", "TM", ")", ";", "SmallDataSection", "=", "getContext", "(", ")", ".", "getELFSection", "(", "\".sdata\"", ",", "ELF", "::", "SHT_PROGBITS", ",", "ELF", "::", "SHF_WRITE", "|", "ELF", "::", "SHF_ALLOC", ")", ";", "SmallBSSSection", "=", "getContext", "(", ")", ".", "getELFSection", "(", "\".sbss\"", ",", "ELF", "::", "SHT_NOBITS", ",", "ELF", "::", "SHF_WRITE", "|", "ELF", "::", "SHF_ALLOC", ")", ";", "}", ""], "natrual_language": ["This", "method", "must", "be", "called", "before", "any", "actual", "lowering", "is", "done", "."], "TS_V_token": ["RI5CY", "RISCV", "\".sdata\"", "\".sbss\""], "File": "RISCVTargetObjectFile", "Func": "Initialize", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 206, "Length": 71, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVELFTargetObjectFile", "::", "isConstantInSmallSection", "(", "const", "DataLayout", "&", "DL", ",", "const", "Constant", "*", "CN", ")", "const", "{", "return", "isInSmallSection", "(", "DL", ".", "getTypeAllocSize", "(", "CN", "->", "getType", "(", ")", ")", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "this", "constant", "should", "be", "placed", "into", "small", "data", "section", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetObjectFile", "Func": "isConstantInSmallSection", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 207, "Length": 33, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVELFTargetObjectFile", "::", "isGlobalInSmallSection", "(", "const", "GlobalObject", "*", "GO", ",", "const", "TargetMachine", "&", "TM", ")", "const", "{", "const", "GlobalVariable", "*", "GVA", "=", "dyn_cast", "<", "GlobalVariable", ">", "(", "GO", ")", ";", "if", "(", "!", "GVA", ")", "return", "false", ";", "if", "(", "GVA", "->", "hasSection", "(", ")", ")", "{", "StringRef", "Section", "=", "GVA", "->", "getSection", "(", ")", ";", "if", "(", "Section", "==", "\".sdata\"", "||", "Section", "==", "\".sbss\"", ")", "return", "true", ";", "return", "false", ";", "}", "if", "(", "(", "(", "GVA", "->", "hasExternalLinkage", "(", ")", "&&", "GVA", "->", "isDeclaration", "(", ")", ")", "||", "GVA", "->", "hasCommonLinkage", "(", ")", ")", ")", "return", "false", ";", "Type", "*", "Ty", "=", "GVA", "->", "getValueType", "(", ")", ";", "if", "(", "!", "Ty", "->", "isSized", "(", ")", ")", "return", "false", ";", "return", "isInSmallSection", "(", "GVA", "->", "getParent", "(", ")", "->", "getDataLayout", "(", ")", ".", "getTypeAllocSize", "(", "Ty", ")", ")", ";", "}", ""], "natrual_language": ["Return", "true", "if", "this", "global", "address", "should", "be", "placed", "into", "small", "data/bss", "section", "."], "TS_V_token": ["RI5CY", "RISCV", "\".sdata\"", "\".sbss\""], "File": "RISCVTargetObjectFile", "Func": "isGlobalInSmallSection", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 208, "Length": 142, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVTargetStreamer", "::", "emitTargetAttributes", "(", "const", "MCSubtargetInfo", "&", "STI", ")", "{", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureRV32E", ")", ")", "emitAttribute", "(", "RISCVAttrs", "::", "STACK_ALIGN", ",", "RISCVAttrs", "::", "ALIGN_4", ")", ";", "else", "emitAttribute", "(", "RISCVAttrs", "::", "STACK_ALIGN", ",", "RISCVAttrs", "::", "ALIGN_16", ")", ";", "std", "::", "string", "Arch", "=", "\"rv32\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "Feature64Bit", ")", ")", "Arch", "=", "\"rv64\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureRV32E", ")", ")", "Arch", "+=", "\"e1p9\"", ";", "else", "Arch", "+=", "\"i2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtM", ")", ")", "Arch", "+=", "\"_m2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtA", ")", ")", "Arch", "+=", "\"_a2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtF", ")", ")", "Arch", "+=", "\"_f2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtD", ")", ")", "Arch", "+=", "\"_d2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtC", ")", ")", "Arch", "+=", "\"_c2p0\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtB", ")", ")", "Arch", "+=", "\"_b0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtV", ")", ")", "Arch", "+=", "\"_v0p10\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZfh", ")", ")", "Arch", "+=", "\"_zfh0p1\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZba", ")", ")", "Arch", "+=", "\"_zba0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbb", ")", ")", "Arch", "+=", "\"_zbb0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbc", ")", ")", "Arch", "+=", "\"_zbc0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbe", ")", ")", "Arch", "+=", "\"_zbe0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbf", ")", ")", "Arch", "+=", "\"_zbf0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbm", ")", ")", "Arch", "+=", "\"_zbm0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbp", ")", ")", "Arch", "+=", "\"_zbp0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbproposedc", ")", ")", "Arch", "+=", "\"_zbproposedc0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbr", ")", ")", "Arch", "+=", "\"_zbr0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbs", ")", ")", "Arch", "+=", "\"_zbs0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZbt", ")", ")", "Arch", "+=", "\"_zbt0p93\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureExtZvamo", ")", ")", "Arch", "+=", "\"_zvamo0p10\"", ";", "if", "(", "STI", ".", "hasFeature", "(", "RISCV", "::", "FeatureStdExtZvlsseg", ")", ")", "Arch", "+=", "\"_zvlsseg0p10\"", ";", "emitTextAttribute", "(", "RISCVAttrs", "::", "ARCH", ",", "Arch", ")", ";", "}", ""], "natrual_language": ["Emit", "the", "build", "attributes", "that", "only", "depend", "on", "the", "hardware", "that", "we", "expect", "."], "TS_V_token": ["RI5CY", "RISCV", "RISCV::FeatureRV32E", "RISCVAttrs::STACK_ALIGN", "RISCVAttrs::ALIGN_4", "RISCVAttrs::STACK_ALIGN", "RISCVAttrs::ALIGN_16", "\"rv32\"", "RISCV::Feature64Bit", "\"rv64\"", "RISCV::FeatureRV32E", "\"e1p9\"", "\"i2p0\"", "RISCV::FeatureStdExtM", "\"_m2p0\"", "RISCV::FeatureStdExtA", "\"_a2p0\"", "RISCV::FeatureStdExtF", "\"_f2p0\"", "RISCV::FeatureStdExtD", "\"_d2p0\"", "RISCV::FeatureStdExtC", "\"_c2p0\"", "RISCV::FeatureStdExtB", "\"_b0p93\"", "RISCV::FeatureStdExtV", "\"_v0p10\"", "RISCV::FeatureExtZfh", "\"_zfh0p1\"", "RISCV::FeatureExtZba", "\"_zba0p93\"", "RISCV::FeatureExtZbb", "\"_zbb0p93\"", "RISCV::FeatureExtZbc", "\"_zbc0p93\"", "RISCV::FeatureExtZbe", "\"_zbe0p93\"", "RISCV::FeatureExtZbf", "\"_zbf0p93\"", "RISCV::FeatureExtZbm", "\"_zbm0p93\"", "RISCV::FeatureExtZbp", "\"_zbp0p93\"", "RISCV::FeatureExtZbproposedc", "\"_zbproposedc0p93\"", "RISCV::FeatureExtZbr", "\"_zbr0p93\"", "RISCV::FeatureExtZbs", "\"_zbs0p93\"", "RISCV::FeatureExtZbt", "\"_zbt0p93\"", "RISCV::FeatureExtZvamo", "\"_zvamo0p10\"", "RISCV::FeatureStdExtZvlsseg", "\"_zvlsseg0p10\"", "RISCVAttrs::ARCH"], "File": "RISCVTargetStreamer", "Func": "emitTargetAttributes", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 209, "Length": 412, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "RISCVTargetStreamer", "::", "finish", "(", ")", "{", "finishAttributeSection", "(", ")", ";", "}", ""], "natrual_language": ["finish", "-", "after", "all", "the", "new", "live", "ranges", "have", "been", "created", ",", "compute", "the", "remaining", "live", "range", ",", "and", "rewrite", "instructions", "to", "use", "the", "new", "registers", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetStreamer", "Func": "finish", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 210, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "int", "RISCVTTIImpl", "::", "getIntImmCost", "(", "const", "APInt", "&", "Imm", ",", "Type", "*", "Ty", ",", "TTI", "::", "TargetCostKind", "CostKind", ")", "{", "assert", "(", "Ty", "->", "isIntegerTy", "(", ")", "&&", "\"getIntImmCost can only estimate cost of materialising integers\"", ")", ";", "if", "(", "Imm", "==", "0", ")", "return", "TTI", "::", "TCC_Free", ";", "const", "DataLayout", "&", "DL", "=", "getDataLayout", "(", ")", ";", "return", "RISCVMatInt", "::", "getIntMatCost", "(", "Imm", ",", "DL", ".", "getTypeSizeInBits", "(", "Ty", ")", ",", "getST", "(", ")", "->", "is64Bit", "(", ")", ")", ";", "}", ""], "natrual_language": ["Calculate", "the", "cost", "of", "materializing", "a", "64-bit", "value", "."], "TS_V_token": ["RI5CY", "RISCV", "\"getIntImmCost can only estimate cost of materialising integers\"", "0", "RISCVMatInt::getIntMatCost"], "File": "RISCVTargetTransformInfo", "Func": "getIntImmCost", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 211, "Length": 75, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "int", "RISCVTTIImpl", "::", "getIntImmCostInst", "(", "unsigned", "Opcode", ",", "unsigned", "Idx", ",", "const", "APInt", "&", "Imm", ",", "Type", "*", "Ty", ",", "TTI", "::", "TargetCostKind", "CostKind", ",", "Instruction", "*", "Inst", ")", "{", "assert", "(", "Ty", "->", "isIntegerTy", "(", ")", "&&", "\"getIntImmCost can only estimate cost of materialising integers\"", ")", ";", "if", "(", "Imm", "==", "0", ")", "return", "TTI", "::", "TCC_Free", ";", "bool", "Takes12BitImm", "=", "false", ";", "unsigned", "ImmArgIdx", "=", "~", "0U", ";", "switch", "(", "Opcode", ")", "{", "case", "Instruction", "::", "GetElementPtr", ":", "return", "TTI", "::", "TCC_Free", ";", "case", "Instruction", "::", "Add", ":", "case", "Instruction", "::", "And", ":", "case", "Instruction", "::", "Or", ":", "case", "Instruction", "::", "Xor", ":", "case", "Instruction", "::", "Mul", ":", "Takes12BitImm", "=", "true", ";", "break", ";", "case", "Instruction", "::", "Sub", ":", "case", "Instruction", "::", "Shl", ":", "case", "Instruction", "::", "LShr", ":", "case", "Instruction", "::", "AShr", ":", "Takes12BitImm", "=", "true", ";", "ImmArgIdx", "=", "1", ";", "break", ";", "default", ":", "break", ";", "}", "if", "(", "Takes12BitImm", ")", "{", "if", "(", "Instruction", "::", "isCommutative", "(", "Opcode", ")", "||", "Idx", "==", "ImmArgIdx", ")", "{", "if", "(", "Imm", ".", "getMinSignedBits", "(", ")", "<=", "64", "&&", "getTLI", "(", ")", "->", "isLegalAddImmediate", "(", "Imm", ".", "getSExtValue", "(", ")", ")", ")", "{", "return", "TTI", "::", "TCC_Free", ";", "}", "}", "return", "getIntImmCost", "(", "Imm", ",", "Ty", ",", "CostKind", ")", ";", "}", "return", "TTI", "::", "TCC_Free", ";", "}", ""], "natrual_language": ["Return", "the", "expected", "cost", "of", "materialization", "for", "the", "given", "integer", "immediate", "of", "the", "specified", "type", "for", "a", "given", "instruction", "."], "TS_V_token": ["RI5CY", "RISCV", "\"getIntImmCost can only estimate cost of materialising integers\"", "0", "0U", "1", "64"], "File": "RISCVTargetTransformInfo", "Func": "getIntImmCostInst", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 212, "Length": 211, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "const", "RISCVTargetLowering", "*", "getTLI", "(", ")", "const", "{", "return", "TLI", ";", "}", ""], "natrual_language": ["Getter", "for", "generic", "TargetLowering", "class", "."], "TS_V_token": ["RI5CY", "RISCV"], "File": "RISCVTargetTransformInfo", "Func": "getTLI", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 213, "Length": 12, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "RISCVTTIImpl", "::", "isLoweredToCall", "(", "const", "Function", "*", "F", ")", "{", "if", "(", "F", "->", "getName", "(", ")", ".", "startswith", "(", "\"llvm.riscv.pulp\"", ")", ")", "return", "false", ";", "return", "BaseT", "::", "isLoweredToCall", "(", "F", ")", ";", "}", ""], "natrual_language": ["Test", "whether", "calls", "to", "a", "function", "lower", "to", "actual", "program", "function", "calls", "."], "TS_V_token": ["RI5CY", "RISCV", "\"llvm.riscv.pulp\""], "File": "RISCVTargetTransformInfo", "Func": "isLoweredToCall", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 214, "Length": 36, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "StringRef", "getPassName", "(", ")", "const", "override", "{", "return", "SNITCH_FREP_LOOPS_NAME", ";", "}", ""], "natrual_language": ["getPassName", "-", "Return", "a", "nice", "clean", "name", "for", "a", "pass", "."], "TS_V_token": ["RI5CY"], "File": "SNITCHFrepLoops", "Func": "getPassName", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 215, "Length": 11, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "SNITCHFrepLoops", "::", "isDead", "(", "const", "MachineInstr", "*", "MI", ",", "SmallVectorImpl", "<", "MachineInstr", "*", ">", "&", "DeadPhis", ")", "const", "{", "for", "(", "unsigned", "i", "=", "0", ",", "e", "=", "MI", "->", "getNumOperands", "(", ")", ";", "i", "!=", "e", ";", "++", "i", ")", "{", "const", "MachineOperand", "&", "MO", "=", "MI", "->", "getOperand", "(", "i", ")", ";", "if", "(", "!", "MO", ".", "isReg", "(", ")", "||", "!", "MO", ".", "isDef", "(", ")", ")", "continue", ";", "unsigned", "Reg", "=", "MO", ".", "getReg", "(", ")", ";", "if", "(", "MRI", "->", "use_nodbg_empty", "(", "Reg", ")", ")", "continue", ";", "using", "use_nodbg_iterator", "=", "MachineRegisterInfo", "::", "use_nodbg_iterator", ";", "use_nodbg_iterator", "I", "=", "MRI", "->", "use_nodbg_begin", "(", "Reg", ")", ";", "use_nodbg_iterator", "End", "=", "MRI", "->", "use_nodbg_end", "(", ")", ";", "if", "(", "std", "::", "next", "(", "I", ")", "!=", "End", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\" not dead because >2 uses\\n\"", ")", ";", "return", "false", ";", "}", "if", "(", "!", "I", "->", "getParent", "(", ")", "->", "isPHI", "(", ")", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\" not dead because use is not PHI\\n\"", ")", ";", "return", "false", ";", "}", "MachineInstr", "*", "UsePhi", "=", "I", "->", "getParent", "(", ")", ";", "for", "(", "unsigned", "j", "=", "0", ",", "f", "=", "UsePhi", "->", "getNumOperands", "(", ")", ";", "j", "!=", "f", ";", "++", "j", ")", "{", "const", "MachineOperand", "&", "OPO", "=", "UsePhi", "->", "getOperand", "(", "j", ")", ";", "if", "(", "!", "OPO", ".", "isReg", "(", ")", "||", "!", "OPO", ".", "isDef", "(", ")", ")", "continue", ";", "unsigned", "OPReg", "=", "OPO", ".", "getReg", "(", ")", ";", "use_nodbg_iterator", "nextJ", ";", "for", "(", "use_nodbg_iterator", "J", "=", "MRI", "->", "use_nodbg_begin", "(", "OPReg", ")", ";", "J", "!=", "End", ";", "J", "=", "nextJ", ")", "{", "nextJ", "=", "std", "::", "next", "(", "J", ")", ";", "MachineOperand", "&", "Use", "=", "*", "J", ";", "MachineInstr", "*", "UseMI", "=", "Use", ".", "getParent", "(", ")", ";", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\" checking use:\\n\"", ";", "UseMI", "->", "dump", "(", ")", ")", ";", "if", "(", "MI", "!=", "UseMI", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\" not dead because the phi node has a user that is not MI\\n\"", ")", ";", "return", "false", ";", "}", "}", "}", "DeadPhis", ".", "push_back", "(", "UsePhi", ")", ";", "}", "return", "true", ";", "}", ""], "natrual_language": ["isDead", "-", "Returns", "true", "if", "this", "is", "a", "dead", "def", "kill", "slot", "."], "TS_V_token": ["RI5CY", "0", "\" not dead because >2 uses\\n\"", "\" not dead because use is not PHI\\n\"", "0", "\" checking use:\\n\"", "\" not dead because the phi node has a user that is not MI\\n\""], "File": "SNITCHFrepLoops", "Func": "isDead", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 216, "Length": 342, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "void", "print", "(", "raw_ostream", "&", "OS", ",", "const", "TargetRegisterInfo", "*", "TRI", "=", "nullptr", ")", "const", "{", "if", "(", "isReg", "(", ")", ")", "{", "OS", "<<", "\"register: \"", "<<", "printReg", "(", "Contents", ".", "R", ".", "Reg", ",", "TRI", ",", "Contents", ".", "R", ".", "Sub", ")", "<<", "'\\n'", ";", "}", "if", "(", "isImm", "(", ")", ")", "{", "OS", "<<", "\"immediate: \"", "<<", "Contents", ".", "ImmVal", "<<", "'\\n'", ";", "}", "}", ""], "natrual_language": ["print", "-", "Print", "a", "debug", "representation", "of", "the", "operand", "to", "the", "given", "stream", "."], "TS_V_token": ["RI5CY", "\"register: \"", "\"immediate: \""], "File": "SNITCHFrepLoops", "Func": "print", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 217, "Length": 66, "Cover_Rate": 1.0, "Template_token": []} {"ground_truth": ["", "bool", "SNITCHFrepLoops", "::", "runOnMachineFunction", "(", "MachineFunction", "&", "MF", ")", "{", "LLVM_DEBUG", "(", "dbgs", "(", ")", "<<", "\"------------ Snitch Frep Loops ------------\\n\"", ")", ";", "bool", "Changed", "=", "false", ";", "MLI", "=", "&", "getAnalysis", "<", "MachineLoopInfo", ">", "(", ")", ";", "MRI", "=", "&", "MF", ".", "getRegInfo", "(", ")", ";", "MDT", "=", "&", "getAnalysis", "<", "MachineDominatorTree", ">", "(", ")", ";", "const", "RISCVSubtarget", "&", "HST", "=", "MF", ".", "getSubtarget", "<", "RISCVSubtarget", ">", "(", ")", ";", "TII", "=", "HST", ".", "getInstrInfo", "(", ")", ";", "TRI", "=", "HST", ".", "getRegisterInfo", "(", ")", ";", "for", "(", "auto", "&", "L", ":", "*", "MLI", ")", "if", "(", "L", "->", "isOutermost", "(", ")", ")", "{", "FL", "=", "new", "FrepLoop", "(", "L", ")", ";", "Changed", "|=", "convertToHardwareLoop", "(", "L", ")", ";", "delete", "FL", ";", "}", "for", "(", "auto", "&", "MBB", ":", "MF", ")", "{", "MachineBasicBlock", "::", "iterator", "MBBI", "=", "MBB", ".", "begin", "(", ")", ",", "E", "=", "MBB", ".", "end", "(", ")", ";", "while", "(", "MBBI", "!=", "E", ")", "{", "MachineBasicBlock", "::", "iterator", "NMBBI", "=", "std", "::", "next", "(", "MBBI", ")", ";", "if", "(", "MBBI", "->", "getOpcode", "(", ")", "==", "RISCV", "::", "PseudoFrepInfer", ")", "MBBI", "->", "removeFromParent", "(", ")", ";", "MBBI", "=", "NMBBI", ";", "}", "}", "return", "Changed", ";", "}", ""], "natrual_language": ["runOnMachineFunction", "-", "Emit", "the", "function", "body", "."], "TS_V_token": ["RI5CY", "\"------------ Snitch Frep Loops ------------\\n\"", "RISCV", "RISCV", "RISCV::PseudoFrepInfer"], "File": "SNITCHFrepLoops", "Func": "runOnMachineFunction", "Target": "RI5CY", "Target_Clf": "CPU", "Compiler_Type": "LLVM", "Idx": 218, "Length": 195, "Cover_Rate": 1.0, "Template_token": []}