ground_truth
sequencelengths 8
512
| natrual_language
sequencelengths 1
243
| TS_V_token
sequencelengths 1
182
| File
stringlengths 2
45
| Func
stringlengths 1
56
| Target
stringclasses 175
values | Target_Clf
stringclasses 6
values | Compiler_Type
stringclasses 2
values | Idx
int64 0
36.2k
| Length
int64 6
510
| Cover_Rate
float64 1
1
| Template_token
sequencelengths 0
0
|
---|---|---|---|---|---|---|---|---|---|---|---|
[
"<s>",
"Type",
"*",
"ARMTargetLowering",
"::",
"shouldConvertSplatType",
"(",
"ShuffleVectorInst",
"*",
"SVI",
")",
"const",
"{",
"if",
"(",
"!",
"Subtarget",
"->",
"hasMVEIntegerOps",
"(",
")",
")",
"return",
"nullptr",
";",
"Type",
"*",
"SVIType",
"=",
"SVI",
"->",
"getType",
"(",
")",
";",
"Type",
"*",
"ScalarType",
"=",
"SVIType",
"->",
"getScalarType",
"(",
")",
";",
"if",
"(",
"ScalarType",
"->",
"isFloatTy",
"(",
")",
")",
"return",
"Type",
"::",
"getInt32Ty",
"(",
"SVIType",
"->",
"getContext",
"(",
")",
")",
";",
"if",
"(",
"ScalarType",
"->",
"isHalfTy",
"(",
")",
")",
"return",
"Type",
"::",
"getInt16Ty",
"(",
"SVIType",
"->",
"getContext",
"(",
")",
")",
";",
"return",
"nullptr",
";",
"}",
"</s>"
] | [
"Given",
"a",
"shuffle",
"vector",
"SVI",
"representing",
"a",
"vector",
"splat",
",",
"return",
"a",
"new",
"scalar",
"type",
"of",
"size",
"equal",
"to",
"SVI",
"'s",
"scalar",
"type",
"if",
"the",
"new",
"type",
"is",
"more",
"profitable",
"."
] | [
"ARM",
"ARM"
] | ARMISelLowering (2)5 | shouldConvertSplatType | ARM | CPU | LLVM | 3,500 | 88 | 1 | [] |
[
"<s>",
"static",
"tree",
"find_sole_member",
"(",
"tree",
"type",
")",
"{",
"tree",
"field",
",",
"member",
"=",
"NULL_TREE",
";",
"for",
"(",
"field",
"=",
"TYPE_FIELDS",
"(",
"type",
")",
";",
"field",
";",
"field",
"=",
"DECL_CHAIN",
"(",
"field",
")",
")",
"{",
"if",
"(",
"TREE_CODE",
"(",
"field",
")",
"!=",
"FIELD_DECL",
")",
"continue",
";",
"if",
"(",
"!",
"DECL_SIZE",
"(",
"field",
")",
")",
"return",
"NULL_TREE",
";",
"if",
"(",
"integer_zerop",
"(",
"DECL_SIZE",
"(",
"field",
")",
")",
")",
"continue",
";",
"if",
"(",
"member",
")",
"return",
"NULL_TREE",
";",
"member",
"=",
"field",
";",
"}",
"return",
"member",
";",
"}",
"</s>"
] | [
"TYPE",
"is",
"a",
"RECORD_TYPE",
".",
"If",
"there",
"is",
"only",
"a",
"single",
"non-zero-sized",
"member",
",",
"return",
"it",
"."
] | [
"sh"
] | sh | find_sole_member | sh | CPU | GCC | 3,501 | 84 | 1 | [] |
[
"<s>",
"unsigned",
"Cpu0RegisterInfo",
"::",
"getFrameRegister",
"(",
"const",
"MachineFunction",
"&",
"MF",
")",
"const",
"{",
"const",
"TargetFrameLowering",
"*",
"TFI",
"=",
"MF",
".",
"getSubtarget",
"(",
")",
".",
"getFrameLowering",
"(",
")",
";",
"return",
"TFI",
"->",
"hasFP",
"(",
"MF",
")",
"?",
"(",
"Cpu0",
"::",
"FP",
")",
":",
"(",
"Cpu0",
"::",
"SP",
")",
";",
"}",
"</s>"
] | [
"Debug",
"information",
"queries",
"."
] | [
"Cpu0",
"Cpu0",
"Cpu0::FP",
"Cpu0::SP"
] | Cpu0RegisterInfo4 | getFrameRegister | Cpu0 | CPU | LLVM | 3,502 | 48 | 1 | [] |
[
"<s>",
"static",
"int",
"aarch64_rtx_mult_cost",
"(",
"rtx",
"x",
",",
"int",
"code",
",",
"int",
"outer",
",",
"bool",
"speed",
")",
"{",
"rtx",
"op0",
",",
"op1",
";",
"const",
"struct",
"cpu_cost_table",
"*",
"extra_cost",
"=",
"aarch64_tune_params",
"->",
"insn_extra_cost",
";",
"int",
"cost",
"=",
"0",
";",
"bool",
"maybe_fma",
"=",
"(",
"outer",
"==",
"PLUS",
"||",
"outer",
"==",
"MINUS",
")",
";",
"machine_mode",
"mode",
"=",
"GET_MODE",
"(",
"x",
")",
";",
"gcc_checking_assert",
"(",
"code",
"==",
"MULT",
")",
";",
"op0",
"=",
"XEXP",
"(",
"x",
",",
"0",
")",
";",
"op1",
"=",
"XEXP",
"(",
"x",
",",
"1",
")",
";",
"if",
"(",
"VECTOR_MODE_P",
"(",
"mode",
")",
")",
"mode",
"=",
"GET_MODE_INNER",
"(",
"mode",
")",
";",
"if",
"(",
"GET_MODE_CLASS",
"(",
"mode",
")",
"==",
"MODE_INT",
")",
"{",
"if",
"(",
"CONST_INT_P",
"(",
"op1",
")",
"&&",
"exact_log2",
"(",
"INTVAL",
"(",
"op1",
")",
")",
">",
"0",
")",
"{",
"if",
"(",
"speed",
")",
"{",
"if",
"(",
"maybe_fma",
")",
"cost",
"+=",
"extra_cost",
"->",
"alu",
".",
"arith_shift",
";",
"else",
"cost",
"+=",
"extra_cost",
"->",
"alu",
".",
"shift",
";",
"}",
"cost",
"+=",
"rtx_cost",
"(",
"op0",
",",
"GET_CODE",
"(",
"op0",
")",
",",
"0",
",",
"speed",
")",
";",
"return",
"cost",
";",
"}",
"if",
"(",
"(",
"GET_CODE",
"(",
"op0",
")",
"==",
"ZERO_EXTEND",
"&&",
"GET_CODE",
"(",
"op1",
")",
"==",
"ZERO_EXTEND",
")",
"||",
"(",
"GET_CODE",
"(",
"op0",
")",
"==",
"SIGN_EXTEND",
"&&",
"GET_CODE",
"(",
"op1",
")",
"==",
"SIGN_EXTEND",
")",
")",
"{",
"cost",
"+=",
"rtx_cost",
"(",
"XEXP",
"(",
"op0",
",",
"0",
")",
",",
"MULT",
",",
"0",
",",
"speed",
")",
"+",
"rtx_cost",
"(",
"XEXP",
"(",
"op1",
",",
"0",
")",
",",
"MULT",
",",
"1",
",",
"speed",
")",
";",
"if",
"(",
"speed",
")",
"{",
"if",
"(",
"maybe_fma",
")",
"cost",
"+=",
"extra_cost",
"->",
"mult",
"[",
"0",
"]",
".",
"extend_add",
";",
"else",
"cost",
"+=",
"extra_cost",
"->",
"mult",
"[",
"0",
"]",
".",
"extend",
";",
"}",
"return",
"cost",
";",
"}",
"cost",
"+=",
"rtx_cost",
"(",
"op0",
",",
"MULT",
",",
"0",
",",
"speed",
")",
"+",
"rtx_cost",
"(",
"op1",
",",
"MULT",
",",
"1",
",",
"speed",
")",
";",
"if",
"(",
"speed",
")",
"{",
"if",
"(",
"maybe_fma",
")",
"cost",
"+=",
"extra_cost",
"->",
"mult",
"[",
"mode",
"==",
"DImode",
"]",
".",
"add",
";",
"else",
"cost",
"+=",
"extra_cost",
"->",
"mult",
"[",
"mode",
"==",
"DImode",
"]",
".",
"simple",
";",
"}",
"return",
"cost",
";",
"}",
"else",
"{",
"if",
"(",
"speed",
")",
"{",
"if",
"(",
"GET_CODE",
"(",
"op0",
")",
"==",
"NEG",
")",
"op0",
"=",
"XEXP",
"(",
"op0",
",",
"0",
")",
";",
"if",
"(",
"GET_CODE",
"(",
"op1",
")",
"==",
"NEG",
")",
"op1",
"=",
"XEXP",
"(",
"op1",
",",
"0",
")",
";",
"if",
"(",
"maybe_fma",
")",
"cost",
"+=",
"extra_cost",
"->",
"fp",
"[",
"mode",
"==",
"DFmode",
"]",
".",
"fma",
";",
"else",
"cost",
"+=",
"extra_cost",
"->",
"fp",
"[",
"mode",
"==",
"DFmode",
"]",
".",
"mult",
";",
"}",
"cost",
"+=",
"rtx_cost",
"(",
"op0",
",",
"MULT",
",",
"0",
",",
"speed",
")",
"+",
"rtx_cost",
"(",
"op1",
",",
"MULT",
",",
"1",
",",
"speed",
")",
";",
"return",
"cost",
";",
"}",
"}",
"</s>"
] | [
"Helper",
"function",
"for",
"rtx",
"cost",
"calculation",
".",
"Calculate",
"the",
"cost",
"of",
"a",
"MULT",
",",
"which",
"may",
"be",
"part",
"of",
"a",
"multiply-accumulate",
"rtx",
".",
"Return",
"the",
"calculated",
"cost",
"of",
"the",
"expression",
",",
"recursing",
"manually",
"in",
"to",
"operands",
"where",
"needed",
"."
] | [
"aarch64",
"0",
"0",
"1",
"0",
"0",
"0",
"0",
"0",
"1",
"0",
"0",
"0",
"1",
"0",
"0",
"0",
"1"
] | aarch642 | aarch64_rtx_mult_cost | aarch64 | CPU | GCC | 3,503 | 447 | 1 | [] |
[
"<s>",
"static",
"rtx",
"gen_vsetvl_pat",
"(",
"rtx_insn",
"*",
"rinsn",
",",
"const",
"vector_insn_info",
"&",
"info",
")",
"{",
"rtx",
"new_pat",
";",
"vl_vtype_info",
"new_info",
"=",
"info",
";",
"if",
"(",
"info",
".",
"get_insn",
"(",
")",
"&&",
"info",
".",
"get_insn",
"(",
")",
"->",
"rtl",
"(",
")",
"&&",
"fault_first_load_p",
"(",
"info",
".",
"get_insn",
"(",
")",
"->",
"rtl",
"(",
")",
")",
")",
"new_info",
".",
"set_avl_info",
"(",
"avl_info",
"(",
"get_avl",
"(",
"info",
".",
"get_insn",
"(",
")",
"->",
"rtl",
"(",
")",
")",
",",
"nullptr",
")",
")",
";",
"if",
"(",
"vsetvl_insn_p",
"(",
"rinsn",
")",
"||",
"vlmax_avl_p",
"(",
"info",
".",
"get_avl",
"(",
")",
")",
")",
"{",
"rtx",
"dest",
"=",
"get_vl",
"(",
"rinsn",
")",
";",
"new_pat",
"=",
"gen_vsetvl_pat",
"(",
"VSETVL_NORMAL",
",",
"new_info",
",",
"dest",
")",
";",
"}",
"else",
"if",
"(",
"INSN_CODE",
"(",
"rinsn",
")",
"==",
"CODE_FOR_vsetvl_vtype_change_only",
")",
"new_pat",
"=",
"gen_vsetvl_pat",
"(",
"VSETVL_VTYPE_CHANGE_ONLY",
",",
"new_info",
",",
"NULL_RTX",
")",
";",
"else",
"new_pat",
"=",
"gen_vsetvl_pat",
"(",
"VSETVL_DISCARD_RESULT",
",",
"new_info",
",",
"NULL_RTX",
")",
";",
"return",
"new_pat",
";",
"}",
"</s>"
] | [
"Emit",
"vsetvl",
"instruction",
"."
] | [
"riscv"
] | riscv-vsetvl | gen_vsetvl_pat | riscv | CPU | GCC | 3,504 | 150 | 1 | [] |
[
"<s>",
"const",
"uint32_t",
"*",
"SystemZRegisterInfo",
"::",
"getCallPreservedMask",
"(",
"const",
"MachineFunction",
"&",
"MF",
",",
"CallingConv",
"::",
"ID",
"CC",
")",
"const",
"{",
"if",
"(",
"MF",
".",
"getSubtarget",
"(",
")",
".",
"getTargetLowering",
"(",
")",
"->",
"supportSwiftError",
"(",
")",
"&&",
"MF",
".",
"getFunction",
"(",
")",
"->",
"getAttributes",
"(",
")",
".",
"hasAttrSomewhere",
"(",
"Attribute",
"::",
"SwiftError",
")",
")",
"return",
"CSR_SystemZ_SwiftError_RegMask",
";",
"return",
"CSR_SystemZ_RegMask",
";",
"}",
"</s>"
] | [
"Return",
"a",
"mask",
"of",
"call-preserved",
"registers",
"for",
"the",
"given",
"calling",
"convention",
"on",
"the",
"current",
"function",
"."
] | [
"SystemZ",
"SystemZ",
"SystemZ",
"SystemZ"
] | SystemZRegisterInfo12 | getCallPreservedMask | SystemZ | CPU | LLVM | 3,505 | 59 | 1 | [] |
[
"<s>",
"void",
"SITargetLowering",
"::",
"AdjustInstrPostInstrSelection",
"(",
"MachineInstr",
"*",
"MI",
",",
"SDNode",
"*",
"Node",
")",
"const",
"{",
"if",
"(",
"AMDGPU",
"::",
"isMIMG",
"(",
"MI",
"->",
"getOpcode",
"(",
")",
")",
"==",
"-",
"1",
")",
"return",
";",
"unsigned",
"VReg",
"=",
"MI",
"->",
"getOperand",
"(",
"0",
")",
".",
"getReg",
"(",
")",
";",
"unsigned",
"Writemask",
"=",
"MI",
"->",
"getOperand",
"(",
"1",
")",
".",
"getImm",
"(",
")",
";",
"unsigned",
"BitsSet",
"=",
"0",
";",
"for",
"(",
"unsigned",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"++",
"i",
")",
"BitsSet",
"+=",
"Writemask",
"&",
"(",
"1",
"<<",
"i",
")",
"?",
"1",
":",
"0",
";",
"const",
"TargetRegisterClass",
"*",
"RC",
";",
"switch",
"(",
"BitsSet",
")",
"{",
"default",
":",
"return",
";",
"case",
"1",
":",
"RC",
"=",
"&",
"AMDGPU",
"::",
"VReg_32RegClass",
";",
"break",
";",
"case",
"2",
":",
"RC",
"=",
"&",
"AMDGPU",
"::",
"VReg_64RegClass",
";",
"break",
";",
"case",
"3",
":",
"RC",
"=",
"&",
"AMDGPU",
"::",
"VReg_96RegClass",
";",
"break",
";",
"}",
"MachineRegisterInfo",
"&",
"MRI",
"=",
"MI",
"->",
"getParent",
"(",
")",
"->",
"getParent",
"(",
")",
"->",
"getRegInfo",
"(",
")",
";",
"MRI",
".",
"setRegClass",
"(",
"VReg",
",",
"RC",
")",
";",
"}",
"</s>"
] | [
"This",
"method",
"should",
"be",
"implemented",
"by",
"targets",
"that",
"mark",
"instructions",
"with",
"the",
"'hasPostISelHook",
"'",
"flag",
"."
] | [
"R600",
"SI",
"1",
"0",
"1",
"0",
"0",
"4",
"1",
"1",
"0",
"1",
"2",
"3"
] | SIISelLowering156 | AdjustInstrPostInstrSelection | R600 | GPU | LLVM | 3,506 | 173 | 1 | [] |
[
"<s>",
"static",
"tree",
"make_resolver_func",
"(",
"const",
"tree",
"default_decl",
",",
"const",
"tree",
"dispatch_decl",
",",
"basic_block",
"*",
"empty_bb",
")",
"{",
"tree",
"decl_name",
"=",
"clone_function_name",
"(",
"default_decl",
",",
"\"resolver\"",
")",
";",
"const",
"char",
"*",
"resolver_name",
"=",
"IDENTIFIER_POINTER",
"(",
"decl_name",
")",
";",
"tree",
"type",
"=",
"build_function_type_list",
"(",
"ptr_type_node",
",",
"NULL_TREE",
")",
";",
"tree",
"decl",
"=",
"build_fn_decl",
"(",
"resolver_name",
",",
"type",
")",
";",
"SET_DECL_ASSEMBLER_NAME",
"(",
"decl",
",",
"decl_name",
")",
";",
"DECL_NAME",
"(",
"decl",
")",
"=",
"decl_name",
";",
"TREE_USED",
"(",
"decl",
")",
"=",
"1",
";",
"DECL_ARTIFICIAL",
"(",
"decl",
")",
"=",
"1",
";",
"DECL_IGNORED_P",
"(",
"decl",
")",
"=",
"0",
";",
"TREE_PUBLIC",
"(",
"decl",
")",
"=",
"0",
";",
"DECL_UNINLINABLE",
"(",
"decl",
")",
"=",
"1",
";",
"DECL_EXTERNAL",
"(",
"decl",
")",
"=",
"0",
";",
"DECL_EXTERNAL",
"(",
"dispatch_decl",
")",
"=",
"0",
";",
"DECL_CONTEXT",
"(",
"decl",
")",
"=",
"NULL_TREE",
";",
"DECL_INITIAL",
"(",
"decl",
")",
"=",
"make_node",
"(",
"BLOCK",
")",
";",
"DECL_STATIC_CONSTRUCTOR",
"(",
"decl",
")",
"=",
"0",
";",
"tree",
"t",
"=",
"build_decl",
"(",
"UNKNOWN_LOCATION",
",",
"RESULT_DECL",
",",
"NULL_TREE",
",",
"ptr_type_node",
")",
";",
"DECL_ARTIFICIAL",
"(",
"t",
")",
"=",
"1",
";",
"DECL_IGNORED_P",
"(",
"t",
")",
"=",
"1",
";",
"DECL_RESULT",
"(",
"decl",
")",
"=",
"t",
";",
"gimplify_function_tree",
"(",
"decl",
")",
";",
"push_cfun",
"(",
"DECL_STRUCT_FUNCTION",
"(",
"decl",
")",
")",
";",
"*",
"empty_bb",
"=",
"init_lowered_empty_function",
"(",
"decl",
",",
"false",
",",
"profile_count",
"::",
"uninitialized",
"(",
")",
")",
";",
"cgraph_node",
"::",
"add_new_function",
"(",
"decl",
",",
"true",
")",
";",
"symtab",
"->",
"call_cgraph_insertion_hooks",
"(",
"cgraph_node",
"::",
"get_create",
"(",
"decl",
")",
")",
";",
"pop_cfun",
"(",
")",
";",
"DECL_ATTRIBUTES",
"(",
"dispatch_decl",
")",
"=",
"make_attribute",
"(",
"\"ifunc\"",
",",
"resolver_name",
",",
"DECL_ATTRIBUTES",
"(",
"dispatch_decl",
")",
")",
";",
"cgraph_node",
"::",
"create_same_body_alias",
"(",
"dispatch_decl",
",",
"decl",
")",
";",
"return",
"decl",
";",
"}",
"</s>"
] | [
"Make",
"the",
"resolver",
"function",
"decl",
"to",
"dispatch",
"the",
"versions",
"of",
"a",
"multi-",
"versioned",
"function",
",",
"DEFAULT_DECL",
".",
"Create",
"an",
"empty",
"basic",
"block",
"in",
"the",
"resolver",
"and",
"store",
"the",
"pointer",
"in",
"EMPTY_BB",
".",
"Return",
"the",
"decl",
"of",
"the",
"resolver",
"function",
"."
] | [
"rs6000",
"\"resolver\"",
"1",
"1",
"0",
"0",
"1",
"0",
"0",
"0",
"1",
"1",
"\"ifunc\""
] | rs60007 | make_resolver_func | rs6000 | CPU | GCC | 3,507 | 263 | 1 | [] |
[
"<s>",
"static",
"reg_class_t",
"s390_preferred_reload_class",
"(",
"rtx",
"op",
",",
"reg_class_t",
"rclass",
")",
"{",
"switch",
"(",
"GET_CODE",
"(",
"op",
")",
")",
"{",
"case",
"CONST_VECTOR",
":",
"case",
"CONST_DOUBLE",
":",
"case",
"CONST_INT",
":",
"case",
"CONST_WIDE_INT",
":",
"if",
"(",
"reg_class_subset_p",
"(",
"GENERAL_REGS",
",",
"rclass",
")",
"&&",
"legitimate_reload_constant_p",
"(",
"op",
")",
")",
"return",
"GENERAL_REGS",
";",
"else",
"if",
"(",
"reg_class_subset_p",
"(",
"ADDR_REGS",
",",
"rclass",
")",
"&&",
"legitimate_reload_constant_p",
"(",
"op",
")",
")",
"return",
"ADDR_REGS",
";",
"else",
"if",
"(",
"reg_class_subset_p",
"(",
"FP_REGS",
",",
"rclass",
")",
"&&",
"legitimate_reload_fp_constant_p",
"(",
"op",
")",
")",
"return",
"FP_REGS",
";",
"else",
"if",
"(",
"reg_class_subset_p",
"(",
"VEC_REGS",
",",
"rclass",
")",
"&&",
"legitimate_reload_vector_constant_p",
"(",
"op",
")",
")",
"return",
"VEC_REGS",
";",
"return",
"NO_REGS",
";",
"case",
"CONST",
":",
"if",
"(",
"GET_CODE",
"(",
"XEXP",
"(",
"op",
",",
"0",
")",
")",
"==",
"PLUS",
"&&",
"GET_CODE",
"(",
"XEXP",
"(",
"XEXP",
"(",
"op",
",",
"0",
")",
",",
"0",
")",
")",
"==",
"SYMBOL_REF",
"&&",
"GET_CODE",
"(",
"XEXP",
"(",
"XEXP",
"(",
"op",
",",
"0",
")",
",",
"1",
")",
")",
"==",
"CONST_INT",
")",
"{",
"if",
"(",
"flag_pic",
"&&",
"reg_class_subset_p",
"(",
"ADDR_REGS",
",",
"rclass",
")",
")",
"return",
"ADDR_REGS",
";",
"else",
"return",
"NO_REGS",
";",
"}",
"case",
"LABEL_REF",
":",
"case",
"SYMBOL_REF",
":",
"if",
"(",
"!",
"legitimate_reload_constant_p",
"(",
"op",
")",
")",
"return",
"NO_REGS",
";",
"case",
"PLUS",
":",
"if",
"(",
"reg_class_subset_p",
"(",
"ADDR_REGS",
",",
"rclass",
")",
")",
"return",
"ADDR_REGS",
";",
"else",
"return",
"NO_REGS",
";",
"default",
":",
"break",
";",
"}",
"return",
"rclass",
";",
"}",
"</s>"
] | [
"Given",
"an",
"rtx",
"OP",
"being",
"reloaded",
"into",
"a",
"reg",
"required",
"to",
"be",
"in",
"class",
"CLASS",
",",
"return",
"the",
"class",
"of",
"reg",
"to",
"actually",
"use",
"."
] | [
"s390",
"0",
"0",
"0",
"0",
"1"
] | s390 | s390_preferred_reload_class | s390 | MPU | GCC | 3,508 | 221 | 1 | [] |
[
"<s>",
"bool",
"XCoreTargetLowering",
"::",
"isLegalAddressingMode",
"(",
"const",
"AddrMode",
"&",
"AM",
",",
"Type",
"*",
"Ty",
")",
"const",
"{",
"if",
"(",
"Ty",
"->",
"getTypeID",
"(",
")",
"==",
"Type",
"::",
"VoidTyID",
")",
"return",
"AM",
".",
"Scale",
"==",
"0",
"&&",
"isImmUs",
"(",
"AM",
".",
"BaseOffs",
")",
"&&",
"isImmUs4",
"(",
"AM",
".",
"BaseOffs",
")",
";",
"const",
"TargetData",
"*",
"TD",
"=",
"TM",
".",
"getTargetData",
"(",
")",
";",
"unsigned",
"Size",
"=",
"TD",
"->",
"getTypeAllocSize",
"(",
"Ty",
")",
";",
"if",
"(",
"AM",
".",
"BaseGV",
")",
"{",
"return",
"Size",
">=",
"4",
"&&",
"!",
"AM",
".",
"HasBaseReg",
"&&",
"AM",
".",
"Scale",
"==",
"0",
"&&",
"AM",
".",
"BaseOffs",
"%",
"4",
"==",
"0",
";",
"}",
"switch",
"(",
"Size",
")",
"{",
"case",
"1",
":",
"if",
"(",
"AM",
".",
"Scale",
"==",
"0",
")",
"{",
"return",
"isImmUs",
"(",
"AM",
".",
"BaseOffs",
")",
";",
"}",
"return",
"AM",
".",
"Scale",
"==",
"1",
"&&",
"AM",
".",
"BaseOffs",
"==",
"0",
";",
"case",
"2",
":",
"case",
"3",
":",
"if",
"(",
"AM",
".",
"Scale",
"==",
"0",
")",
"{",
"return",
"isImmUs2",
"(",
"AM",
".",
"BaseOffs",
")",
";",
"}",
"return",
"AM",
".",
"Scale",
"==",
"2",
"&&",
"AM",
".",
"BaseOffs",
"==",
"0",
";",
"default",
":",
"if",
"(",
"AM",
".",
"Scale",
"==",
"0",
")",
"{",
"return",
"isImmUs4",
"(",
"AM",
".",
"BaseOffs",
")",
";",
"}",
"return",
"AM",
".",
"Scale",
"==",
"4",
"&&",
"AM",
".",
"BaseOffs",
"==",
"0",
";",
"}",
"return",
"false",
";",
"}",
"</s>"
] | [
"isLegalAddressingMode",
"-",
"Return",
"true",
"if",
"the",
"addressing",
"mode",
"represented",
"by",
"AM",
"is",
"legal",
"for",
"this",
"target",
",",
"for",
"a",
"load/store",
"of",
"the",
"specified",
"type",
"."
] | [
"XCore",
"XCore",
"0",
"4",
"0",
"4",
"0",
"1",
"0",
"1",
"0",
"2",
"3",
"0",
"2",
"0",
"0",
"4",
"0"
] | XCoreISelLowering7 | isLegalAddressingMode | XCore | MPU | LLVM | 3,509 | 216 | 1 | [] |
[
"<s>",
"SDValue",
"ARMSelectionDAGInfo",
"::",
"EmitTargetCodeForMemset",
"(",
"SelectionDAG",
"&",
"DAG",
",",
"SDLoc",
"dl",
",",
"SDValue",
"Chain",
",",
"SDValue",
"Dst",
",",
"SDValue",
"Src",
",",
"SDValue",
"Size",
",",
"unsigned",
"Align",
",",
"bool",
"isVolatile",
",",
"MachinePointerInfo",
"DstPtrInfo",
")",
"const",
"{",
"if",
"(",
"!",
"Subtarget",
"->",
"isAAPCS_ABI",
"(",
")",
"||",
"Subtarget",
"->",
"isTargetDarwin",
"(",
")",
")",
"return",
"SDValue",
"(",
")",
";",
"const",
"ARMTargetLowering",
"&",
"TLI",
"=",
"*",
"static_cast",
"<",
"const",
"ARMTargetLowering",
"*",
">",
"(",
"DAG",
".",
"getTarget",
"(",
")",
".",
"getTargetLowering",
"(",
")",
")",
";",
"TargetLowering",
"::",
"ArgListTy",
"Args",
";",
"TargetLowering",
"::",
"ArgListEntry",
"Entry",
";",
"Type",
"*",
"IntPtrTy",
"=",
"TLI",
".",
"getDataLayout",
"(",
")",
"->",
"getIntPtrType",
"(",
"*",
"DAG",
".",
"getContext",
"(",
")",
")",
";",
"Entry",
".",
"Node",
"=",
"Dst",
";",
"Entry",
".",
"Ty",
"=",
"IntPtrTy",
";",
"Args",
".",
"push_back",
"(",
"Entry",
")",
";",
"Entry",
".",
"Node",
"=",
"Size",
";",
"Entry",
".",
"Ty",
"=",
"IntPtrTy",
";",
"Entry",
".",
"isSExt",
"=",
"false",
";",
"Args",
".",
"push_back",
"(",
"Entry",
")",
";",
"if",
"(",
"Src",
".",
"getValueType",
"(",
")",
".",
"bitsGT",
"(",
"MVT",
"::",
"i32",
")",
")",
"Src",
"=",
"DAG",
".",
"getNode",
"(",
"ISD",
"::",
"TRUNCATE",
",",
"dl",
",",
"MVT",
"::",
"i32",
",",
"Src",
")",
";",
"else",
"Src",
"=",
"DAG",
".",
"getNode",
"(",
"ISD",
"::",
"ZERO_EXTEND",
",",
"dl",
",",
"MVT",
"::",
"i32",
",",
"Src",
")",
";",
"Entry",
".",
"Node",
"=",
"Src",
";",
"Entry",
".",
"Ty",
"=",
"Type",
"::",
"getInt32Ty",
"(",
"*",
"DAG",
".",
"getContext",
"(",
")",
")",
";",
"Entry",
".",
"isSExt",
"=",
"true",
";",
"Args",
".",
"push_back",
"(",
"Entry",
")",
";",
"TargetLowering",
"::",
"CallLoweringInfo",
"CLI",
"(",
"Chain",
",",
"Type",
"::",
"getVoidTy",
"(",
"*",
"DAG",
".",
"getContext",
"(",
")",
")",
",",
"false",
",",
"false",
",",
"false",
",",
"false",
",",
"0",
",",
"TLI",
".",
"getLibcallCallingConv",
"(",
"RTLIB",
"::",
"MEMSET",
")",
",",
"false",
",",
"false",
",",
"false",
",",
"DAG",
".",
"getExternalSymbol",
"(",
"TLI",
".",
"getLibcallName",
"(",
"RTLIB",
"::",
"MEMSET",
")",
",",
"TLI",
".",
"getPointerTy",
"(",
")",
")",
",",
"Args",
",",
"DAG",
",",
"dl",
")",
";",
"std",
"::",
"pair",
"<",
"SDValue",
",",
"SDValue",
">",
"CallResult",
"=",
"TLI",
".",
"LowerCallTo",
"(",
"CLI",
")",
";",
"return",
"CallResult",
".",
"second",
";",
"}",
"</s>"
] | [
"Emit",
"target-specific",
"code",
"that",
"performs",
"a",
"memset",
"."
] | [
"ARM",
"ARM",
"ARM",
"ARM",
"MVT::i32",
"ISD::TRUNCATE",
"MVT::i32",
"ISD::ZERO_EXTEND",
"MVT::i32",
"0"
] | ARMSelectionDAGInfo4 | EmitTargetCodeForMemset | ARM | CPU | LLVM | 3,510 | 336 | 1 | [] |
[
"<s>",
"static",
"int",
"rs6000_adjust_cost",
"(",
"rtx",
"insn",
",",
"rtx",
"link",
",",
"rtx",
"dep_insn",
",",
"int",
"cost",
")",
"{",
"if",
"(",
"!",
"recog_memoized",
"(",
"insn",
")",
")",
"return",
"0",
";",
"if",
"(",
"REG_NOTE_KIND",
"(",
"link",
")",
"!=",
"0",
")",
"return",
"0",
";",
"if",
"(",
"REG_NOTE_KIND",
"(",
"link",
")",
"==",
"0",
")",
"{",
"if",
"(",
"rs6000_sched_groups",
"&&",
"GET_CODE",
"(",
"PATTERN",
"(",
"insn",
")",
")",
"==",
"SET",
"&&",
"GET_CODE",
"(",
"PATTERN",
"(",
"dep_insn",
")",
")",
"==",
"SET",
"&&",
"GET_CODE",
"(",
"XEXP",
"(",
"PATTERN",
"(",
"insn",
")",
",",
"1",
")",
")",
"==",
"MEM",
"&&",
"GET_CODE",
"(",
"XEXP",
"(",
"PATTERN",
"(",
"dep_insn",
")",
",",
"0",
")",
")",
"==",
"MEM",
"&&",
"(",
"GET_MODE_SIZE",
"(",
"GET_MODE",
"(",
"XEXP",
"(",
"PATTERN",
"(",
"insn",
")",
",",
"1",
")",
")",
")",
">",
"GET_MODE_SIZE",
"(",
"GET_MODE",
"(",
"XEXP",
"(",
"PATTERN",
"(",
"dep_insn",
")",
",",
"0",
")",
")",
")",
")",
")",
"return",
"cost",
"+",
"14",
";",
"switch",
"(",
"get_attr_type",
"(",
"insn",
")",
")",
"{",
"case",
"TYPE_JMPREG",
":",
"return",
"TARGET_POWER",
"?",
"5",
":",
"4",
";",
"case",
"TYPE_BRANCH",
":",
"if",
"(",
"(",
"rs6000_cpu_attr",
"==",
"CPU_PPC603",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC604",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC604E",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC620",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC630",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC750",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC7400",
"||",
"rs6000_cpu_attr",
"==",
"CPU_PPC7450",
"||",
"rs6000_cpu_attr",
"==",
"CPU_POWER4",
"||",
"rs6000_cpu_attr",
"==",
"CPU_POWER5",
")",
"&&",
"recog_memoized",
"(",
"dep_insn",
")",
"&&",
"(",
"INSN_CODE",
"(",
"dep_insn",
")",
">=",
"0",
")",
"&&",
"(",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_CMP",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_COMPARE",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_DELAYED_COMPARE",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_IMUL_COMPARE",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_LMUL_COMPARE",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_FPCOMPARE",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_CR_LOGICAL",
"||",
"get_attr_type",
"(",
"dep_insn",
")",
"==",
"TYPE_DELAYED_CR",
")",
")",
"return",
"cost",
"+",
"2",
";",
"default",
":",
"break",
";",
"}",
"}",
"return",
"cost",
";",
"}",
"</s>"
] | [
"Adjust",
"the",
"cost",
"of",
"a",
"scheduling",
"dependency",
".",
"Return",
"the",
"new",
"cost",
"of",
"a",
"dependency",
"LINK",
"or",
"INSN",
"on",
"DEP_INSN",
".",
"COST",
"is",
"the",
"current",
"cost",
"."
] | [
"rs6000",
"0",
"0",
"0",
"0",
"1",
"0",
"1",
"0",
"14",
"5",
"4",
"0",
"2"
] | rs60003 | rs6000_adjust_cost | rs6000 | CPU | GCC | 3,511 | 295 | 1 | [] |
[
"<s>",
"static",
"struct",
"unw_reg_state",
"*",
"alloc_reg_state",
"(",
"void",
")",
"{",
"struct",
"unw_reg_state",
"*",
"rs",
";",
"reg_state_alloced",
"++",
";",
"rs",
"=",
"malloc",
"(",
"sizeof",
"(",
"struct",
"unw_reg_state",
")",
")",
";",
"if",
"(",
"!",
"rs",
")",
"{",
"int",
"n",
"=",
"atomic_alloc",
"(",
"&",
"emergency_reg_state_free",
")",
";",
"if",
"(",
"n",
">=",
"0",
")",
"rs",
"=",
"&",
"emergency_reg_state",
"[",
"n",
"]",
";",
"}",
"return",
"rs",
";",
"}",
"</s>"
] | [
"Allocation",
"and",
"deallocation",
"of",
"structures",
"."
] | [
"ia64",
"0"
] | unwind-ia64 | alloc_reg_state | ia64 | CPU | GCC | 3,512 | 62 | 1 | [] |
[
"<s>",
"static",
"tree",
"ix86_vectorize_builtin_scatter",
"(",
"const_tree",
"vectype",
",",
"const_tree",
"index_type",
",",
"int",
"scale",
")",
"{",
"bool",
"si",
";",
"enum",
"ix86_builtins",
"code",
";",
"if",
"(",
"!",
"TARGET_AVX512F",
")",
"return",
"NULL_TREE",
";",
"if",
"(",
"(",
"TREE_CODE",
"(",
"index_type",
")",
"!=",
"INTEGER_TYPE",
"&&",
"!",
"POINTER_TYPE_P",
"(",
"index_type",
")",
")",
"||",
"(",
"TYPE_MODE",
"(",
"index_type",
")",
"!=",
"SImode",
"&&",
"TYPE_MODE",
"(",
"index_type",
")",
"!=",
"DImode",
")",
")",
"return",
"NULL_TREE",
";",
"if",
"(",
"TYPE_PRECISION",
"(",
"index_type",
")",
">",
"POINTER_SIZE",
")",
"return",
"NULL_TREE",
";",
"if",
"(",
"TYPE_PRECISION",
"(",
"index_type",
")",
"<",
"POINTER_SIZE",
"&&",
"TYPE_UNSIGNED",
"(",
"index_type",
")",
")",
"return",
"NULL_TREE",
";",
"if",
"(",
"scale",
"<=",
"0",
"||",
"scale",
">",
"8",
"||",
"(",
"scale",
"&",
"(",
"scale",
"-",
"1",
")",
")",
"!=",
"0",
")",
"return",
"NULL_TREE",
";",
"si",
"=",
"TYPE_MODE",
"(",
"index_type",
")",
"==",
"SImode",
";",
"switch",
"(",
"TYPE_MODE",
"(",
"vectype",
")",
")",
"{",
"case",
"E_V8DFmode",
":",
"code",
"=",
"si",
"?",
"IX86_BUILTIN_SCATTERALTSIV8DF",
":",
"IX86_BUILTIN_SCATTERDIV8DF",
";",
"break",
";",
"case",
"E_V8DImode",
":",
"code",
"=",
"si",
"?",
"IX86_BUILTIN_SCATTERALTSIV8DI",
":",
"IX86_BUILTIN_SCATTERDIV8DI",
";",
"break",
";",
"case",
"E_V16SFmode",
":",
"code",
"=",
"si",
"?",
"IX86_BUILTIN_SCATTERSIV16SF",
":",
"IX86_BUILTIN_SCATTERALTDIV16SF",
";",
"break",
";",
"case",
"E_V16SImode",
":",
"code",
"=",
"si",
"?",
"IX86_BUILTIN_SCATTERSIV16SI",
":",
"IX86_BUILTIN_SCATTERALTDIV16SI",
";",
"break",
";",
"default",
":",
"return",
"NULL_TREE",
";",
"}",
"return",
"ix86_builtins",
"[",
"code",
"]",
";",
"}",
"</s>"
] | [
"Returns",
"a",
"decl",
"of",
"a",
"function",
"that",
"implements",
"scatter",
"store",
"with",
"register",
"type",
"VECTYPE",
"and",
"index",
"type",
"INDEX_TYPE",
"and",
"SCALE",
".",
"Return",
"NULL_TREE",
"if",
"it",
"is",
"not",
"available",
"."
] | [
"i386",
"0",
"8",
"1",
"0"
] | i3867 | ix86_vectorize_builtin_scatter | i386 | CPU | GCC | 3,513 | 201 | 1 | [] |
[
"<s>",
"static",
"bool",
"rs6000_update_ipa_fn_target_info",
"(",
"unsigned",
"int",
"&",
"info",
",",
"const",
"gimple",
"*",
"stmt",
")",
"{",
"if",
"(",
"gimple_code",
"(",
"stmt",
")",
"==",
"GIMPLE_ASM",
")",
"{",
"info",
"|=",
"RS6000_FN_TARGET_INFO_HTM",
";",
"return",
"false",
";",
"}",
"else",
"if",
"(",
"gimple_code",
"(",
"stmt",
")",
"==",
"GIMPLE_CALL",
")",
"{",
"tree",
"fndecl",
"=",
"gimple_call_fndecl",
"(",
"stmt",
")",
";",
"if",
"(",
"fndecl",
"&&",
"fndecl_built_in_p",
"(",
"fndecl",
",",
"BUILT_IN_MD",
")",
")",
"{",
"enum",
"rs6000_gen_builtins",
"fcode",
"=",
"(",
"enum",
"rs6000_gen_builtins",
")",
"DECL_MD_FUNCTION_CODE",
"(",
"fndecl",
")",
";",
"if",
"(",
"bif_is_htm",
"(",
"rs6000_builtin_info",
"[",
"fcode",
"]",
")",
")",
"{",
"info",
"|=",
"RS6000_FN_TARGET_INFO_HTM",
";",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"</s>"
] | [
"Hook",
"to",
"update",
"target",
"specific",
"information",
"INFO",
"for",
"inlining",
"by",
"checking",
"the",
"given",
"STMT",
".",
"Return",
"false",
"if",
"we",
"do",
"n't",
"need",
"to",
"scan",
"any",
"more",
",",
"otherwise",
"return",
"true",
"."
] | [
"rs6000"
] | rs6000 | rs6000_update_ipa_fn_target_info | rs6000 | CPU | GCC | 3,514 | 102 | 1 | [] |
[
"<s>",
"InstructionCost",
"WebAssemblyTTIImpl",
"::",
"getArithmeticInstrCost",
"(",
"unsigned",
"Opcode",
",",
"Type",
"*",
"Ty",
",",
"TTI",
"::",
"TargetCostKind",
"CostKind",
",",
"TTI",
"::",
"OperandValueKind",
"Opd1Info",
",",
"TTI",
"::",
"OperandValueKind",
"Opd2Info",
",",
"TTI",
"::",
"OperandValueProperties",
"Opd1PropInfo",
",",
"TTI",
"::",
"OperandValueProperties",
"Opd2PropInfo",
",",
"ArrayRef",
"<",
"const",
"Value",
"*",
">",
"Args",
",",
"const",
"Instruction",
"*",
"CxtI",
")",
"{",
"InstructionCost",
"Cost",
"=",
"BasicTTIImplBase",
"<",
"WebAssemblyTTIImpl",
">",
"::",
"getArithmeticInstrCost",
"(",
"Opcode",
",",
"Ty",
",",
"CostKind",
",",
"Opd1Info",
",",
"Opd2Info",
",",
"Opd1PropInfo",
",",
"Opd2PropInfo",
")",
";",
"if",
"(",
"auto",
"*",
"VTy",
"=",
"dyn_cast",
"<",
"VectorType",
">",
"(",
"Ty",
")",
")",
"{",
"switch",
"(",
"Opcode",
")",
"{",
"case",
"Instruction",
"::",
"LShr",
":",
"case",
"Instruction",
"::",
"AShr",
":",
"case",
"Instruction",
"::",
"Shl",
":",
"if",
"(",
"Opd2Info",
"!=",
"TTI",
"::",
"OK_UniformValue",
"&&",
"Opd2Info",
"!=",
"TTI",
"::",
"OK_UniformConstantValue",
")",
"Cost",
"=",
"cast",
"<",
"FixedVectorType",
">",
"(",
"VTy",
")",
"->",
"getNumElements",
"(",
")",
"*",
"(",
"TargetTransformInfo",
"::",
"TCC_Basic",
"+",
"getArithmeticInstrCost",
"(",
"Opcode",
",",
"VTy",
"->",
"getElementType",
"(",
")",
",",
"CostKind",
")",
"+",
"TargetTransformInfo",
"::",
"TCC_Basic",
")",
";",
"break",
";",
"}",
"}",
"return",
"Cost",
";",
"}",
"</s>"
] | [
"This",
"is",
"an",
"approximation",
"of",
"reciprocal",
"throughput",
"of",
"a",
"math/logic",
"op",
"."
] | [
"WebAssembly",
"WebAssembly",
"WebAssembly"
] | WebAssemblyTargetTransformInfo11 | getArithmeticInstrCost | WebAssembly | Virtual ISA | LLVM | 3,515 | 170 | 1 | [] |
[
"<s>",
"static",
"bool",
"mcore_modes_tieable_p",
"(",
"machine_mode",
"mode1",
",",
"machine_mode",
"mode2",
")",
"{",
"return",
"mode1",
"==",
"mode2",
"||",
"GET_MODE_CLASS",
"(",
"mode1",
")",
"==",
"GET_MODE_CLASS",
"(",
"mode2",
")",
";",
"}",
"</s>"
] | [
"Implement",
"TARGET_MODES_TIEABLE_P",
"."
] | [
"mcore"
] | mcore | mcore_modes_tieable_p | mcore | MPU | GCC | 3,516 | 27 | 1 | [] |
[
"<s>",
"void",
"SparcInstrInfo",
"::",
"loadRegFromStackSlot",
"(",
"MachineBasicBlock",
"&",
"MBB",
",",
"MachineBasicBlock",
"::",
"iterator",
"I",
",",
"unsigned",
"DestReg",
",",
"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",
".",
"getObjectAlignment",
"(",
"FI",
")",
")",
";",
"if",
"(",
"RC",
"==",
"&",
"SP",
"::",
"I64RegsRegClass",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDXri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"if",
"(",
"RC",
"==",
"&",
"SP",
"::",
"IntRegsRegClass",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"if",
"(",
"RC",
"==",
"&",
"SP",
"::",
"IntPairRegClass",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDDri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"if",
"(",
"RC",
"==",
"&",
"SP",
"::",
"FPRegsRegClass",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDFri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"if",
"(",
"SP",
"::",
"DFPRegsRegClass",
".",
"hasSubClassEq",
"(",
"RC",
")",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDDFri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"if",
"(",
"SP",
"::",
"QFPRegsRegClass",
".",
"hasSubClassEq",
"(",
"RC",
")",
")",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"SP",
"::",
"LDQFri",
")",
",",
"DestReg",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"else",
"llvm_unreachable",
"(",
"\"Can't load this register from stack slot\"",
")",
";",
"}",
"</s>"
] | [
"Load",
"the",
"specified",
"register",
"of",
"the",
"given",
"register",
"class",
"from",
"the",
"specified",
"stack",
"frame",
"index",
"."
] | [
"Sparc",
"Sparc",
"SP::I64RegsRegClass",
"SP::LDXri",
"0",
"SP::IntRegsRegClass",
"SP::LDri",
"0",
"SP::IntPairRegClass",
"SP::LDDri",
"0",
"SP::FPRegsRegClass",
"SP::LDFri",
"0",
"SP::DFPRegsRegClass",
"SP::LDDFri",
"0",
"SP::QFPRegsRegClass",
"SP::LDQFri",
"0",
"\"Can't load this register from stack slot\""
] | SparcInstrInfo1 | loadRegFromStackSlot | Sparc | CPU | LLVM | 3,517 | 379 | 1 | [] |
[
"<s>",
"void",
"arc_save_restore",
"(",
"FILE",
"*",
"file",
",",
"const",
"char",
"*",
"base_reg",
",",
"unsigned",
"int",
"offset",
",",
"unsigned",
"int",
"gmask",
",",
"const",
"char",
"*",
"op",
")",
"{",
"int",
"regno",
";",
"if",
"(",
"gmask",
"==",
"0",
")",
"return",
";",
"for",
"(",
"regno",
"=",
"0",
";",
"regno",
"<=",
"31",
";",
"regno",
"++",
")",
"{",
"if",
"(",
"(",
"gmask",
"&",
"(",
"1L",
"<<",
"regno",
")",
")",
"!=",
"0",
")",
"{",
"fprintf",
"(",
"file",
",",
"\"\\t%s %s,[%s,%d]\\n\"",
",",
"op",
",",
"reg_names",
"[",
"regno",
"]",
",",
"base_reg",
",",
"offset",
")",
";",
"offset",
"+=",
"UNITS_PER_WORD",
";",
"}",
"}",
"}",
"</s>"
] | [
"BASE_REG",
"is",
"the",
"base",
"register",
"to",
"use",
"for",
"addressing",
"and",
"to",
"adjust",
".",
"GMASK",
"is",
"a",
"bitmask",
"of",
"general",
"purpose",
"registers",
"to",
"save/restore",
".",
"epilogue_p",
"0",
":",
"prologue",
"1",
":",
"epilogue",
"2",
":",
"epilogue",
",",
"sibling",
"thunk",
"If",
"*",
"FIRST_OFFSET",
"is",
"non-zero",
",",
"add",
"it",
"first",
"to",
"BASE_REG",
"-",
"preferably",
"using",
"a",
"pre-modify",
"for",
"the",
"first",
"memory",
"access",
".",
"*",
"FIRST_OFFSET",
"is",
"then",
"zeroed",
"."
] | [
"arc",
"0",
"0",
"31",
"1L",
"0",
"\"\\t%s %s,[%s,%d]\\n\""
] | arc3 | arc_save_restore | arc | MPU | GCC | 3,518 | 91 | 1 | [] |
[
"<s>",
"unsigned",
"HexagonInstrInfo",
"::",
"getInlineAsmLength",
"(",
"const",
"char",
"*",
"Str",
",",
"const",
"MCAsmInfo",
"&",
"MAI",
",",
"const",
"TargetSubtargetInfo",
"*",
"STI",
")",
"const",
"{",
"StringRef",
"AStr",
"(",
"Str",
")",
";",
"bool",
"atInsnStart",
"=",
"true",
";",
"unsigned",
"Length",
"=",
"0",
";",
"const",
"unsigned",
"MaxInstLength",
"=",
"MAI",
".",
"getMaxInstLength",
"(",
"STI",
")",
";",
"for",
"(",
";",
"*",
"Str",
";",
"++",
"Str",
")",
"{",
"if",
"(",
"*",
"Str",
"==",
"'\\n'",
"||",
"strncmp",
"(",
"Str",
",",
"MAI",
".",
"getSeparatorString",
"(",
")",
",",
"strlen",
"(",
"MAI",
".",
"getSeparatorString",
"(",
")",
")",
")",
"==",
"0",
")",
"atInsnStart",
"=",
"true",
";",
"if",
"(",
"atInsnStart",
"&&",
"!",
"isSpace",
"(",
"static_cast",
"<",
"unsigned",
"char",
">",
"(",
"*",
"Str",
")",
")",
")",
"{",
"Length",
"+=",
"MaxInstLength",
";",
"atInsnStart",
"=",
"false",
";",
"}",
"if",
"(",
"atInsnStart",
"&&",
"strncmp",
"(",
"Str",
",",
"MAI",
".",
"getCommentString",
"(",
")",
".",
"data",
"(",
")",
",",
"MAI",
".",
"getCommentString",
"(",
")",
".",
"size",
"(",
")",
")",
"==",
"0",
")",
"atInsnStart",
"=",
"false",
";",
"}",
"StringRef",
"Occ",
"(",
"\"##\"",
")",
";",
"Length",
"+=",
"AStr",
".",
"count",
"(",
"Occ",
")",
"*",
"4",
";",
"return",
"Length",
";",
"}",
"</s>"
] | [
"Measure",
"the",
"specified",
"inline",
"asm",
"to",
"determine",
"an",
"approximation",
"of",
"its",
"length",
"."
] | [
"Hexagon",
"Hexagon",
"0",
"0",
"0",
"\"##\"",
"4"
] | HexagonInstrInfo15 | getInlineAsmLength | Hexagon | DSP | LLVM | 3,519 | 177 | 1 | [] |
[
"<s>",
"Instruction",
"*",
"PPCTargetLowering",
"::",
"emitLeadingFence",
"(",
"IRBuilder",
"<",
">",
"&",
"Builder",
",",
"AtomicOrdering",
"Ord",
",",
"bool",
"IsStore",
",",
"bool",
"IsLoad",
")",
"const",
"{",
"if",
"(",
"Ord",
"==",
"SequentiallyConsistent",
")",
"return",
"callIntrinsic",
"(",
"Builder",
",",
"Intrinsic",
"::",
"ppc_sync",
")",
";",
"else",
"if",
"(",
"isAtLeastRelease",
"(",
"Ord",
")",
")",
"return",
"callIntrinsic",
"(",
"Builder",
",",
"Intrinsic",
"::",
"ppc_lwsync",
")",
";",
"else",
"return",
"nullptr",
";",
"}",
"</s>"
] | [
"Custom",
"Lower",
"{",
"."
] | [
"PowerPC",
"PPC",
"Intrinsic::ppc_sync",
"Intrinsic::ppc_lwsync"
] | PPCISelLowering167 | emitLeadingFence | PowerPC | CPU | LLVM | 3,520 | 62 | 1 | [] |
[
"<s>",
"bool",
"AMDGPUCallLowering",
"::",
"lowerReturn",
"(",
"MachineIRBuilder",
"&",
"B",
",",
"const",
"Value",
"*",
"Val",
",",
"ArrayRef",
"<",
"Register",
">",
"VRegs",
",",
"FunctionLoweringInfo",
"&",
"FLI",
")",
"const",
"{",
"MachineFunction",
"&",
"MF",
"=",
"B",
".",
"getMF",
"(",
")",
";",
"SIMachineFunctionInfo",
"*",
"MFI",
"=",
"MF",
".",
"getInfo",
"<",
"SIMachineFunctionInfo",
">",
"(",
")",
";",
"MFI",
"->",
"setIfReturnsVoid",
"(",
"!",
"Val",
")",
";",
"assert",
"(",
"!",
"Val",
"==",
"VRegs",
".",
"empty",
"(",
")",
"&&",
"\"Return value without a vreg\"",
")",
";",
"CallingConv",
"::",
"ID",
"CC",
"=",
"B",
".",
"getMF",
"(",
")",
".",
"getFunction",
"(",
")",
".",
"getCallingConv",
"(",
")",
";",
"const",
"bool",
"IsShader",
"=",
"AMDGPU",
"::",
"isShader",
"(",
"CC",
")",
";",
"const",
"bool",
"IsWaveEnd",
"=",
"(",
"IsShader",
"&&",
"MFI",
"->",
"returnsVoid",
"(",
")",
")",
"||",
"AMDGPU",
"::",
"isKernel",
"(",
"CC",
")",
";",
"if",
"(",
"IsWaveEnd",
")",
"{",
"B",
".",
"buildInstr",
"(",
"AMDGPU",
"::",
"S_ENDPGM",
")",
".",
"addImm",
"(",
"0",
")",
";",
"return",
"true",
";",
"}",
"unsigned",
"ReturnOpc",
"=",
"IsShader",
"?",
"AMDGPU",
"::",
"SI_RETURN_TO_EPILOG",
":",
"AMDGPU",
"::",
"SI_RETURN",
";",
"auto",
"Ret",
"=",
"B",
".",
"buildInstrNoInsert",
"(",
"ReturnOpc",
")",
";",
"if",
"(",
"!",
"FLI",
".",
"CanLowerReturn",
")",
"insertSRetStores",
"(",
"B",
",",
"Val",
"->",
"getType",
"(",
")",
",",
"VRegs",
",",
"FLI",
".",
"DemoteRegister",
")",
";",
"else",
"if",
"(",
"!",
"lowerReturnVal",
"(",
"B",
",",
"Val",
",",
"VRegs",
",",
"Ret",
")",
")",
"return",
"false",
";",
"B",
".",
"insertInstr",
"(",
"Ret",
")",
";",
"return",
"true",
";",
"}",
"</s>"
] | [
"This",
"hook",
"behaves",
"as",
"the",
"extended",
"lowerReturn",
"function",
",",
"but",
"for",
"targets",
"that",
"do",
"not",
"support",
"swifterror",
"value",
"promotion",
"."
] | [
"AMDGPU",
"AMDGPU",
"SI",
"SI",
"\"Return value without a vreg\"",
"AMDGPU::isShader",
"AMDGPU::isKernel",
"AMDGPU::S_ENDPGM",
"0",
"AMDGPU::SI_RETURN_TO_EPILOG",
"AMDGPU::SI_RETURN"
] | AMDGPUCallLowering19 | lowerReturn | AMDGPU | GPU | LLVM | 3,521 | 221 | 1 | [] |
[
"<s>",
"bool",
"RegisterAliasInfo",
"::",
"alias",
"(",
"RegisterRef",
"RA",
",",
"RegisterRef",
"RB",
")",
"const",
"{",
"bool",
"VirtA",
"=",
"TargetRegisterInfo",
"::",
"isVirtualRegister",
"(",
"RA",
".",
"Reg",
")",
";",
"bool",
"VirtB",
"=",
"TargetRegisterInfo",
"::",
"isVirtualRegister",
"(",
"RB",
".",
"Reg",
")",
";",
"bool",
"PhysA",
"=",
"TargetRegisterInfo",
"::",
"isPhysicalRegister",
"(",
"RA",
".",
"Reg",
")",
";",
"bool",
"PhysB",
"=",
"TargetRegisterInfo",
"::",
"isPhysicalRegister",
"(",
"RB",
".",
"Reg",
")",
";",
"if",
"(",
"VirtA",
"!=",
"VirtB",
")",
"return",
"false",
";",
"if",
"(",
"VirtA",
")",
"{",
"if",
"(",
"RA",
".",
"Reg",
"!=",
"RB",
".",
"Reg",
")",
"return",
"false",
";",
"if",
"(",
"RA",
".",
"Sub",
"==",
"0",
"||",
"RB",
".",
"Sub",
"==",
"0",
")",
"return",
"true",
";",
"unsigned",
"SA",
"=",
"TRI",
".",
"getSubRegIdxSize",
"(",
"RA",
".",
"Sub",
")",
";",
"unsigned",
"OA",
"=",
"TRI",
".",
"getSubRegIdxOffset",
"(",
"RA",
".",
"Sub",
")",
";",
"unsigned",
"SB",
"=",
"TRI",
".",
"getSubRegIdxSize",
"(",
"RB",
".",
"Sub",
")",
";",
"unsigned",
"OB",
"=",
"TRI",
".",
"getSubRegIdxOffset",
"(",
"RB",
".",
"Sub",
")",
";",
"if",
"(",
"OA",
"<=",
"OB",
"&&",
"OA",
"+",
"SA",
">",
"OB",
")",
"return",
"true",
";",
"if",
"(",
"OB",
"<=",
"OA",
"&&",
"OB",
"+",
"SB",
">",
"OA",
")",
"return",
"true",
";",
"return",
"false",
";",
"}",
"assert",
"(",
"PhysA",
"&&",
"PhysB",
")",
";",
"(",
"void",
")",
"PhysA",
",",
"(",
"void",
")",
"PhysB",
";",
"unsigned",
"A",
"=",
"RA",
".",
"Sub",
"?",
"TRI",
".",
"getSubReg",
"(",
"RA",
".",
"Reg",
",",
"RA",
".",
"Sub",
")",
":",
"RA",
".",
"Reg",
";",
"unsigned",
"B",
"=",
"RB",
".",
"Sub",
"?",
"TRI",
".",
"getSubReg",
"(",
"RB",
".",
"Reg",
",",
"RB",
".",
"Sub",
")",
":",
"RB",
".",
"Reg",
";",
"for",
"(",
"MCRegAliasIterator",
"I",
"(",
"A",
",",
"&",
"TRI",
",",
"true",
")",
";",
"I",
".",
"isValid",
"(",
")",
";",
"++",
"I",
")",
"if",
"(",
"B",
"==",
"*",
"I",
")",
"return",
"true",
";",
"return",
"false",
";",
"}",
"</s>"
] | [
"alias",
"-",
"If",
"one",
"of",
"the",
"pointers",
"is",
"to",
"a",
"global",
"that",
"we",
"are",
"tracking",
",",
"and",
"the",
"other",
"is",
"some",
"random",
"pointer",
",",
"we",
"know",
"there",
"can",
"not",
"be",
"an",
"alias",
",",
"because",
"the",
"address",
"of",
"the",
"global",
"is",
"n't",
"taken",
"."
] | [
"Hexagon",
"0",
"0"
] | RDFGraph | alias | Hexagon | DSP | LLVM | 3,522 | 288 | 1 | [] |
[
"<s>",
"void",
"addBlockPlacement",
"(",
")",
"override",
"{",
"}",
"</s>"
] | [
"Add",
"standard",
"basic",
"block",
"placement",
"passes",
"."
] | [
"Patmos"
] | PatmosTargetMachine1 | addBlockPlacement | Patmos | VLIW | LLVM | 3,523 | 7 | 1 | [] |
[
"<s>",
"static",
"void",
"s390_add_pool_insn",
"(",
"struct",
"constant_pool",
"*",
"pool",
",",
"rtx",
"insn",
")",
"{",
"bitmap_set_bit",
"(",
"pool",
"->",
"insns",
",",
"INSN_UID",
"(",
"insn",
")",
")",
";",
"}",
"</s>"
] | [
"Add",
"INSN",
"to",
"the",
"list",
"of",
"insns",
"covered",
"by",
"POOL",
"."
] | [
"s390"
] | s390 | s390_add_pool_insn | s390 | MPU | GCC | 3,524 | 26 | 1 | [] |
[
"<s>",
"const",
"RegisterBank",
"&",
"MipsRegisterBankInfo",
"::",
"getRegBankFromRegClass",
"(",
"const",
"TargetRegisterClass",
"&",
"RC",
")",
"const",
"{",
"using",
"namespace",
"Mips",
";",
"switch",
"(",
"RC",
".",
"getID",
"(",
")",
")",
"{",
"case",
"Mips",
"::",
"GPR32RegClassID",
":",
"case",
"Mips",
"::",
"CPU16Regs_and_GPRMM16ZeroRegClassID",
":",
"case",
"Mips",
"::",
"GPRMM16MovePPairFirstRegClassID",
":",
"case",
"Mips",
"::",
"CPU16Regs_and_GPRMM16MovePPairSecondRegClassID",
":",
"case",
"Mips",
"::",
"GPRMM16MoveP_and_CPU16Regs_and_GPRMM16ZeroRegClassID",
":",
"case",
"Mips",
"::",
"GPRMM16MovePPairFirst_and_GPRMM16MovePPairSecondRegClassID",
":",
"case",
"Mips",
"::",
"SP32RegClassID",
":",
"return",
"getRegBank",
"(",
"Mips",
"::",
"GPRBRegBankID",
")",
";",
"case",
"Mips",
"::",
"FGRCCRegClassID",
":",
"case",
"Mips",
"::",
"FGR64RegClassID",
":",
"case",
"Mips",
"::",
"AFGR64RegClassID",
":",
"case",
"Mips",
"::",
"AFGR64_and_OddSPRegClassID",
":",
"return",
"getRegBank",
"(",
"Mips",
"::",
"FPRBRegBankID",
")",
";",
"default",
":",
"llvm_unreachable",
"(",
"\"Register class not supported\"",
")",
";",
"}",
"}",
"</s>"
] | [
"Get",
"a",
"register",
"bank",
"that",
"covers",
"RC",
"."
] | [
"Mips",
"Mips",
"Mips",
"Mips::GPR32RegClassID",
"Mips::CPU16Regs_and_GPRMM16ZeroRegClassID",
"Mips::GPRMM16MovePPairFirstRegClassID",
"Mips::CPU16Regs_and_GPRMM16MovePPairSecondRegClassID",
"Mips::GPRMM16MoveP_and_CPU16Regs_and_GPRMM16ZeroRegClassID",
"Mips::GPRMM16MovePPairFirst_and_GPRMM16MovePPairSecondRegClassID",
"Mips::SP32RegClassID",
"Mips::GPRBRegBankID",
"Mips::FGRCCRegClassID",
"Mips::FGR64RegClassID",
"Mips::AFGR64RegClassID",
"Mips::AFGR64_and_OddSPRegClassID",
"Mips::FPRBRegBankID",
"\"Register class not supported\""
] | MipsRegisterBankInfo33 | getRegBankFromRegClass | Mips | CPU | LLVM | 3,525 | 107 | 1 | [] |
[
"<s>",
"bool",
"isLegalMaskedGather",
"(",
"Type",
"*",
"DataType",
",",
"Align",
"Alignment",
")",
"const",
"{",
"return",
"isLegalMaskedGatherScatter",
"(",
"DataType",
")",
";",
"}",
"</s>"
] | [
"Return",
"true",
"if",
"the",
"target",
"supports",
"masked",
"gather",
"."
] | [
"AArch64"
] | AArch64TargetTransformInfo | isLegalMaskedGather | AArch64 | CPU | LLVM | 3,526 | 19 | 1 | [] |
[
"<s>",
"static",
"const",
"struct",
"riscv_cpu_info",
"*",
"riscv_parse_cpu",
"(",
"const",
"char",
"*",
"cpu_string",
")",
"{",
"for",
"(",
"unsigned",
"i",
"=",
"0",
";",
"i",
"<",
"ARRAY_SIZE",
"(",
"riscv_cpu_info_table",
")",
";",
"i",
"++",
")",
"if",
"(",
"strcmp",
"(",
"riscv_cpu_info_table",
"[",
"i",
"]",
".",
"name",
",",
"cpu_string",
")",
"==",
"0",
")",
"return",
"riscv_cpu_info_table",
"+",
"i",
";",
"error",
"(",
"\"unknown cpu %qs for %<-mtune%>\"",
",",
"cpu_string",
")",
";",
"return",
"riscv_cpu_info_table",
";",
"}",
"</s>"
] | [
"Return",
"the",
"riscv_cpu_info",
"entry",
"for",
"the",
"given",
"name",
"string",
"."
] | [
"riscv",
"0",
"0",
"\"unknown cpu %qs for %<-mtune%>\""
] | riscv | riscv_parse_cpu | riscv | CPU | GCC | 3,527 | 62 | 1 | [] |
[
"<s>",
"bool",
"ARMTargetLowering",
"::",
"isFMAFasterThanFMulAndFAdd",
"(",
"const",
"MachineFunction",
"&",
"MF",
",",
"EVT",
"VT",
")",
"const",
"{",
"if",
"(",
"!",
"Subtarget",
"->",
"hasMVEFloatOps",
"(",
")",
")",
"return",
"false",
";",
"if",
"(",
"!",
"VT",
".",
"isSimple",
"(",
")",
")",
"return",
"false",
";",
"switch",
"(",
"VT",
".",
"getSimpleVT",
"(",
")",
".",
"SimpleTy",
")",
"{",
"case",
"MVT",
"::",
"v4f32",
":",
"case",
"MVT",
"::",
"v8f16",
":",
"return",
"true",
";",
"default",
":",
"break",
";",
"}",
"return",
"false",
";",
"}",
"</s>"
] | [
"Return",
"true",
"if",
"an",
"FMA",
"operation",
"is",
"faster",
"than",
"a",
"pair",
"of",
"fmul",
"and",
"fadd",
"instructions",
"."
] | [
"ARM",
"ARM",
"MVT::v4f32",
"MVT::v8f16"
] | ARMISelLowering (2)6 | isFMAFasterThanFMulAndFAdd | ARM | CPU | LLVM | 3,528 | 72 | 1 | [] |
[
"<s>",
"static",
"void",
"mips_adjust_block_mem",
"(",
"rtx",
"mem",
",",
"HOST_WIDE_INT",
"length",
",",
"rtx",
"*",
"loop_reg",
",",
"rtx",
"*",
"loop_mem",
")",
"{",
"*",
"loop_reg",
"=",
"copy_addr_to_reg",
"(",
"XEXP",
"(",
"mem",
",",
"0",
")",
")",
";",
"*",
"loop_mem",
"=",
"change_address",
"(",
"mem",
",",
"BLKmode",
",",
"*",
"loop_reg",
")",
";",
"set_mem_align",
"(",
"*",
"loop_mem",
",",
"MIN",
"(",
"MEM_ALIGN",
"(",
"mem",
")",
",",
"length",
"*",
"BITS_PER_UNIT",
")",
")",
";",
"}",
"</s>"
] | [
"Helper",
"function",
"for",
"doing",
"a",
"loop-based",
"block",
"operation",
"on",
"memory",
"reference",
"MEM",
".",
"Each",
"iteration",
"of",
"the",
"loop",
"will",
"operate",
"on",
"LENGTH",
"bytes",
"of",
"MEM",
".",
"Create",
"a",
"new",
"base",
"register",
"for",
"use",
"within",
"the",
"loop",
"and",
"point",
"it",
"to",
"the",
"start",
"of",
"MEM",
".",
"Create",
"a",
"new",
"memory",
"reference",
"that",
"uses",
"this",
"register",
".",
"Store",
"them",
"in",
"*",
"LOOP_REG",
"and",
"*",
"LOOP_MEM",
"respectively",
"."
] | [
"mips",
"0"
] | mips | mips_adjust_block_mem | mips | CPU | GCC | 3,529 | 64 | 1 | [] |
[
"<s>",
"unsigned",
"X86RegisterInfo",
"::",
"getRegPressureLimit",
"(",
"const",
"TargetRegisterClass",
"*",
"RC",
",",
"MachineFunction",
"&",
"MF",
")",
"const",
"{",
"const",
"TargetFrameLowering",
"*",
"TFI",
"=",
"MF",
".",
"getTarget",
"(",
")",
".",
"getFrameLowering",
"(",
")",
";",
"unsigned",
"FPDiff",
"=",
"TFI",
"->",
"hasFP",
"(",
"MF",
")",
"?",
"1",
":",
"0",
";",
"switch",
"(",
"RC",
"->",
"getID",
"(",
")",
")",
"{",
"default",
":",
"return",
"0",
";",
"case",
"X86",
"::",
"GR32RegClassID",
":",
"return",
"4",
"-",
"FPDiff",
";",
"case",
"X86",
"::",
"GR64RegClassID",
":",
"return",
"12",
"-",
"FPDiff",
";",
"case",
"X86",
"::",
"VR128RegClassID",
":",
"return",
"TM",
".",
"getSubtarget",
"<",
"X86Subtarget",
">",
"(",
")",
".",
"is64Bit",
"(",
")",
"?",
"10",
":",
"4",
";",
"case",
"X86",
"::",
"VR64RegClassID",
":",
"return",
"4",
";",
"}",
"}",
"</s>"
] | [
"Return",
"the",
"register",
"pressure",
"``",
"high",
"water",
"mark",
"''",
"for",
"the",
"specific",
"register",
"class",
"."
] | [
"X86",
"X86",
"1",
"0",
"0",
"X86::GR32RegClassID",
"4",
"X86::GR64RegClassID",
"12",
"X86::VR128RegClassID",
"X86",
"10",
"4",
"X86::VR64RegClassID",
"4"
] | X86RegisterInfo101 | getRegPressureLimit | X86 | CPU | LLVM | 3,530 | 112 | 1 | [] |
[
"<s>",
"static",
"tree",
"h8300_handle_eightbit_data_attribute",
"(",
"tree",
"*",
"node",
",",
"tree",
"name",
",",
"tree",
"args",
"ATTRIBUTE_UNUSED",
",",
"int",
"flags",
"ATTRIBUTE_UNUSED",
",",
"bool",
"*",
"no_add_attrs",
")",
"{",
"tree",
"decl",
"=",
"*",
"node",
";",
"if",
"(",
"TREE_STATIC",
"(",
"decl",
")",
"||",
"DECL_EXTERNAL",
"(",
"decl",
")",
")",
"{",
"DECL_SECTION_NAME",
"(",
"decl",
")",
"=",
"build_string",
"(",
"7",
",",
"\".eight\"",
")",
";",
"}",
"else",
"{",
"warning",
"(",
"OPT_Wattributes",
",",
"\"%qs attribute ignored\"",
",",
"IDENTIFIER_POINTER",
"(",
"name",
")",
")",
";",
"*",
"no_add_attrs",
"=",
"true",
";",
"}",
"return",
"NULL_TREE",
";",
"}",
"</s>"
] | [
"Handle",
"an",
"``",
"eightbit_data",
"''",
"attribute",
";",
"arguments",
"as",
"in",
"struct",
"attribute_spec.handler",
"."
] | [
"h8300",
"7",
"\".eight\"",
"\"%qs attribute ignored\""
] | h83003 | h8300_handle_eightbit_data_attribute | h8300 | MPU | GCC | 3,531 | 80 | 1 | [] |
[
"<s>",
"static",
"rtx",
"ldv_expand_builtin",
"(",
"rtx",
"target",
",",
"insn_code",
"icode",
",",
"rtx",
"*",
"op",
",",
"machine_mode",
"tmode",
")",
"{",
"if",
"(",
"target",
"==",
"0",
"||",
"GET_MODE",
"(",
"target",
")",
"!=",
"tmode",
"||",
"!",
"insn_data",
"[",
"icode",
"]",
".",
"operand",
"[",
"0",
"]",
".",
"predicate",
"(",
"target",
",",
"tmode",
")",
")",
"target",
"=",
"gen_reg_rtx",
"(",
"tmode",
")",
";",
"op",
"[",
"1",
"]",
"=",
"copy_to_mode_reg",
"(",
"Pmode",
",",
"op",
"[",
"1",
"]",
")",
";",
"bool",
"blk",
"=",
"(",
"icode",
"==",
"CODE_FOR_altivec_lvlx",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvlxl",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvrx",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvrxl",
")",
";",
"if",
"(",
"icode",
"==",
"CODE_FOR_altivec_lvx_v1ti",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v2df",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v2di",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v4sf",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v4si",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v8hi",
"||",
"icode",
"==",
"CODE_FOR_altivec_lvx_v16qi",
")",
"{",
"rtx",
"rawaddr",
";",
"if",
"(",
"op",
"[",
"0",
"]",
"==",
"const0_rtx",
")",
"rawaddr",
"=",
"op",
"[",
"1",
"]",
";",
"else",
"{",
"op",
"[",
"0",
"]",
"=",
"copy_to_mode_reg",
"(",
"Pmode",
",",
"op",
"[",
"0",
"]",
")",
";",
"rawaddr",
"=",
"gen_rtx_PLUS",
"(",
"Pmode",
",",
"op",
"[",
"1",
"]",
",",
"op",
"[",
"0",
"]",
")",
";",
"}",
"rtx",
"addr",
"=",
"gen_rtx_AND",
"(",
"Pmode",
",",
"rawaddr",
",",
"gen_rtx_CONST_INT",
"(",
"Pmode",
",",
"-",
"16",
")",
")",
";",
"addr",
"=",
"gen_rtx_MEM",
"(",
"blk",
"?",
"BLKmode",
":",
"tmode",
",",
"addr",
")",
";",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"target",
",",
"addr",
")",
")",
";",
"}",
"else",
"{",
"rtx",
"addr",
";",
"if",
"(",
"op",
"[",
"0",
"]",
"==",
"const0_rtx",
")",
"addr",
"=",
"gen_rtx_MEM",
"(",
"blk",
"?",
"BLKmode",
":",
"tmode",
",",
"op",
"[",
"1",
"]",
")",
";",
"else",
"{",
"op",
"[",
"0",
"]",
"=",
"copy_to_mode_reg",
"(",
"Pmode",
",",
"op",
"[",
"0",
"]",
")",
";",
"addr",
"=",
"gen_rtx_MEM",
"(",
"blk",
"?",
"BLKmode",
":",
"tmode",
",",
"gen_rtx_PLUS",
"(",
"Pmode",
",",
"op",
"[",
"1",
"]",
",",
"op",
"[",
"0",
"]",
")",
")",
";",
"}",
"rtx",
"pat",
"=",
"GEN_FCN",
"(",
"icode",
")",
"(",
"target",
",",
"addr",
")",
";",
"if",
"(",
"!",
"pat",
")",
"return",
"0",
";",
"emit_insn",
"(",
"pat",
")",
";",
"}",
"return",
"target",
";",
"}",
"</s>"
] | [
"Expand",
"an",
"AltiVec",
"vector",
"load",
"builtin",
",",
"and",
"return",
"the",
"expanded",
"rtx",
"."
] | [
"rs6000",
"0",
"0",
"1",
"1",
"0",
"1",
"0",
"0",
"1",
"0",
"16",
"0",
"1",
"0",
"0",
"1",
"0",
"0"
] | rs6000-builtin | ldv_expand_builtin | rs6000 | CPU | GCC | 3,532 | 324 | 1 | [] |
[
"<s>",
"void",
"GBZ80MCInstLower",
"::",
"lowerInstruction",
"(",
"const",
"MachineInstr",
"&",
"MI",
",",
"MCInst",
"&",
"OutMI",
")",
"const",
"{",
"OutMI",
".",
"setOpcode",
"(",
"MI",
".",
"getOpcode",
"(",
")",
")",
";",
"for",
"(",
"MachineOperand",
"const",
"&",
"MO",
":",
"MI",
".",
"operands",
"(",
")",
")",
"{",
"MCOperand",
"MCOp",
";",
"switch",
"(",
"MO",
".",
"getType",
"(",
")",
")",
"{",
"default",
":",
"MI",
".",
"print",
"(",
"errs",
"(",
")",
")",
";",
"llvm_unreachable",
"(",
"\"unknown operand type\"",
")",
";",
"case",
"MachineOperand",
"::",
"MO_Register",
":",
"if",
"(",
"MO",
".",
"isImplicit",
"(",
")",
")",
"continue",
";",
"MCOp",
"=",
"MCOperand",
"::",
"createReg",
"(",
"MO",
".",
"getReg",
"(",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_Immediate",
":",
"MCOp",
"=",
"MCOperand",
"::",
"createImm",
"(",
"MO",
".",
"getImm",
"(",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_GlobalAddress",
":",
"MCOp",
"=",
"lowerSymbolOperand",
"(",
"MO",
",",
"Printer",
".",
"getSymbol",
"(",
"MO",
".",
"getGlobal",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_ExternalSymbol",
":",
"MCOp",
"=",
"lowerSymbolOperand",
"(",
"MO",
",",
"Printer",
".",
"GetExternalSymbolSymbol",
"(",
"MO",
".",
"getSymbolName",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_MachineBasicBlock",
":",
"MCOp",
"=",
"MCOperand",
"::",
"createExpr",
"(",
"MCSymbolRefExpr",
"::",
"create",
"(",
"MO",
".",
"getMBB",
"(",
")",
"->",
"getSymbol",
"(",
")",
",",
"Ctx",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_RegisterMask",
":",
"continue",
";",
"case",
"MachineOperand",
"::",
"MO_BlockAddress",
":",
"MCOp",
"=",
"lowerSymbolOperand",
"(",
"MO",
",",
"Printer",
".",
"GetBlockAddressSymbol",
"(",
"MO",
".",
"getBlockAddress",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_JumpTableIndex",
":",
"MCOp",
"=",
"lowerSymbolOperand",
"(",
"MO",
",",
"Printer",
".",
"GetJTISymbol",
"(",
"MO",
".",
"getIndex",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"MachineOperand",
"::",
"MO_ConstantPoolIndex",
":",
"MCOp",
"=",
"lowerSymbolOperand",
"(",
"MO",
",",
"Printer",
".",
"GetCPISymbol",
"(",
"MO",
".",
"getIndex",
"(",
")",
")",
")",
";",
"break",
";",
"}",
"OutMI",
".",
"addOperand",
"(",
"MCOp",
")",
";",
"}",
"}",
"</s>"
] | [
"Lowers",
"a",
"MachineInstr",
"into",
"a",
"MCInst",
"."
] | [
"GBZ80",
"GB",
"\"unknown operand type\""
] | GBZ80MCInstLower | lowerInstruction | GBZ80 | MPU | LLVM | 3,533 | 292 | 1 | [] |
[
"<s>",
"void",
"MipsELFStreamer",
"::",
"emitIntValue",
"(",
"uint64_t",
"Value",
",",
"unsigned",
"Size",
")",
"{",
"MCELFStreamer",
"::",
"emitIntValue",
"(",
"Value",
",",
"Size",
")",
";",
"Labels",
".",
"clear",
"(",
")",
";",
"}",
"</s>"
] | [
"Special",
"case",
"of",
"EmitValue",
"that",
"avoids",
"the",
"client",
"having",
"to",
"pass",
"in",
"a",
"MCExpr",
"for",
"constant",
"integers",
"."
] | [
"Mips",
"Mips"
] | MipsELFStreamer19 | emitIntValue | Mips | CPU | LLVM | 3,534 | 28 | 1 | [] |
[
"<s>",
"bool",
"SIInsertSkips",
"::",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"MF",
")",
"{",
"const",
"SISubtarget",
"&",
"ST",
"=",
"MF",
".",
"getSubtarget",
"<",
"SISubtarget",
">",
"(",
")",
";",
"TII",
"=",
"ST",
".",
"getInstrInfo",
"(",
")",
";",
"TRI",
"=",
"&",
"TII",
"->",
"getRegisterInfo",
"(",
")",
";",
"SkipThreshold",
"=",
"SkipThresholdFlag",
";",
"bool",
"HaveKill",
"=",
"false",
";",
"bool",
"MadeChange",
"=",
"false",
";",
"SmallVector",
"<",
"MachineBasicBlock",
"*",
",",
"16",
">",
"ExecBranchStack",
";",
"MachineFunction",
"::",
"iterator",
"NextBB",
";",
"MachineBasicBlock",
"*",
"EmptyMBBAtEnd",
"=",
"nullptr",
";",
"for",
"(",
"MachineFunction",
"::",
"iterator",
"BI",
"=",
"MF",
".",
"begin",
"(",
")",
",",
"BE",
"=",
"MF",
".",
"end",
"(",
")",
";",
"BI",
"!=",
"BE",
";",
"BI",
"=",
"NextBB",
")",
"{",
"NextBB",
"=",
"std",
"::",
"next",
"(",
"BI",
")",
";",
"MachineBasicBlock",
"&",
"MBB",
"=",
"*",
"BI",
";",
"bool",
"HaveSkipBlock",
"=",
"false",
";",
"if",
"(",
"!",
"ExecBranchStack",
".",
"empty",
"(",
")",
"&&",
"ExecBranchStack",
".",
"back",
"(",
")",
"==",
"&",
"MBB",
")",
"{",
"ExecBranchStack",
".",
"pop_back",
"(",
")",
";",
"}",
"if",
"(",
"HaveKill",
"&&",
"ExecBranchStack",
".",
"empty",
"(",
")",
")",
"{",
"HaveKill",
"=",
"false",
";",
"}",
"MachineBasicBlock",
"::",
"iterator",
"I",
",",
"Next",
";",
"for",
"(",
"I",
"=",
"MBB",
".",
"begin",
"(",
")",
";",
"I",
"!=",
"MBB",
".",
"end",
"(",
")",
";",
"I",
"=",
"Next",
")",
"{",
"Next",
"=",
"std",
"::",
"next",
"(",
"I",
")",
";",
"MachineInstr",
"&",
"MI",
"=",
"*",
"I",
";",
"switch",
"(",
"MI",
".",
"getOpcode",
"(",
")",
")",
"{",
"case",
"AMDGPU",
"::",
"SI_MASK_BRANCH",
":",
"ExecBranchStack",
".",
"push_back",
"(",
"MI",
".",
"getOperand",
"(",
"0",
")",
".",
"getMBB",
"(",
")",
")",
";",
"MadeChange",
"|=",
"skipMaskBranch",
"(",
"MI",
",",
"MBB",
")",
";",
"break",
";",
"case",
"AMDGPU",
"::",
"S_BRANCH",
":",
"if",
"(",
"MBB",
".",
"isLayoutSuccessor",
"(",
"MI",
".",
"getOperand",
"(",
"0",
")",
".",
"getMBB",
"(",
")",
")",
")",
"{",
"MI",
".",
"eraseFromParent",
"(",
")",
";",
"}",
"else",
"if",
"(",
"HaveSkipBlock",
")",
"{",
"MI",
".",
"eraseFromParent",
"(",
")",
";",
"}",
"break",
";",
"case",
"AMDGPU",
"::",
"SI_KILL_TERMINATOR",
":",
"MadeChange",
"=",
"true",
";",
"kill",
"(",
"MI",
")",
";",
"if",
"(",
"ExecBranchStack",
".",
"empty",
"(",
")",
")",
"{",
"if",
"(",
"skipIfDead",
"(",
"MI",
",",
"*",
"NextBB",
")",
")",
"{",
"HaveSkipBlock",
"=",
"true",
";",
"NextBB",
"=",
"std",
"::",
"next",
"(",
"BI",
")",
";",
"BE",
"=",
"MF",
".",
"end",
"(",
")",
";",
"}",
"}",
"else",
"{",
"HaveKill",
"=",
"true",
";",
"}",
"MI",
".",
"eraseFromParent",
"(",
")",
";",
"break",
";",
"case",
"AMDGPU",
"::",
"SI_RETURN_TO_EPILOG",
":",
"assert",
"(",
"!",
"MF",
".",
"getInfo",
"<",
"SIMachineFunctionInfo",
">",
"(",
")",
"->",
"returnsVoid",
"(",
")",
")",
";",
"if",
"(",
"BI",
"!=",
"--",
"MF",
".",
"end",
"(",
")",
"||",
"I",
"!=",
"MBB",
".",
"getFirstTerminator",
"(",
")",
")",
"{",
"if",
"(",
"!",
"EmptyMBBAtEnd",
")",
"{",
"EmptyMBBAtEnd",
"=",
"MF",
".",
"CreateMachineBasicBlock",
"(",
")",
";",
"MF",
".",
"insert",
"(",
"MF",
".",
"end",
"(",
")",
",",
"EmptyMBBAtEnd",
")",
";",
"}",
"MBB",
".",
"addSuccessor",
"(",
"EmptyMBBAtEnd",
")",
";",
"BuildMI",
"(",
"*",
"BI",
",",
"I",
",",
"MI",
".",
"getDebugLoc",
"(",
")",
",",
"TII",
"->",
"get",
"(",
"AMDGPU",
"::",
"S_BRANCH",
")",
")",
".",
"addMBB",
"(",
"EmptyMBBAtEnd",
")",
";",
"I",
"->",
"eraseFromParent",
"(",
")",
";",
"}",
"break",
";",
"default",
":",
"break",
";",
"}",
"}",
"}",
"return",
"MadeChange",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"AMDGPU",
"SI",
"SI",
"SI",
"16",
"AMDGPU::SI_MASK_BRANCH",
"0",
"AMDGPU::S_BRANCH",
"0",
"AMDGPU::SI_KILL_TERMINATOR",
"AMDGPU::SI_RETURN_TO_EPILOG",
"SI",
"AMDGPU::S_BRANCH"
] | SIInsertSkips16 | runOnMachineFunction | AMDGPU | GPU | LLVM | 3,535 | 498 | 1 | [] |
[
"<s>",
"void",
"ix86_split_copysign_var",
"(",
"rtx",
"operands",
"[",
"]",
")",
"{",
"enum",
"machine_mode",
"mode",
",",
"vmode",
";",
"rtx",
"dest",
",",
"scratch",
",",
"op0",
",",
"op1",
",",
"mask",
",",
"nmask",
",",
"x",
";",
"dest",
"=",
"operands",
"[",
"0",
"]",
";",
"scratch",
"=",
"operands",
"[",
"1",
"]",
";",
"op0",
"=",
"operands",
"[",
"2",
"]",
";",
"op1",
"=",
"operands",
"[",
"3",
"]",
";",
"nmask",
"=",
"operands",
"[",
"4",
"]",
";",
"mask",
"=",
"operands",
"[",
"5",
"]",
";",
"mode",
"=",
"GET_MODE",
"(",
"dest",
")",
";",
"vmode",
"=",
"GET_MODE",
"(",
"mask",
")",
";",
"if",
"(",
"rtx_equal_p",
"(",
"op0",
",",
"op1",
")",
")",
"{",
"emit_move_insn",
"(",
"dest",
",",
"op0",
")",
";",
"return",
";",
"}",
"if",
"(",
"REG_P",
"(",
"mask",
")",
"&&",
"REGNO",
"(",
"dest",
")",
"==",
"REGNO",
"(",
"mask",
")",
")",
"{",
"gcc_assert",
"(",
"REGNO",
"(",
"op1",
")",
"==",
"REGNO",
"(",
"scratch",
")",
")",
";",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"scratch",
",",
"mask",
")",
";",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"VOIDmode",
",",
"scratch",
",",
"x",
")",
")",
";",
"dest",
"=",
"mask",
";",
"op0",
"=",
"simplify_gen_subreg",
"(",
"vmode",
",",
"op0",
",",
"mode",
",",
"0",
")",
";",
"x",
"=",
"gen_rtx_NOT",
"(",
"vmode",
",",
"dest",
")",
";",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"x",
",",
"op0",
")",
";",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"VOIDmode",
",",
"dest",
",",
"x",
")",
")",
";",
"}",
"else",
"{",
"if",
"(",
"REGNO",
"(",
"op1",
")",
"==",
"REGNO",
"(",
"scratch",
")",
")",
"{",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"scratch",
",",
"mask",
")",
";",
"}",
"else",
"{",
"gcc_assert",
"(",
"REGNO",
"(",
"mask",
")",
"==",
"REGNO",
"(",
"scratch",
")",
")",
";",
"op1",
"=",
"simplify_gen_subreg",
"(",
"vmode",
",",
"op1",
",",
"mode",
",",
"0",
")",
";",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"scratch",
",",
"op1",
")",
";",
"}",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"VOIDmode",
",",
"scratch",
",",
"x",
")",
")",
";",
"if",
"(",
"REGNO",
"(",
"op0",
")",
"==",
"REGNO",
"(",
"dest",
")",
")",
"{",
"dest",
"=",
"simplify_gen_subreg",
"(",
"vmode",
",",
"op0",
",",
"mode",
",",
"0",
")",
";",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"dest",
",",
"nmask",
")",
";",
"}",
"else",
"{",
"gcc_assert",
"(",
"REGNO",
"(",
"nmask",
")",
"==",
"REGNO",
"(",
"dest",
")",
")",
";",
"dest",
"=",
"nmask",
";",
"op0",
"=",
"simplify_gen_subreg",
"(",
"vmode",
",",
"op0",
",",
"mode",
",",
"0",
")",
";",
"x",
"=",
"gen_rtx_AND",
"(",
"vmode",
",",
"dest",
",",
"op0",
")",
";",
"}",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"VOIDmode",
",",
"dest",
",",
"x",
")",
")",
";",
"}",
"x",
"=",
"gen_rtx_IOR",
"(",
"vmode",
",",
"dest",
",",
"scratch",
")",
";",
"emit_insn",
"(",
"gen_rtx_SET",
"(",
"VOIDmode",
",",
"dest",
",",
"x",
")",
")",
";",
"}",
"</s>"
] | [
"Deconstruct",
"a",
"copysign",
"operation",
"into",
"bit",
"masks",
".",
"Operand",
"0",
"is",
"variable",
",",
"so",
"we",
"have",
"to",
"do",
"two",
"masks",
"."
] | [
"i386",
"0",
"1",
"2",
"3",
"4",
"5",
"0",
"0",
"0",
"0"
] | i3863 | ix86_split_copysign_var | i386 | CPU | GCC | 3,536 | 408 | 1 | [] |
[
"<s>",
"static",
"unsigned",
"int",
"aarch64_add_offset_1_temporaries",
"(",
"HOST_WIDE_INT",
"offset",
")",
"{",
"return",
"abs_hwi",
"(",
"offset",
")",
"<",
"0x1000000",
"?",
"0",
":",
"1",
";",
"}",
"</s>"
] | [
"Return",
"the",
"number",
"of",
"temporary",
"registers",
"that",
"aarch64_add_offset_1",
"would",
"need",
"to",
"add",
"OFFSET",
"to",
"a",
"register",
"."
] | [
"aarch64",
"0x1000000",
"0",
"1"
] | aarch64 | aarch64_add_offset_1_temporaries | aarch64 | CPU | GCC | 3,537 | 22 | 1 | [] |
[
"<s>",
"DecodeStatus",
"AVRDisassembler",
"::",
"getInstruction",
"(",
"MCInst",
"&",
"Instr",
",",
"uint64_t",
"&",
"Size",
",",
"ArrayRef",
"<",
"uint8_t",
">",
"Bytes",
",",
"uint64_t",
"Address",
",",
"raw_ostream",
"&",
"CStream",
")",
"const",
"{",
"uint32_t",
"Insn",
";",
"DecodeStatus",
"Result",
";",
"{",
"Result",
"=",
"readInstruction16",
"(",
"Bytes",
",",
"Address",
",",
"Size",
",",
"Insn",
")",
";",
"if",
"(",
"Result",
"==",
"MCDisassembler",
"::",
"Fail",
")",
"return",
"MCDisassembler",
"::",
"Fail",
";",
"Result",
"=",
"decodeInstruction",
"(",
"getDecoderTable",
"(",
"Size",
")",
",",
"Instr",
",",
"Insn",
",",
"Address",
",",
"this",
",",
"STI",
")",
";",
"if",
"(",
"Result",
"!=",
"MCDisassembler",
"::",
"Fail",
")",
"return",
"Result",
";",
"Result",
"=",
"decodeLoadStore",
"(",
"Instr",
",",
"Insn",
",",
"Address",
",",
"this",
")",
";",
"if",
"(",
"Result",
"!=",
"MCDisassembler",
"::",
"Fail",
")",
"return",
"Result",
";",
"}",
"{",
"Result",
"=",
"readInstruction32",
"(",
"Bytes",
",",
"Address",
",",
"Size",
",",
"Insn",
")",
";",
"if",
"(",
"Result",
"==",
"MCDisassembler",
"::",
"Fail",
")",
"return",
"MCDisassembler",
"::",
"Fail",
";",
"Result",
"=",
"decodeInstruction",
"(",
"getDecoderTable",
"(",
"Size",
")",
",",
"Instr",
",",
"Insn",
",",
"Address",
",",
"this",
",",
"STI",
")",
";",
"if",
"(",
"Result",
"!=",
"MCDisassembler",
"::",
"Fail",
")",
"{",
"return",
"Result",
";",
"}",
"return",
"MCDisassembler",
"::",
"Fail",
";",
"}",
"}",
"</s>"
] | [
"Returns",
"the",
"disassembly",
"of",
"a",
"single",
"instruction",
"."
] | [
"AVR",
"AVR"
] | AVRDisassembler (2) | getInstruction | AVR | MPU | LLVM | 3,538 | 184 | 1 | [] |
[
"<s>",
"bool",
"arm_coproc_builtin_available",
"(",
"enum",
"unspecv",
"builtin",
")",
"{",
"if",
"(",
"TARGET_THUMB1",
")",
"return",
"false",
";",
"switch",
"(",
"builtin",
")",
"{",
"case",
"VUNSPEC_CDP",
":",
"case",
"VUNSPEC_LDC",
":",
"case",
"VUNSPEC_LDCL",
":",
"case",
"VUNSPEC_STC",
":",
"case",
"VUNSPEC_STCL",
":",
"case",
"VUNSPEC_MCR",
":",
"case",
"VUNSPEC_MRC",
":",
"if",
"(",
"arm_arch4",
")",
"return",
"true",
";",
"break",
";",
"case",
"VUNSPEC_CDP2",
":",
"case",
"VUNSPEC_LDC2",
":",
"case",
"VUNSPEC_LDC2L",
":",
"case",
"VUNSPEC_STC2",
":",
"case",
"VUNSPEC_STC2L",
":",
"case",
"VUNSPEC_MCR2",
":",
"case",
"VUNSPEC_MRC2",
":",
"if",
"(",
"arm_arch5",
")",
"return",
"true",
";",
"break",
";",
"case",
"VUNSPEC_MCRR",
":",
"case",
"VUNSPEC_MRRC",
":",
"if",
"(",
"arm_arch6",
"||",
"arm_arch5te",
")",
"return",
"true",
";",
"break",
";",
"case",
"VUNSPEC_MCRR2",
":",
"case",
"VUNSPEC_MRRC2",
":",
"if",
"(",
"arm_arch6",
")",
"return",
"true",
";",
"break",
";",
"default",
":",
"gcc_unreachable",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"</s>"
] | [
"This",
"function",
"checks",
"for",
"the",
"availability",
"of",
"the",
"coprocessor",
"builtin",
"passed",
"in",
"BUILTIN",
"for",
"the",
"current",
"target",
".",
"Returns",
"true",
"if",
"it",
"is",
"available",
"and",
"false",
"otherwise",
".",
"If",
"a",
"BUILTIN",
"is",
"passed",
"for",
"which",
"this",
"function",
"has",
"not",
"been",
"implemented",
"it",
"will",
"cause",
"an",
"exception",
"."
] | [
"arm"
] | arm6 | arm_coproc_builtin_available | arm | CPU | GCC | 3,539 | 123 | 1 | [] |
[
"<s>",
"static",
"int",
"sh_issue_rate",
"(",
"void",
")",
"{",
"if",
"(",
"TARGET_SUPERSCALAR",
")",
"return",
"2",
";",
"else",
"return",
"1",
";",
"}",
"</s>"
] | [
"This",
"function",
"returns",
"``",
"2",
"''",
"to",
"indicate",
"dual",
"issue",
"for",
"the",
"SH4",
"processor",
".",
"To",
"be",
"used",
"by",
"the",
"DFA",
"pipeline",
"description",
"."
] | [
"sh",
"2",
"1"
] | sh | sh_issue_rate | sh | CPU | GCC | 3,540 | 19 | 1 | [] |
[
"<s>",
"int",
"X86FrameLowering",
"::",
"getFrameIndexReference",
"(",
"const",
"MachineFunction",
"&",
"MF",
",",
"int",
"FI",
",",
"unsigned",
"&",
"FrameReg",
")",
"const",
"{",
"const",
"MachineFrameInfo",
"&",
"MFI",
"=",
"MF",
".",
"getFrameInfo",
"(",
")",
";",
"bool",
"IsFixed",
"=",
"MFI",
".",
"isFixedObjectIndex",
"(",
"FI",
")",
";",
"if",
"(",
"TRI",
"->",
"hasBasePointer",
"(",
"MF",
")",
")",
"FrameReg",
"=",
"IsFixed",
"?",
"TRI",
"->",
"getFramePtr",
"(",
")",
":",
"TRI",
"->",
"getBaseRegister",
"(",
")",
";",
"else",
"if",
"(",
"TRI",
"->",
"needsStackRealignment",
"(",
"MF",
")",
")",
"FrameReg",
"=",
"IsFixed",
"?",
"TRI",
"->",
"getFramePtr",
"(",
")",
":",
"TRI",
"->",
"getStackRegister",
"(",
")",
";",
"else",
"FrameReg",
"=",
"TRI",
"->",
"getFrameRegister",
"(",
"MF",
")",
";",
"int",
"Offset",
"=",
"MFI",
".",
"getObjectOffset",
"(",
"FI",
")",
"-",
"getOffsetOfLocalArea",
"(",
")",
";",
"const",
"X86MachineFunctionInfo",
"*",
"X86FI",
"=",
"MF",
".",
"getInfo",
"<",
"X86MachineFunctionInfo",
">",
"(",
")",
";",
"unsigned",
"CSSize",
"=",
"X86FI",
"->",
"getCalleeSavedFrameSize",
"(",
")",
";",
"uint64_t",
"StackSize",
"=",
"MFI",
".",
"getStackSize",
"(",
")",
";",
"bool",
"HasFP",
"=",
"hasFP",
"(",
"MF",
")",
";",
"bool",
"IsWin64Prologue",
"=",
"MF",
".",
"getTarget",
"(",
")",
".",
"getMCAsmInfo",
"(",
")",
"->",
"usesWindowsCFI",
"(",
")",
";",
"int64_t",
"FPDelta",
"=",
"0",
";",
"if",
"(",
"MF",
".",
"getFunction",
"(",
")",
".",
"getCallingConv",
"(",
")",
"==",
"CallingConv",
"::",
"X86_INTR",
"&&",
"Offset",
">=",
"0",
")",
"{",
"Offset",
"+=",
"getOffsetOfLocalArea",
"(",
")",
";",
"}",
"if",
"(",
"IsWin64Prologue",
")",
"{",
"assert",
"(",
"!",
"MFI",
".",
"hasCalls",
"(",
")",
"||",
"(",
"StackSize",
"%",
"16",
")",
"==",
"8",
")",
";",
"uint64_t",
"FrameSize",
"=",
"StackSize",
"-",
"SlotSize",
";",
"if",
"(",
"X86FI",
"->",
"getRestoreBasePointer",
"(",
")",
")",
"FrameSize",
"+=",
"SlotSize",
";",
"uint64_t",
"NumBytes",
"=",
"FrameSize",
"-",
"CSSize",
";",
"uint64_t",
"SEHFrameOffset",
"=",
"calculateSetFPREG",
"(",
"NumBytes",
")",
";",
"if",
"(",
"FI",
"&&",
"FI",
"==",
"X86FI",
"->",
"getFAIndex",
"(",
")",
")",
"return",
"-",
"SEHFrameOffset",
";",
"FPDelta",
"=",
"FrameSize",
"-",
"SEHFrameOffset",
";",
"assert",
"(",
"(",
"!",
"MFI",
".",
"hasCalls",
"(",
")",
"||",
"(",
"FPDelta",
"%",
"16",
")",
"==",
"0",
")",
"&&",
"\"FPDelta isn't aligned per the Win64 ABI!\"",
")",
";",
"}",
"if",
"(",
"TRI",
"->",
"hasBasePointer",
"(",
"MF",
")",
")",
"{",
"assert",
"(",
"HasFP",
"&&",
"\"VLAs and dynamic stack realign, but no FP?!\"",
")",
";",
"if",
"(",
"FI",
"<",
"0",
")",
"{",
"return",
"Offset",
"+",
"SlotSize",
"+",
"FPDelta",
";",
"}",
"else",
"{",
"assert",
"(",
"(",
"-",
"(",
"Offset",
"+",
"StackSize",
")",
")",
"%",
"MFI",
".",
"getObjectAlignment",
"(",
"FI",
")",
"==",
"0",
")",
";",
"return",
"Offset",
"+",
"StackSize",
";",
"}",
"}",
"else",
"if",
"(",
"TRI",
"->",
"needsStackRealignment",
"(",
"MF",
")",
")",
"{",
"if",
"(",
"FI",
"<",
"0",
")",
"{",
"return",
"Offset",
"+",
"SlotSize",
"+",
"FPDelta",
";",
"}",
"else",
"{",
"assert",
"(",
"(",
"-",
"(",
"Offset",
"+",
"StackSize",
")",
")",
"%",
"MFI",
".",
"getObjectAlignment",
"(",
"FI",
")",
"==",
"0",
")",
";",
"return",
"Offset",
"+",
"StackSize",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"HasFP",
")",
"return",
"Offset",
"+",
"StackSize",
";",
"Offset",
"+=",
"SlotSize",
";",
"int",
"TailCallReturnAddrDelta",
"=",
"X86FI",
"->",
"getTCReturnAddrDelta",
"(",
")",
";",
"if",
"(",
"TailCallReturnAddrDelta",
"<",
"0",
")",
"Offset",
"-=",
"TailCallReturnAddrDelta",
";",
"}",
"return",
"Offset",
"+",
"FPDelta",
";",
"}",
"</s>"
] | [
"getFrameIndexReference",
"-",
"This",
"method",
"should",
"return",
"the",
"base",
"register",
"and",
"offset",
"used",
"to",
"reference",
"a",
"frame",
"index",
"location",
"."
] | [
"X86",
"X86",
"X86",
"X86",
"X86",
"X86",
"0",
"X86",
"0",
"16",
"8",
"X86",
"X86",
"16",
"0",
"\"FPDelta isn't aligned per the Win64 ABI!\"",
"\"VLAs and dynamic stack realign, but no FP?!\"",
"0",
"0",
"0",
"0",
"X86",
"0"
] | X86FrameLowering10 | getFrameIndexReference | X86 | CPU | LLVM | 3,541 | 467 | 1 | [] |
[
"<s>",
"static",
"bool",
"ix86_eax_live_at_start_p",
"(",
"void",
")",
"{",
"return",
"REGNO_REG_SET_P",
"(",
"df_get_live_out",
"(",
"ENTRY_BLOCK_PTR_FOR_FN",
"(",
"cfun",
")",
")",
",",
"0",
")",
";",
"}",
"</s>"
] | [
"Return",
"true",
"if",
"EAX",
"is",
"live",
"at",
"the",
"start",
"of",
"the",
"function",
".",
"Used",
"by",
"ix86_expand_prologue",
"to",
"determine",
"if",
"we",
"need",
"special",
"help",
"before",
"calling",
"allocate_stack_worker",
"."
] | [
"i386",
"0"
] | i386 | ix86_eax_live_at_start_p | i386 | CPU | GCC | 3,542 | 22 | 1 | [] |
[
"<s>",
"bool",
"R600InstrInfo",
"::",
"isPredicated",
"(",
"const",
"MachineInstr",
"&",
"MI",
")",
"const",
"{",
"int",
"idx",
"=",
"MI",
".",
"findFirstPredOperandIdx",
"(",
")",
";",
"if",
"(",
"idx",
"<",
"0",
")",
"return",
"false",
";",
"Register",
"Reg",
"=",
"MI",
".",
"getOperand",
"(",
"idx",
")",
".",
"getReg",
"(",
")",
";",
"switch",
"(",
"Reg",
")",
"{",
"default",
":",
"return",
"false",
";",
"case",
"R600",
"::",
"PRED_SEL_ONE",
":",
"case",
"R600",
"::",
"PRED_SEL_ZERO",
":",
"case",
"R600",
"::",
"PREDICATE_BIT",
":",
"return",
"true",
";",
"}",
"}",
"</s>"
] | [
"Returns",
"true",
"if",
"the",
"instruction",
"is",
"already",
"predicated",
"."
] | [
"AMDGPU",
"R600",
"0",
"R600::PRED_SEL_ONE",
"R600::PRED_SEL_ZERO",
"R600::PREDICATE_BIT"
] | R600InstrInfo12 | isPredicated | AMDGPU | GPU | LLVM | 3,543 | 74 | 1 | [] |
[
"<s>",
"static",
"reg_class_t",
"mn10300_preferred_output_reload_class",
"(",
"rtx",
"x",
",",
"reg_class_t",
"rclass",
")",
"{",
"if",
"(",
"x",
"==",
"stack_pointer_rtx",
"&&",
"rclass",
"!=",
"SP_REGS",
")",
"return",
"(",
"TARGET_AM33",
"?",
"GENERAL_REGS",
":",
"ADDRESS_REGS",
")",
";",
"return",
"rclass",
";",
"}",
"</s>"
] | [
"Implement",
"TARGET_PREFERRED_OUTPUT_RELOAD_CLASS",
"."
] | [
"mn10300"
] | mn10300 | mn10300_preferred_output_reload_class | mn10300 | MPU | GCC | 3,544 | 34 | 1 | [] |
[
"<s>",
"static",
"rtx",
"xtensa_function_incoming_arg",
"(",
"cumulative_args_t",
"cum",
",",
"machine_mode",
"mode",
",",
"const_tree",
"type",
",",
"bool",
"named",
"ATTRIBUTE_UNUSED",
")",
"{",
"return",
"xtensa_function_arg_1",
"(",
"cum",
",",
"mode",
",",
"type",
",",
"true",
")",
";",
"}",
"</s>"
] | [
"Implement",
"TARGET_FUNCTION_INCOMING_ARG",
"."
] | [
"xtensa"
] | xtensa4 | xtensa_function_incoming_arg | xtensa | MPU | GCC | 3,545 | 31 | 1 | [] |
[
"<s>",
"const",
"InstrItineraryData",
"*",
"getInstrItineraryData",
"(",
")",
"const",
"override",
"{",
"return",
"&",
"InstrItins",
";",
"}",
"</s>"
] | [
"getInstrItineraryData",
"-",
"Returns",
"instruction",
"itinerary",
"data",
"for",
"the",
"target",
"or",
"specific",
"subtarget",
"."
] | [
"Patmos"
] | PatmosSubtarget1 | getInstrItineraryData | Patmos | VLIW | LLVM | 3,546 | 14 | 1 | [] |
[
"<s>",
"static",
"bool",
"reg_offset_addressing_ok_p",
"(",
"machine_mode",
"mode",
")",
"{",
"switch",
"(",
"mode",
")",
"{",
"case",
"V16QImode",
":",
"case",
"V8HImode",
":",
"case",
"V4SFmode",
":",
"case",
"V4SImode",
":",
"case",
"V2DFmode",
":",
"case",
"V2DImode",
":",
"case",
"V1TImode",
":",
"case",
"TImode",
":",
"case",
"TFmode",
":",
"case",
"KFmode",
":",
"if",
"(",
"VECTOR_MEM_ALTIVEC_OR_VSX_P",
"(",
"mode",
")",
")",
"return",
"mode_supports_vsx_dform_quad",
"(",
"mode",
")",
";",
"break",
";",
"case",
"V4HImode",
":",
"case",
"V2SImode",
":",
"case",
"V1DImode",
":",
"case",
"V2SFmode",
":",
"if",
"(",
"TARGET_PAIRED_FLOAT",
")",
"return",
"false",
";",
"break",
";",
"case",
"SDmode",
":",
"if",
"(",
"TARGET_NO_SDMODE_STACK",
")",
"return",
"false",
";",
"break",
";",
"default",
":",
"break",
";",
"}",
"return",
"true",
";",
"}",
"</s>"
] | [
"Subroutines",
"of",
"rs6000_legitimize_address",
"and",
"rs6000_legitimate_address_p",
"."
] | [
"rs6000"
] | rs60006 | reg_offset_addressing_ok_p | rs6000 | CPU | GCC | 3,547 | 100 | 1 | [] |
[
"<s>",
"SDValue",
"MSP430TargetLowering",
"::",
"LowerCallResult",
"(",
"SDValue",
"Chain",
",",
"SDValue",
"InFlag",
",",
"unsigned",
"CallConv",
",",
"bool",
"isVarArg",
",",
"const",
"SmallVectorImpl",
"<",
"ISD",
"::",
"InputArg",
">",
"&",
"Ins",
",",
"DebugLoc",
"dl",
",",
"SelectionDAG",
"&",
"DAG",
",",
"SmallVectorImpl",
"<",
"SDValue",
">",
"&",
"InVals",
")",
"{",
"SmallVector",
"<",
"CCValAssign",
",",
"16",
">",
"RVLocs",
";",
"CCState",
"CCInfo",
"(",
"CallConv",
",",
"isVarArg",
",",
"getTargetMachine",
"(",
")",
",",
"RVLocs",
",",
"*",
"DAG",
".",
"getContext",
"(",
")",
")",
";",
"CCInfo",
".",
"AnalyzeCallResult",
"(",
"Ins",
",",
"RetCC_MSP430",
")",
";",
"for",
"(",
"unsigned",
"i",
"=",
"0",
";",
"i",
"!=",
"RVLocs",
".",
"size",
"(",
")",
";",
"++",
"i",
")",
"{",
"Chain",
"=",
"DAG",
".",
"getCopyFromReg",
"(",
"Chain",
",",
"dl",
",",
"RVLocs",
"[",
"i",
"]",
".",
"getLocReg",
"(",
")",
",",
"RVLocs",
"[",
"i",
"]",
".",
"getValVT",
"(",
")",
",",
"InFlag",
")",
".",
"getValue",
"(",
"1",
")",
";",
"InFlag",
"=",
"Chain",
".",
"getValue",
"(",
"2",
")",
";",
"InVals",
".",
"push_back",
"(",
"Chain",
".",
"getValue",
"(",
"0",
")",
")",
";",
"}",
"return",
"Chain",
";",
"}",
"</s>"
] | [
"LowerCallResult",
"-",
"Lower",
"the",
"result",
"values",
"of",
"an",
"ISD",
":",
":CALL",
"into",
"the",
"appropriate",
"copies",
"out",
"of",
"appropriate",
"physical",
"registers",
"."
] | [
"MSP430",
"MSP430",
"ISD::InputArg",
"16",
"MSP430",
"0",
"1",
"2",
"0"
] | MSP430ISelLowering13 | LowerCallResult | MSP430 | MPU | LLVM | 3,548 | 161 | 1 | [] |
[
"<s>",
"HOST_WIDE_INT",
"sparc_compute_frame_size",
"(",
"HOST_WIDE_INT",
"size",
",",
"int",
"leaf_function",
")",
"{",
"HOST_WIDE_INT",
"frame_size",
",",
"apparent_frame_size",
";",
"int",
"args_size",
",",
"n_global_fp_regs",
"=",
"0",
";",
"bool",
"save_local_in_regs_p",
"=",
"false",
";",
"unsigned",
"int",
"i",
";",
"if",
"(",
"leaf_function",
"&&",
"!",
"cfun",
"->",
"calls_alloca",
")",
"args_size",
"=",
"0",
";",
"else",
"args_size",
"=",
"crtl",
"->",
"outgoing_args_size",
"+",
"REG_PARM_STACK_SPACE",
"(",
"cfun",
"->",
"decl",
")",
";",
"if",
"(",
"TARGET_ARCH64",
")",
"{",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"++",
")",
"if",
"(",
"save_global_or_fp_reg_p",
"(",
"i",
",",
"0",
")",
")",
"n_global_fp_regs",
"+=",
"2",
";",
"}",
"else",
"{",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"+=",
"2",
")",
"if",
"(",
"save_global_or_fp_reg_p",
"(",
"i",
",",
"0",
")",
"||",
"save_global_or_fp_reg_p",
"(",
"i",
"+",
"1",
",",
"0",
")",
")",
"n_global_fp_regs",
"+=",
"2",
";",
"}",
"if",
"(",
"TARGET_FLAT",
")",
"for",
"(",
"i",
"=",
"16",
";",
"i",
"<",
"32",
";",
"i",
"++",
")",
"if",
"(",
"save_local_or_in_reg_p",
"(",
"i",
",",
"leaf_function",
")",
")",
"{",
"save_local_in_regs_p",
"=",
"true",
";",
"break",
";",
"}",
"for",
"(",
"i",
"=",
"32",
";",
"i",
"<",
"(",
"TARGET_V9",
"?",
"96",
":",
"64",
")",
";",
"i",
"+=",
"2",
")",
"if",
"(",
"save_global_or_fp_reg_p",
"(",
"i",
",",
"0",
")",
"||",
"save_global_or_fp_reg_p",
"(",
"i",
"+",
"1",
",",
"0",
")",
")",
"n_global_fp_regs",
"+=",
"2",
";",
"if",
"(",
"size",
"==",
"0",
"&&",
"n_global_fp_regs",
"==",
"0",
"&&",
"args_size",
"==",
"0",
"&&",
"!",
"save_local_in_regs_p",
")",
"frame_size",
"=",
"apparent_frame_size",
"=",
"0",
";",
"else",
"{",
"apparent_frame_size",
"=",
"ROUND_UP",
"(",
"size",
"-",
"STARTING_FRAME_OFFSET",
",",
"8",
")",
";",
"apparent_frame_size",
"+=",
"n_global_fp_regs",
"*",
"4",
";",
"frame_size",
"=",
"apparent_frame_size",
"+",
"ROUND_UP",
"(",
"args_size",
",",
"8",
")",
";",
"frame_size",
"+=",
"FIRST_PARM_OFFSET",
"(",
"cfun",
"->",
"decl",
")",
";",
"frame_size",
"=",
"SPARC_STACK_ALIGN",
"(",
"frame_size",
")",
";",
"}",
"sparc_frame_size",
"=",
"frame_size",
";",
"sparc_apparent_frame_size",
"=",
"apparent_frame_size",
";",
"sparc_n_global_fp_regs",
"=",
"n_global_fp_regs",
";",
"sparc_save_local_in_regs_p",
"=",
"save_local_in_regs_p",
";",
"return",
"frame_size",
";",
"}",
"</s>"
] | [
"Compute",
"the",
"frame",
"size",
"required",
"by",
"the",
"function",
".",
"This",
"function",
"is",
"called",
"during",
"the",
"reload",
"pass",
"and",
"also",
"by",
"sparc_expand_prologue",
"."
] | [
"sparc",
"0",
"0",
"0",
"8",
"0",
"2",
"0",
"8",
"2",
"0",
"1",
"0",
"2",
"16",
"32",
"32",
"96",
"64",
"2",
"0",
"1",
"0",
"2",
"0",
"0",
"0",
"0",
"8",
"4",
"8"
] | sparc5 | sparc_compute_frame_size | sparc | CPU | GCC | 3,549 | 295 | 1 | [] |
[
"<s>",
"SDValue",
"RISCVTargetLowering",
"::",
"PerformDAGCombine",
"(",
"SDNode",
"*",
"N",
",",
"DAGCombinerInfo",
"&",
"DCI",
")",
"const",
"{",
"SelectionDAG",
"&",
"DAG",
"=",
"DCI",
".",
"DAG",
";",
"switch",
"(",
"N",
"->",
"getOpcode",
"(",
")",
")",
"{",
"default",
":",
"break",
";",
"case",
"ISD",
"::",
"SHL",
":",
"case",
"ISD",
"::",
"SRL",
":",
"case",
"ISD",
"::",
"SRA",
":",
"{",
"assert",
"(",
"Subtarget",
".",
"getXLen",
"(",
")",
"==",
"64",
"&&",
"\"Combine should be 64-bit only\"",
")",
";",
"if",
"(",
"!",
"DCI",
".",
"isBeforeLegalize",
"(",
")",
")",
"break",
";",
"SDValue",
"RHS",
"=",
"N",
"->",
"getOperand",
"(",
"1",
")",
";",
"if",
"(",
"N",
"->",
"getValueType",
"(",
"0",
")",
"!=",
"MVT",
"::",
"i32",
"||",
"RHS",
"->",
"getOpcode",
"(",
")",
"==",
"ISD",
"::",
"Constant",
"||",
"(",
"RHS",
"->",
"getOpcode",
"(",
")",
"==",
"ISD",
"::",
"AssertZext",
"&&",
"cast",
"<",
"VTSDNode",
">",
"(",
"RHS",
"->",
"getOperand",
"(",
"1",
")",
")",
"->",
"getVT",
"(",
")",
".",
"getSizeInBits",
"(",
")",
"<=",
"5",
")",
")",
"break",
";",
"SDValue",
"LHS",
"=",
"N",
"->",
"getOperand",
"(",
"0",
")",
";",
"SDLoc",
"DL",
"(",
"N",
")",
";",
"SDValue",
"NewRHS",
"=",
"DAG",
".",
"getNode",
"(",
"ISD",
"::",
"AssertZext",
",",
"DL",
",",
"RHS",
".",
"getValueType",
"(",
")",
",",
"RHS",
",",
"DAG",
".",
"getValueType",
"(",
"EVT",
"::",
"getIntegerVT",
"(",
"*",
"DAG",
".",
"getContext",
"(",
")",
",",
"5",
")",
")",
")",
";",
"return",
"DCI",
".",
"CombineTo",
"(",
"N",
",",
"DAG",
".",
"getNode",
"(",
"N",
"->",
"getOpcode",
"(",
")",
",",
"DL",
",",
"LHS",
".",
"getValueType",
"(",
")",
",",
"LHS",
",",
"NewRHS",
")",
")",
";",
"}",
"case",
"ISD",
"::",
"ANY_EXTEND",
":",
"{",
"SDValue",
"Src",
"=",
"N",
"->",
"getOperand",
"(",
"0",
")",
";",
"if",
"(",
"N",
"->",
"getValueType",
"(",
"0",
")",
"!=",
"MVT",
"::",
"i64",
"||",
"Src",
".",
"getValueType",
"(",
")",
"!=",
"MVT",
"::",
"i32",
")",
"break",
";",
"if",
"(",
"!",
"isVariableShift",
"(",
"Src",
")",
"&&",
"!",
"(",
"Subtarget",
".",
"hasStdExtM",
"(",
")",
"&&",
"isVariableSDivUDivURem",
"(",
"Src",
")",
")",
")",
"break",
";",
"SDLoc",
"DL",
"(",
"N",
")",
";",
"return",
"DCI",
".",
"CombineTo",
"(",
"N",
",",
"DAG",
".",
"getNode",
"(",
"ISD",
"::",
"SIGN_EXTEND",
",",
"DL",
",",
"MVT",
"::",
"i64",
",",
"Src",
")",
")",
";",
"}",
"case",
"RISCVISD",
"::",
"SplitF64",
":",
"{",
"SDValue",
"Op0",
"=",
"N",
"->",
"getOperand",
"(",
"0",
")",
";",
"if",
"(",
"Op0",
"->",
"getOpcode",
"(",
")",
"!=",
"RISCVISD",
"::",
"BuildPairF64",
")",
"break",
";",
"return",
"DCI",
".",
"CombineTo",
"(",
"N",
",",
"Op0",
".",
"getOperand",
"(",
"0",
")",
",",
"Op0",
".",
"getOperand",
"(",
"1",
")",
")",
";",
"}",
"}",
"return",
"SDValue",
"(",
")",
";",
"}",
"</s>"
] | [
"This",
"method",
"will",
"be",
"invoked",
"for",
"all",
"target",
"nodes",
"and",
"for",
"any",
"target-independent",
"nodes",
"that",
"the",
"target",
"has",
"registered",
"with",
"invoke",
"it",
"for",
"."
] | [
"RISCV",
"RISCV",
"ISD::SHL",
"ISD::SRL",
"ISD::SRA",
"64",
"\"Combine should be 64-bit only\"",
"1",
"0",
"MVT::i32",
"ISD::Constant",
"ISD::AssertZext",
"1",
"5",
"0",
"ISD::AssertZext",
"5",
"ISD::ANY_EXTEND",
"0",
"0",
"MVT::i64",
"MVT::i32",
"ISD::SIGN_EXTEND",
"MVT::i64",
"RISCVISD::SplitF64",
"0",
"RISCVISD::BuildPairF64",
"0",
"1"
] | RISCVISelLowering71 | PerformDAGCombine | RISCV | CPU | LLVM | 3,550 | 392 | 1 | [] |
[
"<s>",
"const",
"MCExpr",
"*",
"ARMElfTargetObjectFile",
"::",
"getDebugThreadLocalSymbol",
"(",
"const",
"MCSymbol",
"*",
"Sym",
")",
"const",
"{",
"return",
"MCSymbolRefExpr",
"::",
"Create",
"(",
"Sym",
",",
"MCSymbolRefExpr",
"::",
"VK_ARM_TLSLDO",
",",
"getContext",
"(",
")",
")",
";",
"}",
"</s>"
] | [
"Describe",
"a",
"TLS",
"variable",
"address",
"within",
"debug",
"info",
"."
] | [
"ARM",
"ARM",
"ARM"
] | ARMTargetObjectFile | getDebugThreadLocalSymbol | ARM | CPU | LLVM | 3,551 | 31 | 1 | [] |
[
"<s>",
"const",
"char",
"*",
"PPCTargetLowering",
"::",
"getTargetNodeName",
"(",
"unsigned",
"Opcode",
")",
"const",
"{",
"switch",
"(",
"Opcode",
")",
"{",
"default",
":",
"return",
"0",
";",
"case",
"PPCISD",
"::",
"FSEL",
":",
"return",
"\"PPCISD::FSEL\"",
";",
"case",
"PPCISD",
"::",
"FCFID",
":",
"return",
"\"PPCISD::FCFID\"",
";",
"case",
"PPCISD",
"::",
"FCTIDZ",
":",
"return",
"\"PPCISD::FCTIDZ\"",
";",
"case",
"PPCISD",
"::",
"FCTIWZ",
":",
"return",
"\"PPCISD::FCTIWZ\"",
";",
"case",
"PPCISD",
"::",
"STFIWX",
":",
"return",
"\"PPCISD::STFIWX\"",
";",
"case",
"PPCISD",
"::",
"VMADDFP",
":",
"return",
"\"PPCISD::VMADDFP\"",
";",
"case",
"PPCISD",
"::",
"VNMSUBFP",
":",
"return",
"\"PPCISD::VNMSUBFP\"",
";",
"case",
"PPCISD",
"::",
"VPERM",
":",
"return",
"\"PPCISD::VPERM\"",
";",
"case",
"PPCISD",
"::",
"Hi",
":",
"return",
"\"PPCISD::Hi\"",
";",
"case",
"PPCISD",
"::",
"Lo",
":",
"return",
"\"PPCISD::Lo\"",
";",
"case",
"PPCISD",
"::",
"TOC_ENTRY",
":",
"return",
"\"PPCISD::TOC_ENTRY\"",
";",
"case",
"PPCISD",
"::",
"TOC_RESTORE",
":",
"return",
"\"PPCISD::TOC_RESTORE\"",
";",
"case",
"PPCISD",
"::",
"LOAD",
":",
"return",
"\"PPCISD::LOAD\"",
";",
"case",
"PPCISD",
"::",
"LOAD_TOC",
":",
"return",
"\"PPCISD::LOAD_TOC\"",
";",
"case",
"PPCISD",
"::",
"DYNALLOC",
":",
"return",
"\"PPCISD::DYNALLOC\"",
";",
"case",
"PPCISD",
"::",
"GlobalBaseReg",
":",
"return",
"\"PPCISD::GlobalBaseReg\"",
";",
"case",
"PPCISD",
"::",
"SRL",
":",
"return",
"\"PPCISD::SRL\"",
";",
"case",
"PPCISD",
"::",
"SRA",
":",
"return",
"\"PPCISD::SRA\"",
";",
"case",
"PPCISD",
"::",
"SHL",
":",
"return",
"\"PPCISD::SHL\"",
";",
"case",
"PPCISD",
"::",
"EXTSW_32",
":",
"return",
"\"PPCISD::EXTSW_32\"",
";",
"case",
"PPCISD",
"::",
"STD_32",
":",
"return",
"\"PPCISD::STD_32\"",
";",
"case",
"PPCISD",
"::",
"CALL_SVR4",
":",
"return",
"\"PPCISD::CALL_SVR4\"",
";",
"case",
"PPCISD",
"::",
"CALL_Darwin",
":",
"return",
"\"PPCISD::CALL_Darwin\"",
";",
"case",
"PPCISD",
"::",
"NOP",
":",
"return",
"\"PPCISD::NOP\"",
";",
"case",
"PPCISD",
"::",
"MTCTR",
":",
"return",
"\"PPCISD::MTCTR\"",
";",
"case",
"PPCISD",
"::",
"BCTRL_Darwin",
":",
"return",
"\"PPCISD::BCTRL_Darwin\"",
";",
"case",
"PPCISD",
"::",
"BCTRL_SVR4",
":",
"return",
"\"PPCISD::BCTRL_SVR4\"",
";",
"case",
"PPCISD",
"::",
"RET_FLAG",
":",
"return",
"\"PPCISD::RET_FLAG\"",
";",
"case",
"PPCISD",
"::",
"MFCR",
":",
"return",
"\"PPCISD::MFCR\"",
";",
"case",
"PPCISD",
"::",
"VCMP",
":",
"return",
"\"PPCISD::VCMP\"",
";",
"case",
"PPCISD",
"::",
"VCMPo",
":",
"return",
"\"PPCISD::VCMPo\"",
";",
"case",
"PPCISD",
"::",
"LBRX",
":",
"return",
"\"PPCISD::LBRX\"",
";",
"case",
"PPCISD",
"::",
"STBRX",
":",
"return",
"\"PPCISD::STBRX\"",
";",
"case",
"PPCISD",
"::",
"LARX",
":",
"return",
"\"PPCISD::LARX\"",
";",
"case",
"PPCISD",
"::",
"STCX",
":",
"return",
"\"PPCISD::STCX\"",
";",
"case",
"PPCISD",
"::",
"COND_BRANCH",
":",
"return",
"\"PPCISD::COND_BRANCH\"",
";",
"case",
"PPCISD",
"::",
"MFFS",
":",
"return",
"\"PPCISD::MFFS\"",
";",
"case",
"PPCISD",
"::",
"MTFSB0",
":",
"return",
"\"PPCISD::MTFSB0\"",
";",
"case",
"PPCISD",
"::",
"MTFSB1",
":",
"return",
"\"PPCISD::MTFSB1\"",
";",
"case",
"PPCISD",
"::",
"FADDRTZ",
":",
"return",
"\"PPCISD::FADDRTZ\"",
";",
"case",
"PPCISD",
"::",
"MTFSF",
":",
"return",
"\"PPCISD::MTFSF\"",
";",
"case",
"PPCISD",
"::",
"TC_RETURN",
":",
"return",
"\"PPCISD::TC_RETURN\"",
";",
"}",
"}",
"</s>"
] | [
"getTargetNodeName",
"-",
"This",
"method",
"returns",
"the",
"name",
"of",
"a",
"target",
"specific"
] | [
"PowerPC",
"PPC",
"0",
"PPCISD::FSEL",
"\"PPCISD::FSEL\"",
"PPCISD::FCFID",
"\"PPCISD::FCFID\"",
"PPCISD::FCTIDZ",
"\"PPCISD::FCTIDZ\"",
"PPCISD::FCTIWZ",
"\"PPCISD::FCTIWZ\"",
"PPCISD::STFIWX",
"\"PPCISD::STFIWX\"",
"PPCISD::VMADDFP",
"\"PPCISD::VMADDFP\"",
"PPCISD::VNMSUBFP",
"\"PPCISD::VNMSUBFP\"",
"PPCISD::VPERM",
"\"PPCISD::VPERM\"",
"PPCISD::Hi",
"\"PPCISD::Hi\"",
"PPCISD::Lo",
"\"PPCISD::Lo\"",
"PPCISD::TOC_ENTRY",
"\"PPCISD::TOC_ENTRY\"",
"PPCISD::TOC_RESTORE",
"\"PPCISD::TOC_RESTORE\"",
"PPCISD::LOAD",
"\"PPCISD::LOAD\"",
"PPCISD::LOAD_TOC",
"\"PPCISD::LOAD_TOC\"",
"PPCISD::DYNALLOC",
"\"PPCISD::DYNALLOC\"",
"PPCISD::GlobalBaseReg",
"\"PPCISD::GlobalBaseReg\"",
"PPCISD::SRL",
"\"PPCISD::SRL\"",
"PPCISD::SRA",
"\"PPCISD::SRA\"",
"PPCISD::SHL",
"\"PPCISD::SHL\"",
"PPCISD::EXTSW_32",
"\"PPCISD::EXTSW_32\"",
"PPCISD::STD_32",
"\"PPCISD::STD_32\"",
"PPCISD::CALL_SVR4",
"\"PPCISD::CALL_SVR4\"",
"PPCISD::CALL_Darwin",
"\"PPCISD::CALL_Darwin\"",
"PPCISD::NOP",
"\"PPCISD::NOP\"",
"PPCISD::MTCTR",
"\"PPCISD::MTCTR\"",
"PPCISD::BCTRL_Darwin",
"\"PPCISD::BCTRL_Darwin\"",
"PPCISD::BCTRL_SVR4",
"\"PPCISD::BCTRL_SVR4\"",
"PPCISD::RET_FLAG",
"\"PPCISD::RET_FLAG\"",
"PPCISD::MFCR",
"\"PPCISD::MFCR\"",
"PPCISD::VCMP",
"\"PPCISD::VCMP\"",
"PPCISD::VCMPo",
"\"PPCISD::VCMPo\"",
"PPCISD::LBRX",
"\"PPCISD::LBRX\"",
"PPCISD::STBRX",
"\"PPCISD::STBRX\"",
"PPCISD::LARX",
"\"PPCISD::LARX\"",
"PPCISD::STCX",
"\"PPCISD::STCX\"",
"PPCISD::COND_BRANCH",
"\"PPCISD::COND_BRANCH\"",
"PPCISD::MFFS",
"\"PPCISD::MFFS\"",
"PPCISD::MTFSB0",
"\"PPCISD::MTFSB0\"",
"PPCISD::MTFSB1",
"\"PPCISD::MTFSB1\"",
"PPCISD::FADDRTZ",
"\"PPCISD::FADDRTZ\"",
"PPCISD::MTFSF",
"\"PPCISD::MTFSF\"",
"PPCISD::TC_RETURN",
"\"PPCISD::TC_RETURN\""
] | PPCISelLowering107 | getTargetNodeName | PowerPC | CPU | LLVM | 3,552 | 360 | 1 | [] |
[
"<s>",
"static",
"std",
"::",
"unique_ptr",
"<",
"AVROperand",
">",
"CreateReg",
"(",
"unsigned",
"RegNum",
",",
"SMLoc",
"S",
",",
"SMLoc",
"E",
")",
"{",
"return",
"make_unique",
"<",
"AVROperand",
">",
"(",
"RegNum",
",",
"S",
",",
"E",
")",
";",
"}",
"</s>"
] | [
"CreateReg",
"-",
"Allocate",
"a",
"single",
"virtual",
"register",
"for",
"the",
"given",
"type",
"."
] | [
"AVR",
"AVR",
"AVR"
] | AVRAsmParser1 | CreateReg | AVR | MPU | LLVM | 3,553 | 33 | 1 | [] |
[
"<s>",
"static",
"void",
"mips_sim_wait_regs",
"(",
"struct",
"mips_sim",
"*",
"state",
",",
"rtx",
"insn",
")",
"{",
"mips_sim_insn",
"=",
"insn",
";",
"note_uses",
"(",
"&",
"PATTERN",
"(",
"insn",
")",
",",
"mips_sim_wait_regs_1",
",",
"state",
")",
";",
"}",
"</s>"
] | [
"Advance",
"simulation",
"state",
"STATE",
"until",
"all",
"of",
"INSN",
"'s",
"register",
"dependencies",
"are",
"satisfied",
"."
] | [
"mips"
] | mips3 | mips_sim_wait_regs | mips | CPU | GCC | 3,554 | 31 | 1 | [] |
[
"<s>",
"void",
"arc_split_move",
"(",
"rtx",
"*",
"operands",
")",
"{",
"machine_mode",
"mode",
"=",
"GET_MODE",
"(",
"operands",
"[",
"0",
"]",
")",
";",
"int",
"i",
";",
"int",
"swap",
"=",
"0",
";",
"rtx",
"xop",
"[",
"4",
"]",
";",
"if",
"(",
"TARGET_DPFP",
")",
"{",
"if",
"(",
"arc_process_double_reg_moves",
"(",
"operands",
")",
")",
"return",
";",
"}",
"if",
"(",
"TARGET_LL64",
"&&",
"(",
"(",
"memory_operand",
"(",
"operands",
"[",
"0",
"]",
",",
"mode",
")",
"&&",
"even_register_operand",
"(",
"operands",
"[",
"1",
"]",
",",
"mode",
")",
")",
"||",
"(",
"memory_operand",
"(",
"operands",
"[",
"1",
"]",
",",
"mode",
")",
"&&",
"even_register_operand",
"(",
"operands",
"[",
"0",
"]",
",",
"mode",
")",
")",
")",
")",
"{",
"emit_move_insn",
"(",
"operands",
"[",
"0",
"]",
",",
"operands",
"[",
"1",
"]",
")",
";",
"return",
";",
"}",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"2",
";",
"i",
"++",
")",
"{",
"if",
"(",
"MEM_P",
"(",
"operands",
"[",
"i",
"]",
")",
"&&",
"auto_inc_p",
"(",
"XEXP",
"(",
"operands",
"[",
"i",
"]",
",",
"0",
")",
")",
")",
"{",
"rtx",
"addr",
"=",
"XEXP",
"(",
"operands",
"[",
"i",
"]",
",",
"0",
")",
";",
"rtx",
"r",
",",
"o",
";",
"enum",
"rtx_code",
"code",
";",
"gcc_assert",
"(",
"!",
"reg_overlap_mentioned_p",
"(",
"operands",
"[",
"0",
"]",
",",
"addr",
")",
")",
";",
"switch",
"(",
"GET_CODE",
"(",
"addr",
")",
")",
"{",
"case",
"PRE_DEC",
":",
"o",
"=",
"GEN_INT",
"(",
"-",
"8",
")",
";",
"goto",
"pre_modify",
";",
"case",
"PRE_INC",
":",
"o",
"=",
"GEN_INT",
"(",
"8",
")",
";",
"goto",
"pre_modify",
";",
"case",
"PRE_MODIFY",
":",
"o",
"=",
"XEXP",
"(",
"XEXP",
"(",
"addr",
",",
"1",
")",
",",
"1",
")",
";",
"pre_modify",
":",
"code",
"=",
"PRE_MODIFY",
";",
"break",
";",
"case",
"POST_DEC",
":",
"o",
"=",
"GEN_INT",
"(",
"-",
"8",
")",
";",
"goto",
"post_modify",
";",
"case",
"POST_INC",
":",
"o",
"=",
"GEN_INT",
"(",
"8",
")",
";",
"goto",
"post_modify",
";",
"case",
"POST_MODIFY",
":",
"o",
"=",
"XEXP",
"(",
"XEXP",
"(",
"addr",
",",
"1",
")",
",",
"1",
")",
";",
"post_modify",
":",
"code",
"=",
"POST_MODIFY",
";",
"swap",
"=",
"2",
";",
"break",
";",
"default",
":",
"gcc_unreachable",
"(",
")",
";",
"}",
"r",
"=",
"XEXP",
"(",
"addr",
",",
"0",
")",
";",
"xop",
"[",
"0",
"+",
"i",
"]",
"=",
"adjust_automodify_address_nv",
"(",
"operands",
"[",
"i",
"]",
",",
"SImode",
",",
"gen_rtx_fmt_ee",
"(",
"code",
",",
"Pmode",
",",
"r",
",",
"gen_rtx_PLUS",
"(",
"Pmode",
",",
"r",
",",
"o",
")",
")",
",",
"0",
")",
";",
"xop",
"[",
"2",
"+",
"i",
"]",
"=",
"adjust_automodify_address_nv",
"(",
"operands",
"[",
"i",
"]",
",",
"SImode",
",",
"plus_constant",
"(",
"Pmode",
",",
"r",
",",
"4",
")",
",",
"4",
")",
";",
"}",
"else",
"{",
"xop",
"[",
"0",
"+",
"i",
"]",
"=",
"operand_subword",
"(",
"operands",
"[",
"i",
"]",
",",
"0",
",",
"0",
",",
"mode",
")",
";",
"xop",
"[",
"2",
"+",
"i",
"]",
"=",
"operand_subword",
"(",
"operands",
"[",
"i",
"]",
",",
"1",
",",
"0",
",",
"mode",
")",
";",
"}",
"}",
"if",
"(",
"reg_overlap_mentioned_p",
"(",
"xop",
"[",
"0",
"]",
",",
"xop",
"[",
"3",
"]",
")",
")",
"{",
"swap",
"=",
"2",
";",
"gcc_assert",
"(",
"!",
"reg_overlap_mentioned_p",
"(",
"xop",
"[",
"2",
"]",
",",
"xop",
"[",
"1",
"]",
")",
")",
";",
"}",
"emit_move_insn",
"(",
"xop",
"[",
"0",
"+",
"swap",
"]",
",",
"xop",
"[",
"1",
"+",
"swap",
"]",
")",
";",
"emit_move_insn",
"(",
"xop",
"[",
"2",
"-",
"swap",
"]",
",",
"xop",
"[",
"3",
"-",
"swap",
"]",
")",
";",
"}",
"</s>"
] | [
"operands",
"0",
"..",
"1",
"are",
"the",
"operands",
"of",
"a",
"64",
"bit",
"move",
"instruction",
".",
"split",
"it",
"into",
"two",
"moves",
"with",
"operands",
"2/3",
"and",
"4/5",
"."
] | [
"arc",
"0",
"0",
"4",
"0",
"1",
"1",
"0",
"0",
"1",
"0",
"2",
"0",
"0",
"0",
"8",
"8",
"1",
"1",
"8",
"8",
"1",
"1",
"2",
"0",
"0",
"0",
"2",
"4",
"4",
"0",
"0",
"0",
"2",
"1",
"0",
"0",
"3",
"2",
"2",
"1",
"0",
"1",
"2",
"3"
] | arc5 | arc_split_move | arc | MPU | GCC | 3,555 | 506 | 1 | [] |
[
"<s>",
"MachineBasicBlock",
"*",
"ARMTargetLowering",
"::",
"EmitInstrWithCustomInserter",
"(",
"MachineInstr",
"*",
"MI",
",",
"MachineBasicBlock",
"*",
"BB",
")",
"const",
"{",
"const",
"TargetInstrInfo",
"*",
"TII",
"=",
"getTargetMachine",
"(",
")",
".",
"getInstrInfo",
"(",
")",
";",
"DebugLoc",
"dl",
"=",
"MI",
"->",
"getDebugLoc",
"(",
")",
";",
"switch",
"(",
"MI",
"->",
"getOpcode",
"(",
")",
")",
"{",
"default",
":",
"assert",
"(",
"false",
"&&",
"\"Unexpected instr type to insert\"",
")",
";",
"case",
"ARM",
"::",
"tMOVCCr",
":",
"{",
"const",
"BasicBlock",
"*",
"LLVM_BB",
"=",
"BB",
"->",
"getBasicBlock",
"(",
")",
";",
"MachineFunction",
"::",
"iterator",
"It",
"=",
"BB",
";",
"++",
"It",
";",
"MachineBasicBlock",
"*",
"thisMBB",
"=",
"BB",
";",
"MachineFunction",
"*",
"F",
"=",
"BB",
"->",
"getParent",
"(",
")",
";",
"MachineBasicBlock",
"*",
"copy0MBB",
"=",
"F",
"->",
"CreateMachineBasicBlock",
"(",
"LLVM_BB",
")",
";",
"MachineBasicBlock",
"*",
"sinkMBB",
"=",
"F",
"->",
"CreateMachineBasicBlock",
"(",
"LLVM_BB",
")",
";",
"BuildMI",
"(",
"BB",
",",
"dl",
",",
"TII",
"->",
"get",
"(",
"ARM",
"::",
"tBcc",
")",
")",
".",
"addMBB",
"(",
"sinkMBB",
")",
".",
"addImm",
"(",
"MI",
"->",
"getOperand",
"(",
"3",
")",
".",
"getImm",
"(",
")",
")",
".",
"addReg",
"(",
"MI",
"->",
"getOperand",
"(",
"4",
")",
".",
"getReg",
"(",
")",
")",
";",
"F",
"->",
"insert",
"(",
"It",
",",
"copy0MBB",
")",
";",
"F",
"->",
"insert",
"(",
"It",
",",
"sinkMBB",
")",
";",
"for",
"(",
"MachineBasicBlock",
"::",
"succ_iterator",
"i",
"=",
"BB",
"->",
"succ_begin",
"(",
")",
",",
"e",
"=",
"BB",
"->",
"succ_end",
"(",
")",
";",
"i",
"!=",
"e",
";",
"++",
"i",
")",
"sinkMBB",
"->",
"addSuccessor",
"(",
"*",
"i",
")",
";",
"while",
"(",
"!",
"BB",
"->",
"succ_empty",
"(",
")",
")",
"BB",
"->",
"removeSuccessor",
"(",
"BB",
"->",
"succ_begin",
"(",
")",
")",
";",
"BB",
"->",
"addSuccessor",
"(",
"copy0MBB",
")",
";",
"BB",
"->",
"addSuccessor",
"(",
"sinkMBB",
")",
";",
"BB",
"=",
"copy0MBB",
";",
"BB",
"->",
"addSuccessor",
"(",
"sinkMBB",
")",
";",
"BB",
"=",
"sinkMBB",
";",
"BuildMI",
"(",
"BB",
",",
"dl",
",",
"TII",
"->",
"get",
"(",
"ARM",
"::",
"PHI",
")",
",",
"MI",
"->",
"getOperand",
"(",
"0",
")",
".",
"getReg",
"(",
")",
")",
".",
"addReg",
"(",
"MI",
"->",
"getOperand",
"(",
"1",
")",
".",
"getReg",
"(",
")",
")",
".",
"addMBB",
"(",
"copy0MBB",
")",
".",
"addReg",
"(",
"MI",
"->",
"getOperand",
"(",
"2",
")",
".",
"getReg",
"(",
")",
")",
".",
"addMBB",
"(",
"thisMBB",
")",
";",
"F",
"->",
"DeleteMachineInstr",
"(",
"MI",
")",
";",
"return",
"BB",
";",
"}",
"}",
"}",
"</s>"
] | [
"This",
"method",
"should",
"be",
"implemented",
"by",
"targets",
"that",
"mark",
"instructions",
"with",
"the",
"'usesCustomInserter",
"'",
"flag",
"."
] | [
"ARM",
"ARM",
"\"Unexpected instr type to insert\"",
"ARM::tMOVCCr",
"ARM::tBcc",
"3",
"4",
"ARM::PHI",
"0",
"1",
"2"
] | ARMISelLowering124 | EmitInstrWithCustomInserter | ARM | CPU | LLVM | 3,556 | 351 | 1 | [] |
[
"<s>",
"MachineBasicBlock",
"::",
"iterator",
"WebAssemblyFrameLowering",
"::",
"eliminateCallFramePseudoInstr",
"(",
"MachineFunction",
"&",
"MF",
",",
"MachineBasicBlock",
"&",
"MBB",
",",
"MachineBasicBlock",
"::",
"iterator",
"I",
")",
"const",
"{",
"assert",
"(",
"!",
"I",
"->",
"getOperand",
"(",
"0",
")",
".",
"getImm",
"(",
")",
"&&",
"(",
"hasFP",
"(",
"MF",
")",
"||",
"hasBP",
"(",
"MF",
")",
")",
"&&",
"\"Call frame pseudos should only be used for dynamic stack adjustment\"",
")",
";",
"const",
"auto",
"*",
"TII",
"=",
"MF",
".",
"getSubtarget",
"<",
"WebAssemblySubtarget",
">",
"(",
")",
".",
"getInstrInfo",
"(",
")",
";",
"if",
"(",
"I",
"->",
"getOpcode",
"(",
")",
"==",
"TII",
"->",
"getCallFrameDestroyOpcode",
"(",
")",
"&&",
"needsSPWriteback",
"(",
"MF",
",",
"MF",
".",
"getFrameInfo",
"(",
")",
")",
")",
"{",
"DebugLoc",
"DL",
"=",
"I",
"->",
"getDebugLoc",
"(",
")",
";",
"writeSPToMemory",
"(",
"WebAssembly",
"::",
"SP32",
",",
"MF",
",",
"MBB",
",",
"I",
",",
"I",
",",
"DL",
")",
";",
"}",
"return",
"MBB",
".",
"erase",
"(",
"I",
")",
";",
"}",
"</s>"
] | [
"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",
")",
"."
] | [
"WebAssembly",
"WebAssembly",
"0",
"\"Call frame pseudos should only be used for dynamic stack adjustment\"",
"WebAssembly",
"WebAssembly::SP32"
] | WebAssemblyFrameLowering | eliminateCallFramePseudoInstr | WebAssembly | Virtual ISA | LLVM | 3,557 | 131 | 1 | [] |
[
"<s>",
"bool",
"HexagonFixupHwLoops",
"::",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"MF",
")",
"{",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"****** Hexagon Hardware Loop Fixup ******\\n\"",
")",
";",
"bool",
"Changed",
"=",
"fixupLoopInstrs",
"(",
"MF",
")",
";",
"return",
"Changed",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"Hexagon",
"Hexagon",
"\"****** Hexagon Hardware Loop Fixup ******\\n\""
] | HexagonHardwareLoops16 | runOnMachineFunction | Hexagon | DSP | LLVM | 3,558 | 31 | 1 | [] |
[
"<s>",
"static",
"bool",
"arc_can_follow_jump",
"(",
"const",
"rtx_insn",
"*",
"follower",
",",
"const",
"rtx_insn",
"*",
"followee",
")",
"{",
"union",
"{",
"const",
"rtx_insn",
"*",
"c",
";",
"rtx_insn",
"*",
"r",
";",
"}",
"u",
";",
"u",
".",
"c",
"=",
"follower",
";",
"if",
"(",
"CROSSING_JUMP_P",
"(",
"followee",
")",
")",
"switch",
"(",
"get_attr_type",
"(",
"u",
".",
"r",
")",
")",
"{",
"case",
"TYPE_BRANCH",
":",
"if",
"(",
"get_attr_length",
"(",
"u",
".",
"r",
")",
"!=",
"2",
")",
"break",
";",
"case",
"TYPE_BRCC",
":",
"case",
"TYPE_BRCC_NO_DELAY_SLOT",
":",
"return",
"false",
";",
"default",
":",
"return",
"true",
";",
"}",
"return",
"true",
";",
"}",
"</s>"
] | [
"Without",
"this",
",",
"gcc.dg/tree-prof/bb-reorg.c",
"fails",
"to",
"assemble",
"when",
"compiling",
"with",
"-O2",
"-freorder-blocks-and-partition",
"-fprofile-use",
"-D_PROFILE_USE",
";",
"delay",
"branch",
"scheduling",
"then",
"follows",
"a",
"crossing",
"jump",
"to",
"redirect",
"two",
"breqs",
"."
] | [
"arc",
"2"
] | arc | arc_can_follow_jump | arc | MPU | GCC | 3,559 | 87 | 1 | [] |
[
"<s>",
"static",
"HOST_WIDE_INT",
"riscv_stack_align",
"(",
"HOST_WIDE_INT",
"value",
")",
"{",
"return",
"RISCV_STACK_ALIGN",
"(",
"value",
")",
";",
"}",
"</s>"
] | [
"Handle",
"stack",
"align",
"for",
"poly_int",
"."
] | [
"riscv"
] | riscv1 | riscv_stack_align | riscv | CPU | GCC | 3,560 | 15 | 1 | [] |
[
"<s>",
"static",
"void",
"build_all",
"(",
"function_builder",
"&",
"b",
",",
"const",
"char",
"*",
"signature",
",",
"const",
"function_group_info",
"&",
"group",
",",
"mode_suffix_index",
"mode_suffix_id",
",",
"bool",
"force_direct_overloads",
"=",
"false",
")",
"{",
"for",
"(",
"unsigned",
"int",
"pi",
"=",
"0",
";",
"group",
".",
"preds",
"[",
"pi",
"]",
"!=",
"NUM_PREDS",
";",
"++",
"pi",
")",
"for",
"(",
"unsigned",
"int",
"ti",
"=",
"0",
";",
"ti",
"==",
"0",
"||",
"group",
".",
"types",
"[",
"ti",
"]",
"[",
"0",
"]",
"!=",
"NUM_TYPE_SUFFIXES",
";",
"++",
"ti",
")",
"build_one",
"(",
"b",
",",
"signature",
",",
"group",
",",
"mode_suffix_id",
",",
"ti",
",",
"pi",
",",
"force_direct_overloads",
")",
";",
"}",
"</s>"
] | [
"Add",
"a",
"function",
"instance",
"for",
"every",
"operand",
"&",
"&",
"predicate",
"&",
"&",
"args",
"combination",
"in",
"GROUP",
".",
"Take",
"the",
"function",
"base",
"name",
"from",
"GROUP",
"&",
"&",
"operand",
"suffix",
"from",
"operand_suffixes",
"&",
"&",
"mode",
"suffix",
"from",
"type_suffixes",
"&",
"&",
"predication",
"suffix",
"from",
"predication_suffixes",
".",
"Use",
"apply_predication",
"to",
"add",
"in",
"the",
"predicate",
"."
] | [
"aarch64",
"0",
"0",
"0",
"0"
] | aarch64-sve-builtins-shapes | build_all | aarch64 | CPU | GCC | 3,561 | 92 | 1 | [] |
[
"<s>",
"bool",
"PPCBranchCoalescing",
"::",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"MF",
")",
"{",
"if",
"(",
"skipFunction",
"(",
"*",
"MF",
".",
"getFunction",
"(",
")",
")",
"||",
"MF",
".",
"empty",
"(",
")",
")",
"return",
"false",
";",
"bool",
"didSomething",
"=",
"false",
";",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"******** Branch Coalescing ********\\n\"",
")",
";",
"initialize",
"(",
"MF",
")",
";",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Function: \"",
";",
"MF",
".",
"dump",
"(",
")",
";",
"dbgs",
"(",
")",
"<<",
"\"\\n\"",
")",
";",
"CoalescingCandidateInfo",
"Cand1",
",",
"Cand2",
";",
"for",
"(",
"MachineBasicBlock",
"&",
"MBB",
":",
"MF",
")",
"{",
"bool",
"MergedCandidates",
"=",
"false",
";",
"do",
"{",
"MergedCandidates",
"=",
"false",
";",
"Cand1",
".",
"clear",
"(",
")",
";",
"Cand2",
".",
"clear",
"(",
")",
";",
"Cand1",
".",
"BranchBlock",
"=",
"&",
"MBB",
";",
"if",
"(",
"!",
"canCoalesceBranch",
"(",
"Cand1",
")",
")",
"break",
";",
"Cand2",
".",
"BranchBlock",
"=",
"Cand1",
".",
"BranchTargetBlock",
";",
"if",
"(",
"!",
"canCoalesceBranch",
"(",
"Cand2",
")",
")",
"break",
";",
"assert",
"(",
"MPDT",
"->",
"dominates",
"(",
"Cand2",
".",
"BranchTargetBlock",
",",
"Cand1",
".",
"BranchBlock",
")",
"&&",
"\"Branch-taken block should post-dominate first candidate\"",
")",
";",
"if",
"(",
"!",
"identicalOperands",
"(",
"Cand1",
".",
"Cond",
",",
"Cand2",
".",
"Cond",
")",
")",
"{",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Blocks \"",
"<<",
"Cand1",
".",
"BranchBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\" and \"",
"<<",
"Cand2",
".",
"BranchBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\" have different branches\\n\"",
")",
";",
"break",
";",
"}",
"if",
"(",
"!",
"canMerge",
"(",
"Cand2",
",",
"Cand1",
")",
")",
"{",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Cannot merge blocks \"",
"<<",
"Cand1",
".",
"BranchBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\" and \"",
"<<",
"Cand2",
".",
"BranchBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\"\\n\"",
")",
";",
"NumBlocksNotCoalesced",
"++",
";",
"continue",
";",
"}",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Merging blocks \"",
"<<",
"Cand1",
".",
"BranchBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\" and \"",
"<<",
"Cand1",
".",
"BranchTargetBlock",
"->",
"getNumber",
"(",
")",
"<<",
"\"\\n\"",
")",
";",
"MergedCandidates",
"=",
"mergeCandidates",
"(",
"Cand2",
",",
"Cand1",
")",
";",
"if",
"(",
"MergedCandidates",
")",
"didSomething",
"=",
"true",
";",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Function after merging: \"",
";",
"MF",
".",
"dump",
"(",
")",
";",
"dbgs",
"(",
")",
"<<",
"\"\\n\"",
")",
";",
"}",
"while",
"(",
"MergedCandidates",
")",
";",
"}",
"if",
"(",
"didSomething",
")",
"MF",
".",
"verify",
"(",
"nullptr",
",",
"\"Error in code produced by branch coalescing\"",
")",
";",
"DEBUG",
"(",
"dbgs",
"(",
")",
"<<",
"\"Finished Branch Coalescing\\n\"",
")",
";",
"return",
"didSomething",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"PowerPC",
"PPC",
"\"******** Branch Coalescing ********\\n\"",
"\"Function: \"",
"\"\\n\"",
"\"Branch-taken block should post-dominate first candidate\"",
"\"Blocks \"",
"\" and \"",
"\" have different branches\\n\"",
"\"Cannot merge blocks \"",
"\" and \"",
"\"\\n\"",
"\"Merging blocks \"",
"\" and \"",
"\"\\n\"",
"\"Function after merging: \"",
"\"\\n\"",
"\"Error in code produced by branch coalescing\"",
"\"Finished Branch Coalescing\\n\""
] | PPCBranchCoalescing2 | runOnMachineFunction | PowerPC | CPU | LLVM | 3,562 | 354 | 1 | [] |
[
"<s>",
"const",
"RegisterBankInfo",
"::",
"InstructionMapping",
"&",
"X86RegisterBankInfo",
"::",
"getInstrMapping",
"(",
"const",
"MachineInstr",
"&",
"MI",
")",
"const",
"{",
"const",
"MachineFunction",
"&",
"MF",
"=",
"*",
"MI",
".",
"getParent",
"(",
")",
"->",
"getParent",
"(",
")",
";",
"const",
"MachineRegisterInfo",
"&",
"MRI",
"=",
"MF",
".",
"getRegInfo",
"(",
")",
";",
"auto",
"Opc",
"=",
"MI",
".",
"getOpcode",
"(",
")",
";",
"if",
"(",
"!",
"isPreISelGenericOpcode",
"(",
"Opc",
")",
"||",
"Opc",
"==",
"TargetOpcode",
"::",
"G_PHI",
")",
"{",
"const",
"InstructionMapping",
"&",
"Mapping",
"=",
"getInstrMappingImpl",
"(",
"MI",
")",
";",
"if",
"(",
"Mapping",
".",
"isValid",
"(",
")",
")",
"return",
"Mapping",
";",
"}",
"switch",
"(",
"Opc",
")",
"{",
"case",
"TargetOpcode",
"::",
"G_ADD",
":",
"case",
"TargetOpcode",
"::",
"G_SUB",
":",
"return",
"getSameOperandsMapping",
"(",
"MI",
",",
"false",
")",
";",
"break",
";",
"case",
"TargetOpcode",
"::",
"G_FADD",
":",
"case",
"TargetOpcode",
"::",
"G_FSUB",
":",
"case",
"TargetOpcode",
"::",
"G_FMUL",
":",
"case",
"TargetOpcode",
"::",
"G_FDIV",
":",
"return",
"getSameOperandsMapping",
"(",
"MI",
",",
"true",
")",
";",
"break",
";",
"default",
":",
"break",
";",
"}",
"unsigned",
"NumOperands",
"=",
"MI",
".",
"getNumOperands",
"(",
")",
";",
"SmallVector",
"<",
"PartialMappingIdx",
",",
"4",
">",
"OpRegBankIdx",
"(",
"NumOperands",
")",
";",
"switch",
"(",
"Opc",
")",
"{",
"case",
"TargetOpcode",
"::",
"G_FPEXT",
":",
"case",
"TargetOpcode",
"::",
"G_FCONSTANT",
":",
"getInstrPartialMappingIdxs",
"(",
"MI",
",",
"MRI",
",",
"true",
",",
"OpRegBankIdx",
")",
";",
"break",
";",
"case",
"TargetOpcode",
"::",
"G_TRUNC",
":",
"case",
"TargetOpcode",
"::",
"G_ANYEXT",
":",
"{",
"auto",
"&",
"Op0",
"=",
"MI",
".",
"getOperand",
"(",
"0",
")",
";",
"auto",
"&",
"Op1",
"=",
"MI",
".",
"getOperand",
"(",
"1",
")",
";",
"const",
"LLT",
"Ty0",
"=",
"MRI",
".",
"getType",
"(",
"Op0",
".",
"getReg",
"(",
")",
")",
";",
"const",
"LLT",
"Ty1",
"=",
"MRI",
".",
"getType",
"(",
"Op1",
".",
"getReg",
"(",
")",
")",
";",
"bool",
"isFPTrunc",
"=",
"(",
"Ty0",
".",
"getSizeInBits",
"(",
")",
"==",
"32",
"||",
"Ty0",
".",
"getSizeInBits",
"(",
")",
"==",
"64",
")",
"&&",
"Ty1",
".",
"getSizeInBits",
"(",
")",
"==",
"128",
"&&",
"Opc",
"==",
"TargetOpcode",
"::",
"G_TRUNC",
";",
"bool",
"isFPAnyExt",
"=",
"Ty0",
".",
"getSizeInBits",
"(",
")",
"==",
"128",
"&&",
"(",
"Ty1",
".",
"getSizeInBits",
"(",
")",
"==",
"32",
"||",
"Ty1",
".",
"getSizeInBits",
"(",
")",
"==",
"64",
")",
"&&",
"Opc",
"==",
"TargetOpcode",
"::",
"G_ANYEXT",
";",
"getInstrPartialMappingIdxs",
"(",
"MI",
",",
"MRI",
",",
"isFPTrunc",
"||",
"isFPAnyExt",
",",
"OpRegBankIdx",
")",
";",
"}",
"break",
";",
"default",
":",
"getInstrPartialMappingIdxs",
"(",
"MI",
",",
"MRI",
",",
"false",
",",
"OpRegBankIdx",
")",
";",
"break",
";",
"}",
"SmallVector",
"<",
"const",
"ValueMapping",
"*",
",",
"8",
">",
"OpdsMapping",
"(",
"NumOperands",
")",
";",
"if",
"(",
"!",
"getInstrValueMapping",
"(",
"MI",
",",
"OpRegBankIdx",
",",
"OpdsMapping",
")",
")",
"return",
"getInvalidInstructionMapping",
"(",
")",
";",
"return",
"getInstructionMapping",
"(",
"DefaultMappingID",
",",
"1",
",",
"getOperandsMapping",
"(",
"OpdsMapping",
")",
",",
"NumOperands",
")",
";",
"}",
"</s>"
] | [
"Get",
"the",
"mapping",
"of",
"the",
"different",
"operands",
"of",
"MI",
"on",
"the",
"register",
"bank",
"."
] | [
"X86",
"X86",
"4",
"0",
"1",
"32",
"64",
"128",
"128",
"32",
"64",
"8",
"1"
] | X86RegisterBankInfo5 | getInstrMapping | X86 | CPU | LLVM | 3,563 | 408 | 1 | [] |
[
"<s>",
"StringRef",
"getPassName",
"(",
")",
"const",
"override",
"{",
"return",
"\"TOY DAG->DAG Pattern Instruction Selection\"",
";",
"}",
"</s>"
] | [
"getPassName",
"-",
"Return",
"a",
"nice",
"clean",
"name",
"for",
"a",
"pass",
"."
] | [
"TOY",
"\"TOY DAG->DAG Pattern Instruction Selection\""
] | TOYISelDAGToDAG1 | getPassName | TOY | CPU | LLVM | 3,564 | 11 | 1 | [] |
[
"<s>",
"static",
"void",
"nds32_emit_isr_jmptbl_section",
"(",
"int",
"vector_id",
")",
"{",
"char",
"section_name",
"[",
"100",
"]",
";",
"char",
"symbol_name",
"[",
"100",
"]",
";",
"if",
"(",
"nds32_isr_vectors",
"[",
"vector_id",
"]",
".",
"nested_type",
"==",
"NDS32_CRITICAL",
")",
"{",
"fprintf",
"(",
"asm_out_file",
",",
"\"\\t! The vector %02d is a critical isr !\\n\"",
",",
"vector_id",
")",
";",
"return",
";",
"}",
"snprintf",
"(",
"section_name",
",",
"sizeof",
"(",
"section_name",
")",
",",
"\".nds32_jmptbl.%02d\"",
",",
"vector_id",
")",
";",
"snprintf",
"(",
"symbol_name",
",",
"sizeof",
"(",
"symbol_name",
")",
",",
"\"_nds32_jmptbl_%02d\"",
",",
"vector_id",
")",
";",
"nds32_emit_section_head_template",
"(",
"section_name",
",",
"symbol_name",
",",
"2",
",",
"true",
")",
";",
"fprintf",
"(",
"asm_out_file",
",",
"\"\\t.word\\t%s\\n\"",
",",
"nds32_isr_vectors",
"[",
"vector_id",
"]",
".",
"func_name",
")",
";",
"nds32_emit_section_tail_template",
"(",
"symbol_name",
")",
";",
"}",
"</s>"
] | [
"Function",
"to",
"emit",
"isr",
"jump",
"table",
"section",
"."
] | [
"nds32",
"100",
"100",
"\"\\t! The vector %02d is a critical isr !\\n\"",
"\".nds32_jmptbl.%02d\"",
"\"_nds32_jmptbl_%02d\"",
"2",
"\"\\t.word\\t%s\\n\""
] | nds32-isr | nds32_emit_isr_jmptbl_section | nds32 | CPU | GCC | 3,565 | 103 | 1 | [] |
[
"<s>",
"void",
"AArch64AsmBackend",
"::",
"relaxInstruction",
"(",
"const",
"MCInst",
"&",
"Inst",
",",
"const",
"MCSubtargetInfo",
"&",
"STI",
",",
"MCInst",
"&",
"Res",
")",
"const",
"{",
"llvm_unreachable",
"(",
"\"AArch64AsmBackend::relaxInstruction() unimplemented\"",
")",
";",
"}",
"</s>"
] | [
"Relax",
"the",
"instruction",
"in",
"the",
"given",
"fragment",
"to",
"the",
"next",
"wider",
"instruction",
"."
] | [
"AArch64",
"AArch64",
"\"AArch64AsmBackend::relaxInstruction() unimplemented\""
] | AArch64AsmBackend1 | relaxInstruction | AArch64 | CPU | LLVM | 3,566 | 27 | 1 | [] |
[
"<s>",
"void",
"AArch64FrameLowering",
"::",
"emitEpilogue",
"(",
"MachineFunction",
"&",
"MF",
",",
"MachineBasicBlock",
"&",
"MBB",
")",
"const",
"{",
"MachineBasicBlock",
"::",
"iterator",
"MBBI",
"=",
"MBB",
".",
"getLastNonDebugInstr",
"(",
")",
";",
"assert",
"(",
"MBBI",
"->",
"isReturn",
"(",
")",
"&&",
"\"Can only insert epilog into returning blocks\"",
")",
";",
"MachineFrameInfo",
"*",
"MFI",
"=",
"MF",
".",
"getFrameInfo",
"(",
")",
";",
"const",
"AArch64InstrInfo",
"*",
"TII",
"=",
"static_cast",
"<",
"const",
"AArch64InstrInfo",
"*",
">",
"(",
"MF",
".",
"getSubtarget",
"(",
")",
".",
"getInstrInfo",
"(",
")",
")",
";",
"const",
"AArch64RegisterInfo",
"*",
"RegInfo",
"=",
"static_cast",
"<",
"const",
"AArch64RegisterInfo",
"*",
">",
"(",
"MF",
".",
"getSubtarget",
"(",
")",
".",
"getRegisterInfo",
"(",
")",
")",
";",
"DebugLoc",
"DL",
"=",
"MBBI",
"->",
"getDebugLoc",
"(",
")",
";",
"unsigned",
"RetOpcode",
"=",
"MBBI",
"->",
"getOpcode",
"(",
")",
";",
"int",
"NumBytes",
"=",
"MFI",
"->",
"getStackSize",
"(",
")",
";",
"const",
"AArch64FunctionInfo",
"*",
"AFI",
"=",
"MF",
".",
"getInfo",
"<",
"AArch64FunctionInfo",
">",
"(",
")",
";",
"uint64_t",
"ArgumentPopSize",
"=",
"0",
";",
"if",
"(",
"RetOpcode",
"==",
"AArch64",
"::",
"TCRETURNdi",
"||",
"RetOpcode",
"==",
"AArch64",
"::",
"TCRETURNri",
")",
"{",
"MachineOperand",
"&",
"StackAdjust",
"=",
"MBBI",
"->",
"getOperand",
"(",
"1",
")",
";",
"ArgumentPopSize",
"=",
"StackAdjust",
".",
"getImm",
"(",
")",
";",
"}",
"else",
"{",
"ArgumentPopSize",
"=",
"AFI",
"->",
"getArgumentStackToRestore",
"(",
")",
";",
"}",
"NumBytes",
"+=",
"ArgumentPopSize",
";",
"unsigned",
"NumRestores",
"=",
"0",
";",
"MachineBasicBlock",
"::",
"iterator",
"LastPopI",
"=",
"MBBI",
";",
"const",
"MCPhysReg",
"*",
"CSRegs",
"=",
"RegInfo",
"->",
"getCalleeSavedRegs",
"(",
"&",
"MF",
")",
";",
"if",
"(",
"LastPopI",
"!=",
"MBB",
".",
"begin",
"(",
")",
")",
"{",
"do",
"{",
"++",
"NumRestores",
";",
"--",
"LastPopI",
";",
"}",
"while",
"(",
"LastPopI",
"!=",
"MBB",
".",
"begin",
"(",
")",
"&&",
"isCSRestore",
"(",
"LastPopI",
",",
"CSRegs",
")",
")",
";",
"if",
"(",
"!",
"isCSRestore",
"(",
"LastPopI",
",",
"CSRegs",
")",
")",
"{",
"++",
"LastPopI",
";",
"--",
"NumRestores",
";",
"}",
"}",
"NumBytes",
"-=",
"NumRestores",
"*",
"16",
";",
"assert",
"(",
"NumBytes",
">=",
"0",
"&&",
"\"Negative stack allocation size!?\"",
")",
";",
"if",
"(",
"!",
"hasFP",
"(",
"MF",
")",
")",
"{",
"if",
"(",
"!",
"canUseRedZone",
"(",
"MF",
")",
")",
"emitFrameOffset",
"(",
"MBB",
",",
"LastPopI",
",",
"DL",
",",
"AArch64",
"::",
"SP",
",",
"AArch64",
"::",
"SP",
",",
"NumBytes",
",",
"TII",
")",
";",
"return",
";",
"}",
"if",
"(",
"NumBytes",
"||",
"MFI",
"->",
"hasVarSizedObjects",
"(",
")",
")",
"emitFrameOffset",
"(",
"MBB",
",",
"LastPopI",
",",
"DL",
",",
"AArch64",
"::",
"SP",
",",
"AArch64",
"::",
"FP",
",",
"-",
"(",
"NumRestores",
"-",
"1",
")",
"*",
"16",
",",
"TII",
",",
"MachineInstr",
"::",
"NoFlags",
")",
";",
"}",
"</s>"
] | [
"Insert",
"epilog",
"code",
"into",
"the",
"function",
"."
] | [
"AArch64",
"AArch64",
"\"Can only insert epilog into returning blocks\"",
"AArch64",
"AArch64",
"AArch64",
"AArch64",
"AArch64",
"AArch64",
"0",
"AArch64::TCRETURNdi",
"AArch64::TCRETURNri",
"1",
"0",
"16",
"0",
"\"Negative stack allocation size!?\"",
"AArch64::SP",
"AArch64::SP",
"AArch64::SP",
"AArch64::FP",
"1",
"16"
] | AArch64FrameLowering34 | emitEpilogue | AArch64 | CPU | LLVM | 3,567 | 370 | 1 | [] |
[
"<s>",
"void",
"SIRegisterInfo",
"::",
"resolveFrameIndex",
"(",
"MachineInstr",
"&",
"MI",
",",
"unsigned",
"BaseReg",
",",
"int64_t",
"Offset",
")",
"const",
"{",
"const",
"SIInstrInfo",
"*",
"TII",
"=",
"ST",
".",
"getInstrInfo",
"(",
")",
";",
"bool",
"SeenFI",
"=",
"false",
";",
"for",
"(",
"const",
"MachineOperand",
"&",
"MO",
":",
"MI",
".",
"operands",
"(",
")",
")",
"{",
"if",
"(",
"MO",
".",
"isFI",
"(",
")",
")",
"{",
"if",
"(",
"SeenFI",
")",
"llvm_unreachable",
"(",
"\"should not see multiple frame indices\"",
")",
";",
"SeenFI",
"=",
"true",
";",
"}",
"}",
"MachineOperand",
"*",
"FIOp",
"=",
"TII",
"->",
"getNamedOperand",
"(",
"MI",
",",
"AMDGPU",
"::",
"OpName",
"::",
"vaddr",
")",
";",
"MachineBasicBlock",
"*",
"MBB",
"=",
"MI",
".",
"getParent",
"(",
")",
";",
"MachineFunction",
"*",
"MF",
"=",
"MBB",
"->",
"getParent",
"(",
")",
";",
"assert",
"(",
"FIOp",
"&&",
"FIOp",
"->",
"isFI",
"(",
")",
"&&",
"\"frame index must be address operand\"",
")",
";",
"assert",
"(",
"TII",
"->",
"isMUBUF",
"(",
"MI",
")",
")",
";",
"assert",
"(",
"TII",
"->",
"getNamedOperand",
"(",
"MI",
",",
"AMDGPU",
"::",
"OpName",
"::",
"soffset",
")",
"->",
"getReg",
"(",
")",
"==",
"MF",
"->",
"getInfo",
"<",
"SIMachineFunctionInfo",
">",
"(",
")",
"->",
"getStackPtrOffsetReg",
"(",
")",
"&&",
"\"should only be seeing stack pointer offset relative FrameIndex\"",
")",
";",
"MachineOperand",
"*",
"OffsetOp",
"=",
"TII",
"->",
"getNamedOperand",
"(",
"MI",
",",
"AMDGPU",
"::",
"OpName",
"::",
"offset",
")",
";",
"int64_t",
"NewOffset",
"=",
"OffsetOp",
"->",
"getImm",
"(",
")",
"+",
"Offset",
";",
"assert",
"(",
"isUInt",
"<",
"12",
">",
"(",
"NewOffset",
")",
"&&",
"\"offset should be legal\"",
")",
";",
"FIOp",
"->",
"ChangeToRegister",
"(",
"BaseReg",
",",
"false",
")",
";",
"OffsetOp",
"->",
"setImm",
"(",
"NewOffset",
")",
";",
"}",
"</s>"
] | [
"Resolve",
"a",
"frame",
"index",
"operand",
"of",
"an",
"instruction",
"to",
"reference",
"the",
"indicated",
"base",
"register",
"plus",
"offset",
"instead",
"."
] | [
"AMDGPU",
"SI",
"SI",
"\"should not see multiple frame indices\"",
"AMDGPU::OpName",
"\"frame index must be address operand\"",
"AMDGPU::OpName",
"SI",
"\"should only be seeing stack pointer offset relative FrameIndex\"",
"AMDGPU::OpName",
"12",
"\"offset should be legal\""
] | SIRegisterInfo111 | resolveFrameIndex | AMDGPU | GPU | LLVM | 3,568 | 224 | 1 | [] |
[
"<s>",
"unsigned",
"PPCFastISel",
"::",
"fastEmitInst_ri",
"(",
"unsigned",
"MachineInstOpcode",
",",
"const",
"TargetRegisterClass",
"*",
"RC",
",",
"unsigned",
"Op0",
",",
"uint64_t",
"Imm",
")",
"{",
"if",
"(",
"MachineInstOpcode",
"==",
"PPC",
"::",
"ADDI",
")",
"MRI",
".",
"setRegClass",
"(",
"Op0",
",",
"&",
"PPC",
"::",
"GPRC_and_GPRC_NOR0RegClass",
")",
";",
"else",
"if",
"(",
"MachineInstOpcode",
"==",
"PPC",
"::",
"ADDI8",
")",
"MRI",
".",
"setRegClass",
"(",
"Op0",
",",
"&",
"PPC",
"::",
"G8RC_and_G8RC_NOX0RegClass",
")",
";",
"const",
"TargetRegisterClass",
"*",
"UseRC",
"=",
"(",
"RC",
"==",
"&",
"PPC",
"::",
"GPRCRegClass",
"?",
"&",
"PPC",
"::",
"GPRC_and_GPRC_NOR0RegClass",
":",
"(",
"RC",
"==",
"&",
"PPC",
"::",
"G8RCRegClass",
"?",
"&",
"PPC",
"::",
"G8RC_and_G8RC_NOX0RegClass",
":",
"RC",
")",
")",
";",
"return",
"FastISel",
"::",
"fastEmitInst_ri",
"(",
"MachineInstOpcode",
",",
"UseRC",
",",
"Op0",
",",
"Imm",
")",
";",
"}",
"</s>"
] | [
"Emit",
"a",
"MachineInstr",
"with",
"a",
"register",
"operand",
",",
"an",
"immediate",
",",
"and",
"a",
"result",
"register",
"in",
"the",
"given",
"register",
"class",
"."
] | [
"PowerPC",
"PPC",
"PPC::ADDI",
"PPC::GPRC_and_GPRC_NOR0RegClass",
"PPC::ADDI8",
"PPC::G8RC_and_G8RC_NOX0RegClass",
"PPC::GPRCRegClass",
"PPC::GPRC_and_GPRC_NOR0RegClass",
"PPC::G8RCRegClass",
"PPC::G8RC_and_G8RC_NOX0RegClass"
] | PPCFastISel12 | fastEmitInst_ri | PowerPC | CPU | LLVM | 3,569 | 111 | 1 | [] |
[
"<s>",
"bool",
"MipsLongBranch",
"::",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"F",
")",
"{",
"if",
"(",
"(",
"TM",
".",
"getRelocationModel",
"(",
")",
"==",
"Reloc",
"::",
"PIC_",
")",
"&&",
"TM",
".",
"getSubtarget",
"<",
"MipsSubtarget",
">",
"(",
")",
".",
"isABI_O32",
"(",
")",
"&&",
"F",
".",
"getInfo",
"<",
"MipsFunctionInfo",
">",
"(",
")",
"->",
"globalBaseRegSet",
"(",
")",
")",
"emitGPDisp",
"(",
"F",
",",
"TII",
")",
";",
"if",
"(",
"SkipLongBranch",
")",
"return",
"true",
";",
"MF",
"=",
"&",
"F",
";",
"initMBBInfo",
"(",
")",
";",
"bool",
"IsPIC",
"=",
"(",
"TM",
".",
"getRelocationModel",
"(",
")",
"==",
"Reloc",
"::",
"PIC_",
")",
";",
"SmallVector",
"<",
"MBBInfo",
",",
"16",
">",
"::",
"iterator",
"I",
",",
"E",
"=",
"MBBInfos",
".",
"end",
"(",
")",
";",
"bool",
"EverMadeChange",
"=",
"false",
",",
"MadeChange",
"=",
"true",
";",
"while",
"(",
"MadeChange",
")",
"{",
"MadeChange",
"=",
"false",
";",
"for",
"(",
"I",
"=",
"MBBInfos",
".",
"begin",
"(",
")",
";",
"I",
"!=",
"E",
";",
"++",
"I",
")",
"{",
"if",
"(",
"!",
"I",
"->",
"Br",
"||",
"I",
"->",
"HasLongBranch",
")",
"continue",
";",
"if",
"(",
"!",
"ForceLongBranch",
")",
"{",
"int64_t",
"Offset",
"=",
"computeOffset",
"(",
"I",
"->",
"Br",
")",
";",
"if",
"(",
"(",
"I",
"->",
"Br",
"->",
"isConditionalBranch",
"(",
")",
"||",
"IsPIC",
")",
"&&",
"isInt",
"<",
"16",
">",
"(",
"Offset",
"/",
"4",
")",
")",
"continue",
";",
"if",
"(",
"I",
"->",
"Br",
"->",
"isUnconditionalBranch",
"(",
")",
"&&",
"!",
"IsPIC",
"&&",
"isInt",
"<",
"26",
">",
"(",
"Offset",
"/",
"4",
")",
")",
"continue",
";",
"}",
"expandToLongBranch",
"(",
"*",
"I",
")",
";",
"++",
"LongBranches",
";",
"EverMadeChange",
"=",
"MadeChange",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"EverMadeChange",
")",
"MF",
"->",
"RenumberBlocks",
"(",
")",
";",
"return",
"true",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"Mips",
"Mips",
"Mips",
"Mips",
"16",
"16",
"4",
"26",
"4"
] | MipsLongBranch11 | runOnMachineFunction | Mips | CPU | LLVM | 3,570 | 254 | 1 | [] |
[
"<s>",
"static",
"tree",
"mips_build_builtin_va_list",
"(",
"void",
")",
"{",
"if",
"(",
"EABI_FLOAT_VARARGS_P",
")",
"{",
"tree",
"f_ovfl",
",",
"f_gtop",
",",
"f_ftop",
",",
"f_goff",
",",
"f_foff",
",",
"f_res",
",",
"record",
";",
"tree",
"array",
",",
"index",
";",
"record",
"=",
"(",
"*",
"lang_hooks",
".",
"types",
".",
"make_type",
")",
"(",
"RECORD_TYPE",
")",
";",
"f_ovfl",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__overflow_argptr\"",
")",
",",
"ptr_type_node",
")",
";",
"f_gtop",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__gpr_top\"",
")",
",",
"ptr_type_node",
")",
";",
"f_ftop",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__fpr_top\"",
")",
",",
"ptr_type_node",
")",
";",
"f_goff",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__gpr_offset\"",
")",
",",
"unsigned_char_type_node",
")",
";",
"f_foff",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__fpr_offset\"",
")",
",",
"unsigned_char_type_node",
")",
";",
"index",
"=",
"build_int_cst",
"(",
"NULL_TREE",
",",
"GET_MODE_SIZE",
"(",
"ptr_mode",
")",
"-",
"2",
"-",
"1",
")",
";",
"array",
"=",
"build_array_type",
"(",
"unsigned_char_type_node",
",",
"build_index_type",
"(",
"index",
")",
")",
";",
"f_res",
"=",
"build_decl",
"(",
"FIELD_DECL",
",",
"get_identifier",
"(",
"\"__reserved\"",
")",
",",
"array",
")",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_ovfl",
")",
"=",
"record",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_gtop",
")",
"=",
"record",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_ftop",
")",
"=",
"record",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_goff",
")",
"=",
"record",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_foff",
")",
"=",
"record",
";",
"DECL_FIELD_CONTEXT",
"(",
"f_res",
")",
"=",
"record",
";",
"TYPE_FIELDS",
"(",
"record",
")",
"=",
"f_ovfl",
";",
"TREE_CHAIN",
"(",
"f_ovfl",
")",
"=",
"f_gtop",
";",
"TREE_CHAIN",
"(",
"f_gtop",
")",
"=",
"f_ftop",
";",
"TREE_CHAIN",
"(",
"f_ftop",
")",
"=",
"f_goff",
";",
"TREE_CHAIN",
"(",
"f_goff",
")",
"=",
"f_foff",
";",
"TREE_CHAIN",
"(",
"f_foff",
")",
"=",
"f_res",
";",
"layout_type",
"(",
"record",
")",
";",
"return",
"record",
";",
"}",
"else",
"if",
"(",
"TARGET_IRIX",
"&&",
"TARGET_IRIX6",
")",
"return",
"build_pointer_type",
"(",
"char_type_node",
")",
";",
"else",
"return",
"ptr_type_node",
";",
"}",
"</s>"
] | [
"Create",
"the",
"va_list",
"data",
"type",
".",
"We",
"keep",
"3",
"pointers",
",",
"and",
"two",
"offsets",
".",
"Two",
"pointers",
"are",
"to",
"the",
"overflow",
"area",
",",
"which",
"starts",
"at",
"the",
"CFA",
".",
"One",
"of",
"these",
"is",
"constant",
",",
"for",
"addressing",
"into",
"the",
"GPR",
"save",
"area",
"below",
"it",
".",
"The",
"other",
"is",
"advanced",
"up",
"the",
"stack",
"through",
"the",
"overflow",
"region",
".",
"The",
"third",
"pointer",
"is",
"to",
"the",
"GPR",
"save",
"area",
".",
"Since",
"the",
"FPR",
"save",
"area",
"is",
"just",
"below",
"it",
",",
"we",
"can",
"address",
"FPR",
"slots",
"off",
"this",
"pointer",
".",
"We",
"also",
"keep",
"two",
"one-byte",
"offsets",
",",
"which",
"are",
"to",
"be",
"subtracted",
"from",
"the",
"constant",
"pointers",
"to",
"yield",
"addresses",
"in",
"the",
"GPR",
"and",
"FPR",
"save",
"areas",
".",
"These",
"are",
"downcounted",
"as",
"float",
"or",
"non-float",
"arguments",
"are",
"used",
",",
"and",
"when",
"they",
"get",
"to",
"zero",
",",
"the",
"argument",
"must",
"be",
"obtained",
"from",
"the",
"overflow",
"region",
".",
"If",
"!",
"EABI_FLOAT_VARARGS_P",
",",
"then",
"no",
"FPR",
"save",
"area",
"exists",
",",
"and",
"a",
"single",
"pointer",
"is",
"enough",
".",
"It",
"'s",
"started",
"at",
"the",
"GPR",
"save",
"area",
",",
"and",
"is",
"advanced",
",",
"period",
".",
"Note",
"that",
"the",
"GPR",
"save",
"area",
"is",
"not",
"constant",
"size",
",",
"due",
"to",
"optimization",
"in",
"the",
"prologue",
".",
"Hence",
",",
"we",
"ca",
"n't",
"use",
"a",
"design",
"with",
"two",
"pointers",
"and",
"two",
"offsets",
",",
"although",
"we",
"could",
"have",
"designed",
"this",
"with",
"two",
"pointers",
"and",
"three",
"offsets",
"."
] | [
"mips",
"\"__overflow_argptr\"",
"\"__gpr_top\"",
"\"__fpr_top\"",
"\"__gpr_offset\"",
"\"__fpr_offset\"",
"2",
"1",
"\"__reserved\""
] | mips3 | mips_build_builtin_va_list | mips | CPU | GCC | 3,571 | 269 | 1 | [] |
[
"<s>",
"void",
"ARMAsmBackend",
"::",
"relaxInstruction",
"(",
"const",
"MCInst",
"&",
"Inst",
",",
"MCInst",
"&",
"Res",
")",
"const",
"{",
"unsigned",
"RelaxedOp",
"=",
"getRelaxedOpcode",
"(",
"Inst",
".",
"getOpcode",
"(",
")",
")",
";",
"if",
"(",
"RelaxedOp",
"==",
"Inst",
".",
"getOpcode",
"(",
")",
")",
"{",
"SmallString",
"<",
"256",
">",
"Tmp",
";",
"raw_svector_ostream",
"OS",
"(",
"Tmp",
")",
";",
"Inst",
".",
"dump_pretty",
"(",
"OS",
")",
";",
"OS",
"<<",
"\"\\n\"",
";",
"report_fatal_error",
"(",
"\"unexpected instruction to relax: \"",
"+",
"OS",
".",
"str",
"(",
")",
")",
";",
"}",
"Res",
"=",
"Inst",
";",
"Res",
".",
"setOpcode",
"(",
"RelaxedOp",
")",
";",
"}",
"</s>"
] | [
"Relax",
"the",
"instruction",
"in",
"the",
"given",
"fragment",
"to",
"the",
"next",
"wider",
"instruction",
"."
] | [
"ARM",
"ARM",
"256",
"\"\\n\"",
"\"unexpected instruction to relax: \""
] | ARMAsmBackend (2) | relaxInstruction | ARM | CPU | LLVM | 3,572 | 86 | 1 | [] |
[
"<s>",
"bool",
"AArch64TTIImpl",
"::",
"getTgtMemIntrinsic",
"(",
"IntrinsicInst",
"*",
"Inst",
",",
"MemIntrinsicInfo",
"&",
"Info",
")",
"{",
"switch",
"(",
"Inst",
"->",
"getIntrinsicID",
"(",
")",
")",
"{",
"default",
":",
"break",
";",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld2",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld3",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld4",
":",
"Info",
".",
"ReadMem",
"=",
"true",
";",
"Info",
".",
"WriteMem",
"=",
"false",
";",
"Info",
".",
"IsSimple",
"=",
"true",
";",
"Info",
".",
"NumMemRefs",
"=",
"1",
";",
"Info",
".",
"PtrVal",
"=",
"Inst",
"->",
"getArgOperand",
"(",
"0",
")",
";",
"break",
";",
"case",
"Intrinsic",
"::",
"aarch64_neon_st2",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_st3",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_st4",
":",
"Info",
".",
"ReadMem",
"=",
"false",
";",
"Info",
".",
"WriteMem",
"=",
"true",
";",
"Info",
".",
"IsSimple",
"=",
"true",
";",
"Info",
".",
"NumMemRefs",
"=",
"1",
";",
"Info",
".",
"PtrVal",
"=",
"Inst",
"->",
"getArgOperand",
"(",
"Inst",
"->",
"getNumArgOperands",
"(",
")",
"-",
"1",
")",
";",
"break",
";",
"}",
"switch",
"(",
"Inst",
"->",
"getIntrinsicID",
"(",
")",
")",
"{",
"default",
":",
"return",
"false",
";",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld2",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_st2",
":",
"Info",
".",
"MatchingId",
"=",
"VECTOR_LDST_TWO_ELEMENTS",
";",
"break",
";",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld3",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_st3",
":",
"Info",
".",
"MatchingId",
"=",
"VECTOR_LDST_THREE_ELEMENTS",
";",
"break",
";",
"case",
"Intrinsic",
"::",
"aarch64_neon_ld4",
":",
"case",
"Intrinsic",
"::",
"aarch64_neon_st4",
":",
"Info",
".",
"MatchingId",
"=",
"VECTOR_LDST_FOUR_ELEMENTS",
";",
"break",
";",
"}",
"return",
"true",
";",
"}",
"</s>"
] | [
"Given",
"an",
"intrinsic",
",",
"checks",
"if",
"on",
"the",
"target",
"the",
"intrinsic",
"will",
"need",
"to",
"map",
"to",
"a",
"MemIntrinsicNode",
"(",
"touches",
"memory",
")",
"."
] | [
"AArch64",
"AArch64",
"Intrinsic::aarch64_neon_ld2",
"Intrinsic::aarch64_neon_ld3",
"Intrinsic::aarch64_neon_ld4",
"1",
"0",
"Intrinsic::aarch64_neon_st2",
"Intrinsic::aarch64_neon_st3",
"Intrinsic::aarch64_neon_st4",
"1",
"1",
"Intrinsic::aarch64_neon_ld2",
"Intrinsic::aarch64_neon_st2",
"Intrinsic::aarch64_neon_ld3",
"Intrinsic::aarch64_neon_st3",
"Intrinsic::aarch64_neon_ld4",
"Intrinsic::aarch64_neon_st4"
] | AArch64TargetTransformInfo (2) | getTgtMemIntrinsic | AArch64 | CPU | LLVM | 3,573 | 211 | 1 | [] |
[
"<s>",
"static",
"void",
"nios2_asm_function_prologue",
"(",
"FILE",
"*",
"file",
",",
"HOST_WIDE_INT",
"size",
"ATTRIBUTE_UNUSED",
")",
"{",
"if",
"(",
"flag_verbose_asm",
"||",
"flag_debug_asm",
")",
"{",
"nios2_compute_frame_layout",
"(",
")",
";",
"nios2_dump_frame_layout",
"(",
"file",
")",
";",
"}",
"}",
"</s>"
] | [
"Implement",
"TARGET_ASM_FUNCTION_PROLOGUE",
"."
] | [
"nios2"
] | nios22 | nios2_asm_function_prologue | nios2 | MPU | GCC | 3,574 | 31 | 1 | [] |
[
"<s>",
"bool",
"isToken",
"(",
")",
"const",
"override",
"{",
"return",
"Kind",
"==",
"k_Token",
";",
"}",
"</s>"
] | [
"isToken",
"-",
"Is",
"this",
"a",
"token",
"operand",
"?"
] | [
"AArch64"
] | AArch64AsmParser (2)1 | isToken | AArch64 | CPU | LLVM | 3,575 | 13 | 1 | [] |
[
"<s>",
"bool",
"PPCTargetLowering",
"::",
"isZExtFree",
"(",
"SDValue",
"Val",
",",
"EVT",
"VT2",
")",
"const",
"{",
"if",
"(",
"LoadSDNode",
"*",
"LD",
"=",
"dyn_cast",
"<",
"LoadSDNode",
">",
"(",
"Val",
")",
")",
"{",
"EVT",
"MemVT",
"=",
"LD",
"->",
"getMemoryVT",
"(",
")",
";",
"if",
"(",
"(",
"MemVT",
"==",
"MVT",
"::",
"i1",
"||",
"MemVT",
"==",
"MVT",
"::",
"i8",
"||",
"MemVT",
"==",
"MVT",
"::",
"i16",
"||",
"(",
"Subtarget",
".",
"isPPC64",
"(",
")",
"&&",
"MemVT",
"==",
"MVT",
"::",
"i32",
")",
")",
"&&",
"(",
"LD",
"->",
"getExtensionType",
"(",
")",
"==",
"ISD",
"::",
"NON_EXTLOAD",
"||",
"LD",
"->",
"getExtensionType",
"(",
")",
"==",
"ISD",
"::",
"ZEXTLOAD",
")",
")",
"return",
"true",
";",
"}",
"return",
"TargetLowering",
"::",
"isZExtFree",
"(",
"Val",
",",
"VT2",
")",
";",
"}",
"</s>"
] | [
"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",
")",
"."
] | [
"PowerPC",
"PPC",
"MVT::i1",
"MVT::i8",
"MVT::i16",
"PPC",
"MVT::i32",
"ISD::NON_EXTLOAD",
"ISD::ZEXTLOAD"
] | PPCISelLowering (2)2 | isZExtFree | PowerPC | CPU | LLVM | 3,576 | 110 | 1 | [] |
[
"<s>",
"void",
"PatmosAsmPrinter",
"::",
"EmitInstruction",
"(",
"const",
"MachineInstr",
"*",
"MI",
")",
"{",
"SmallVector",
"<",
"const",
"MachineInstr",
"*",
",",
"2",
">",
"BundleMIs",
";",
"unsigned",
"Size",
"=",
"1",
";",
"if",
"(",
"MI",
"->",
"isBundle",
"(",
")",
")",
"{",
"const",
"MachineBasicBlock",
"*",
"MBB",
"=",
"MI",
"->",
"getParent",
"(",
")",
";",
"MachineBasicBlock",
"::",
"const_instr_iterator",
"MII",
"=",
"MI",
";",
"++",
"MII",
";",
"while",
"(",
"MII",
"!=",
"MBB",
"->",
"end",
"(",
")",
"&&",
"MII",
"->",
"isInsideBundle",
"(",
")",
")",
"{",
"const",
"MachineInstr",
"*",
"MInst",
"=",
"MII",
";",
"if",
"(",
"MInst",
"->",
"isPseudo",
"(",
")",
")",
"{",
"MInst",
"->",
"dump",
"(",
")",
";",
"report_fatal_error",
"(",
"\"Pseudo instructions must not be bundled!\"",
")",
";",
"}",
"BundleMIs",
".",
"push_back",
"(",
"MInst",
")",
";",
"++",
"MII",
";",
"}",
"Size",
"=",
"BundleMIs",
".",
"size",
"(",
")",
";",
"assert",
"(",
"Size",
"==",
"MI",
"->",
"getBundleSize",
"(",
")",
"&&",
"\"Corrupt Bundle!\"",
")",
";",
"}",
"else",
"{",
"if",
"(",
"MI",
"->",
"getOpcode",
"(",
")",
"==",
"Patmos",
"::",
"PSEUDO_LOOPBOUND",
")",
"{",
"return",
";",
"}",
"BundleMIs",
".",
"push_back",
"(",
"MI",
")",
";",
"}",
"for",
"(",
"unsigned",
"Index",
"=",
"0",
";",
"Index",
"<",
"Size",
";",
"Index",
"++",
")",
"{",
"MCInst",
"MCI",
";",
"MCInstLowering",
".",
"Lower",
"(",
"BundleMIs",
"[",
"Index",
"]",
",",
"MCI",
")",
";",
"bool",
"isBundled",
"=",
"(",
"Index",
"<",
"Size",
"-",
"1",
")",
";",
"MCI",
".",
"addOperand",
"(",
"MCOperand",
"::",
"CreateImm",
"(",
"isBundled",
")",
")",
";",
"OutStreamer",
".",
"EmitInstruction",
"(",
"MCI",
")",
";",
"}",
"}",
"</s>"
] | [
"EmitInstruction",
"-",
"This",
"callback",
"is",
"invoked",
"when",
"an",
"instruction",
"is",
"emitted",
",",
"to",
"advance",
"the",
"hazard",
"state",
"."
] | [
"Patmos",
"Patmos",
"2",
"1",
"\"Pseudo instructions must not be bundled!\"",
"\"Corrupt Bundle!\"",
"Patmos::PSEUDO_LOOPBOUND",
"0",
"1"
] | PatmosAsmPrinter | EmitInstruction | Patmos | VLIW | LLVM | 3,577 | 222 | 1 | [] |
[
"<s>",
"const",
"char",
"*",
"MipsAsmPrinter",
"::",
"getCurrentABIString",
"(",
")",
"const",
"{",
"switch",
"(",
"Subtarget",
"->",
"getTargetABI",
"(",
")",
")",
"{",
"case",
"MipsSubtarget",
"::",
"O32",
":",
"return",
"\"abi32\"",
";",
"case",
"MipsSubtarget",
"::",
"N32",
":",
"return",
"\"abiN32\"",
";",
"case",
"MipsSubtarget",
"::",
"N64",
":",
"return",
"\"abi64\"",
";",
"case",
"MipsSubtarget",
"::",
"EABI",
":",
"return",
"\"eabi32\"",
";",
"default",
":",
"llvm_unreachable",
"(",
"\"Unknown Mips ABI\"",
")",
";",
";",
"}",
"}",
"</s>"
] | [
"Emit",
"Set",
"directives",
"."
] | [
"Mips",
"Mips",
"Mips",
"\"abi32\"",
"Mips",
"\"abiN32\"",
"Mips",
"\"abi64\"",
"Mips",
"\"eabi32\"",
"\"Unknown Mips ABI\""
] | MipsAsmPrinter100 | getCurrentABIString | Mips | CPU | LLVM | 3,578 | 61 | 1 | [] |
[
"<s>",
"PIC16Section",
"*",
"PIC16Section",
"::",
"Create",
"(",
"StringRef",
"Name",
",",
"PIC16SectionType",
"Ty",
",",
"StringRef",
"Address",
",",
"int",
"Color",
",",
"MCContext",
"&",
"Ctx",
")",
"{",
"SectionKind",
"K",
";",
"switch",
"(",
"Ty",
")",
"{",
"default",
":",
"llvm_unreachable",
"(",
"\"can not create unknown section type\"",
")",
";",
"case",
"UDATA_OVR",
":",
"{",
"K",
"=",
"SectionKind",
"::",
"getThreadBSS",
"(",
")",
";",
"break",
";",
"}",
"case",
"UDATA_SHR",
":",
"case",
"UDATA",
":",
"{",
"K",
"=",
"SectionKind",
"::",
"getBSS",
"(",
")",
";",
"break",
";",
"}",
"case",
"ROMDATA",
":",
"case",
"IDATA",
":",
"{",
"K",
"=",
"SectionKind",
"::",
"getMetadata",
"(",
")",
";",
"break",
";",
"}",
"case",
"CODE",
":",
"{",
"K",
"=",
"SectionKind",
"::",
"getText",
"(",
")",
";",
"break",
";",
"}",
"}",
"char",
"*",
"NameCopy",
"=",
"static_cast",
"<",
"char",
"*",
">",
"(",
"Ctx",
".",
"Allocate",
"(",
"Name",
".",
"size",
"(",
")",
",",
"1",
")",
")",
";",
"memcpy",
"(",
"NameCopy",
",",
"Name",
".",
"data",
"(",
")",
",",
"Name",
".",
"size",
"(",
")",
")",
";",
"char",
"*",
"AddressCopy",
"=",
"static_cast",
"<",
"char",
"*",
">",
"(",
"Ctx",
".",
"Allocate",
"(",
"Address",
".",
"size",
"(",
")",
",",
"1",
")",
")",
";",
"memcpy",
"(",
"AddressCopy",
",",
"Address",
".",
"data",
"(",
")",
",",
"Address",
".",
"size",
"(",
")",
")",
";",
"PIC16Section",
"*",
"S",
"=",
"new",
"(",
"Ctx",
")",
"PIC16Section",
"(",
"StringRef",
"(",
"NameCopy",
",",
"Name",
".",
"size",
"(",
")",
")",
",",
"K",
",",
"StringRef",
"(",
"AddressCopy",
",",
"Address",
".",
"size",
"(",
")",
")",
",",
"Color",
")",
";",
"S",
"->",
"T",
"=",
"Ty",
";",
"return",
"S",
";",
"}",
"</s>"
] | [
"Construct",
"a",
"unary",
"instruction",
",",
"given",
"the",
"opcode",
"and",
"an",
"operand",
"."
] | [
"PIC16",
"PIC16",
"PIC16",
"PIC16",
"\"can not create unknown section type\"",
"1",
"1",
"PIC16",
"PIC16"
] | PIC16Section | Create | PIC16 | MPU | LLVM | 3,579 | 234 | 1 | [] |
[
"<s>",
"static",
"int",
"m32c_register_move_cost",
"(",
"machine_mode",
"mode",
",",
"reg_class_t",
"from",
",",
"reg_class_t",
"to",
")",
"{",
"int",
"cost",
"=",
"COSTS_N_INSNS",
"(",
"3",
")",
";",
"HARD_REG_SET",
"cc",
";",
"COPY_HARD_REG_SET",
"(",
"cc",
",",
"reg_class_contents",
"[",
"(",
"int",
")",
"from",
"]",
")",
";",
"IOR_HARD_REG_SET",
"(",
"cc",
",",
"reg_class_contents",
"[",
"(",
"int",
")",
"to",
"]",
")",
";",
"if",
"(",
"mode",
"==",
"QImode",
"&&",
"hard_reg_set_intersect_p",
"(",
"cc",
",",
"reg_class_contents",
"[",
"R23_REGS",
"]",
")",
")",
"{",
"if",
"(",
"hard_reg_set_subset_p",
"(",
"cc",
",",
"reg_class_contents",
"[",
"R23_REGS",
"]",
")",
")",
"cost",
"=",
"COSTS_N_INSNS",
"(",
"1000",
")",
";",
"else",
"cost",
"=",
"COSTS_N_INSNS",
"(",
"80",
")",
";",
"}",
"if",
"(",
"!",
"class_can_hold_mode",
"(",
"from",
",",
"mode",
")",
"||",
"!",
"class_can_hold_mode",
"(",
"to",
",",
"mode",
")",
")",
"cost",
"=",
"COSTS_N_INSNS",
"(",
"1000",
")",
";",
"if",
"(",
"reg_classes_intersect_p",
"(",
"from",
",",
"CR_REGS",
")",
")",
"cost",
"+=",
"COSTS_N_INSNS",
"(",
"5",
")",
";",
"if",
"(",
"reg_classes_intersect_p",
"(",
"to",
",",
"CR_REGS",
")",
")",
"cost",
"+=",
"COSTS_N_INSNS",
"(",
"5",
")",
";",
"if",
"(",
"from",
"==",
"MEM_REGS",
"||",
"to",
"==",
"MEM_REGS",
")",
"cost",
"+=",
"COSTS_N_INSNS",
"(",
"50",
")",
";",
"else",
"if",
"(",
"reg_classes_intersect_p",
"(",
"from",
",",
"MEM_REGS",
")",
"||",
"reg_classes_intersect_p",
"(",
"to",
",",
"MEM_REGS",
")",
")",
"cost",
"+=",
"COSTS_N_INSNS",
"(",
"10",
")",
";",
"fprintf",
"(",
"stderr",
",",
"\"register_move_cost %s from %s to %s = %d\\n\"",
",",
"mode_name",
"[",
"mode",
"]",
",",
"class_names",
"[",
"(",
"int",
")",
"from",
"]",
",",
"class_names",
"[",
"(",
"int",
")",
"to",
"]",
",",
"cost",
")",
";",
"return",
"cost",
";",
"}",
"</s>"
] | [
"Implements",
"REGISTER_MOVE_COST",
".",
"We",
"make",
"impossible",
"moves",
"prohibitively",
"expensive",
",",
"like",
"trying",
"to",
"put",
"QIs",
"in",
"r2/r3",
"(",
"there",
"are",
"no",
"opcodes",
"to",
"do",
"that",
")",
".",
"We",
"also",
"discourage",
"use",
"of",
"mem",
"*",
"registers",
"since",
"they",
"'re",
"really",
"memory",
"."
] | [
"m32c",
"3",
"1000",
"80",
"1000",
"5",
"5",
"50",
"10",
"\"register_move_cost %s from %s to %s = %d\\n\""
] | m32c3 | m32c_register_move_cost | m32c | MPU | GCC | 3,580 | 228 | 1 | [] |
[
"<s>",
"bool",
"AMDGPUTargetLowering",
"::",
"isCheapToSpeculateCtlz",
"(",
")",
"const",
"{",
"return",
"true",
";",
"}",
"</s>"
] | [
"Return",
"true",
"if",
"it",
"is",
"cheap",
"to",
"speculate",
"a",
"call",
"to",
"intrinsic",
"ctlz",
"."
] | [
"AMDGPU",
"AMDGPU"
] | AMDGPUISelLowering (2) | isCheapToSpeculateCtlz | AMDGPU | GPU | LLVM | 3,581 | 12 | 1 | [] |
[
"<s>",
"unsigned",
"PPCVSXSwapRemoval",
"::",
"lookThruCopyLike",
"(",
"unsigned",
"SrcReg",
",",
"unsigned",
"VecIdx",
")",
"{",
"MachineInstr",
"*",
"MI",
"=",
"MRI",
"->",
"getVRegDef",
"(",
"SrcReg",
")",
";",
"if",
"(",
"!",
"MI",
"->",
"isCopyLike",
"(",
")",
")",
"return",
"SrcReg",
";",
"unsigned",
"CopySrcReg",
";",
"if",
"(",
"MI",
"->",
"isCopy",
"(",
")",
")",
"CopySrcReg",
"=",
"MI",
"->",
"getOperand",
"(",
"1",
")",
".",
"getReg",
"(",
")",
";",
"else",
"{",
"assert",
"(",
"MI",
"->",
"isSubregToReg",
"(",
")",
"&&",
"\"bad opcode for lookThruCopyLike\"",
")",
";",
"CopySrcReg",
"=",
"MI",
"->",
"getOperand",
"(",
"2",
")",
".",
"getReg",
"(",
")",
";",
"}",
"if",
"(",
"!",
"TargetRegisterInfo",
"::",
"isVirtualRegister",
"(",
"CopySrcReg",
")",
")",
"{",
"SwapVector",
"[",
"VecIdx",
"]",
".",
"MentionsPhysVR",
"=",
"1",
";",
"return",
"CopySrcReg",
";",
"}",
"return",
"lookThruCopyLike",
"(",
"CopySrcReg",
",",
"VecIdx",
")",
";",
"}",
"</s>"
] | [
"Returns",
"the",
"original",
"SrcReg",
"unless",
"it",
"is",
"the",
"target",
"of",
"a",
"copy-like",
"operation",
",",
"in",
"which",
"case",
"we",
"chain",
"backwards",
"through",
"all",
"such",
"operations",
"to",
"the",
"ultimate",
"source",
"register",
"."
] | [
"PowerPC",
"PPC",
"1",
"\"bad opcode for lookThruCopyLike\"",
"2",
"1"
] | PPCVSXSwapRemoval17 | lookThruCopyLike | PowerPC | CPU | LLVM | 3,582 | 119 | 1 | [] |
[
"<s>",
"void",
"MSP430FrameLowering",
"::",
"emitEpilogue",
"(",
"MachineFunction",
"&",
"MF",
",",
"MachineBasicBlock",
"&",
"MBB",
")",
"const",
"{",
"const",
"MachineFrameInfo",
"*",
"MFI",
"=",
"MF",
".",
"getFrameInfo",
"(",
")",
";",
"MSP430MachineFunctionInfo",
"*",
"MSP430FI",
"=",
"MF",
".",
"getInfo",
"<",
"MSP430MachineFunctionInfo",
">",
"(",
")",
";",
"const",
"MSP430InstrInfo",
"&",
"TII",
"=",
"*",
"static_cast",
"<",
"const",
"MSP430InstrInfo",
"*",
">",
"(",
"MF",
".",
"getTarget",
"(",
")",
".",
"getInstrInfo",
"(",
")",
")",
";",
"MachineBasicBlock",
"::",
"iterator",
"MBBI",
"=",
"MBB",
".",
"getLastNonDebugInstr",
"(",
")",
";",
"unsigned",
"RetOpcode",
"=",
"MBBI",
"->",
"getOpcode",
"(",
")",
";",
"DebugLoc",
"DL",
"=",
"MBBI",
"->",
"getDebugLoc",
"(",
")",
";",
"switch",
"(",
"RetOpcode",
")",
"{",
"case",
"MSP430",
"::",
"RET",
":",
"case",
"MSP430",
"::",
"RETI",
":",
"break",
";",
"default",
":",
"llvm_unreachable",
"(",
"\"Can only insert epilog into returning blocks\"",
")",
";",
"}",
"uint64_t",
"StackSize",
"=",
"MFI",
"->",
"getStackSize",
"(",
")",
";",
"unsigned",
"CSSize",
"=",
"MSP430FI",
"->",
"getCalleeSavedFrameSize",
"(",
")",
";",
"uint64_t",
"NumBytes",
"=",
"0",
";",
"if",
"(",
"hasFP",
"(",
"MF",
")",
")",
"{",
"uint64_t",
"FrameSize",
"=",
"StackSize",
"-",
"2",
";",
"NumBytes",
"=",
"FrameSize",
"-",
"CSSize",
";",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"DL",
",",
"TII",
".",
"get",
"(",
"MSP430",
"::",
"POP16r",
")",
",",
"MSP430",
"::",
"FPW",
")",
";",
"}",
"else",
"NumBytes",
"=",
"StackSize",
"-",
"CSSize",
";",
"while",
"(",
"MBBI",
"!=",
"MBB",
".",
"begin",
"(",
")",
")",
"{",
"MachineBasicBlock",
"::",
"iterator",
"PI",
"=",
"prior",
"(",
"MBBI",
")",
";",
"unsigned",
"Opc",
"=",
"PI",
"->",
"getOpcode",
"(",
")",
";",
"if",
"(",
"Opc",
"!=",
"MSP430",
"::",
"POP16r",
"&&",
"!",
"PI",
"->",
"getDesc",
"(",
")",
".",
"isTerminator",
"(",
")",
")",
"break",
";",
"--",
"MBBI",
";",
"}",
"DL",
"=",
"MBBI",
"->",
"getDebugLoc",
"(",
")",
";",
"if",
"(",
"MFI",
"->",
"hasVarSizedObjects",
"(",
")",
")",
"{",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"DL",
",",
"TII",
".",
"get",
"(",
"MSP430",
"::",
"MOV16rr",
")",
",",
"MSP430",
"::",
"SPW",
")",
".",
"addReg",
"(",
"MSP430",
"::",
"FPW",
")",
";",
"if",
"(",
"CSSize",
")",
"{",
"MachineInstr",
"*",
"MI",
"=",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"DL",
",",
"TII",
".",
"get",
"(",
"MSP430",
"::",
"SUB16ri",
")",
",",
"MSP430",
"::",
"SPW",
")",
".",
"addReg",
"(",
"MSP430",
"::",
"SPW",
")",
".",
"addImm",
"(",
"CSSize",
")",
";",
"MI",
"->",
"getOperand",
"(",
"3",
")",
".",
"setIsDead",
"(",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"NumBytes",
")",
"{",
"MachineInstr",
"*",
"MI",
"=",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"DL",
",",
"TII",
".",
"get",
"(",
"MSP430",
"::",
"ADD16ri",
")",
",",
"MSP430",
"::",
"SPW",
")",
".",
"addReg",
"(",
"MSP430",
"::",
"SPW",
")",
".",
"addImm",
"(",
"NumBytes",
")",
";",
"MI",
"->",
"getOperand",
"(",
"3",
")",
".",
"setIsDead",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] | [
"Insert",
"epilog",
"code",
"into",
"the",
"function",
"."
] | [
"MSP430",
"MSP430",
"MSP430",
"MSP430",
"MSP430",
"MSP430",
"MSP430",
"MSP430::RET",
"MSP430::RETI",
"\"Can only insert epilog into returning blocks\"",
"MSP430",
"0",
"2",
"MSP430::POP16r",
"MSP430::FPW",
"MSP430::POP16r",
"MSP430::MOV16rr",
"MSP430::SPW",
"MSP430::FPW",
"MSP430::SUB16ri",
"MSP430::SPW",
"MSP430::SPW",
"3",
"MSP430::ADD16ri",
"MSP430::SPW",
"MSP430::SPW",
"3"
] | MSP430FrameLowering2 | emitEpilogue | MSP430 | MPU | LLVM | 3,583 | 407 | 1 | [] |
[
"<s>",
"int",
"X86TTIImpl",
"::",
"getIntImmCost",
"(",
"const",
"APInt",
"&",
"Imm",
",",
"Type",
"*",
"Ty",
",",
"TTI",
"::",
"TargetCostKind",
"CostKind",
")",
"{",
"assert",
"(",
"Ty",
"->",
"isIntegerTy",
"(",
")",
")",
";",
"unsigned",
"BitSize",
"=",
"Ty",
"->",
"getPrimitiveSizeInBits",
"(",
")",
";",
"if",
"(",
"BitSize",
"==",
"0",
")",
"return",
"~",
"0U",
";",
"if",
"(",
"BitSize",
">",
"128",
")",
"return",
"TTI",
"::",
"TCC_Free",
";",
"if",
"(",
"Imm",
"==",
"0",
")",
"return",
"TTI",
"::",
"TCC_Free",
";",
"APInt",
"ImmVal",
"=",
"Imm",
";",
"if",
"(",
"BitSize",
"%",
"64",
"!=",
"0",
")",
"ImmVal",
"=",
"Imm",
".",
"sext",
"(",
"alignTo",
"(",
"BitSize",
",",
"64",
")",
")",
";",
"int",
"Cost",
"=",
"0",
";",
"for",
"(",
"unsigned",
"ShiftVal",
"=",
"0",
";",
"ShiftVal",
"<",
"BitSize",
";",
"ShiftVal",
"+=",
"64",
")",
"{",
"APInt",
"Tmp",
"=",
"ImmVal",
".",
"ashr",
"(",
"ShiftVal",
")",
".",
"sextOrTrunc",
"(",
"64",
")",
";",
"int64_t",
"Val",
"=",
"Tmp",
".",
"getSExtValue",
"(",
")",
";",
"Cost",
"+=",
"getIntImmCost",
"(",
"Val",
")",
";",
"}",
"return",
"std",
"::",
"max",
"(",
"1",
",",
"Cost",
")",
";",
"}",
"</s>"
] | [
"Calculate",
"the",
"cost",
"of",
"materializing",
"a",
"64-bit",
"value",
"."
] | [
"X86",
"X86",
"0",
"0U",
"128",
"0",
"64",
"0",
"64",
"0",
"0",
"64",
"64",
"1"
] | X86TargetTransformInfo103 | getIntImmCost | X86 | CPU | LLVM | 3,584 | 161 | 1 | [] |
[
"<s>",
"static",
"opt_machine_mode",
"aarch64_get_mask_mode",
"(",
"machine_mode",
"mode",
")",
"{",
"unsigned",
"int",
"vec_flags",
"=",
"aarch64_classify_vector_mode",
"(",
"mode",
")",
";",
"if",
"(",
"vec_flags",
"&",
"VEC_SVE_DATA",
")",
"return",
"aarch64_sve_pred_mode",
"(",
"mode",
")",
";",
"return",
"default_get_mask_mode",
"(",
"mode",
")",
";",
"}",
"</s>"
] | [
"Implement",
"TARGET_VECTORIZE_GET_MASK_MODE",
"."
] | [
"aarch64"
] | aarch64 | aarch64_get_mask_mode | aarch64 | CPU | GCC | 3,585 | 36 | 1 | [] |
[
"<s>",
"bool",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"MF",
")",
"override",
"{",
"Subtarget",
"=",
"&",
"MF",
".",
"getSubtarget",
"<",
"HSAILSubtarget",
">",
"(",
")",
";",
"return",
"SelectionDAGISel",
"::",
"runOnMachineFunction",
"(",
"MF",
")",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"HSAIL",
"HSAIL"
] | HSAILISelDAGToDAG | runOnMachineFunction | HSAIL | Virtual ISA | LLVM | 3,586 | 30 | 1 | [] |
[
"<s>",
"const",
"uint16_t",
"*",
"PPCRegisterInfo",
"::",
"getCalleeSavedRegs",
"(",
"const",
"MachineFunction",
"*",
"MF",
")",
"const",
"{",
"if",
"(",
"Subtarget",
".",
"isDarwinABI",
"(",
")",
")",
"return",
"Subtarget",
".",
"isPPC64",
"(",
")",
"?",
"CSR_Darwin64_SaveList",
":",
"CSR_Darwin32_SaveList",
";",
"if",
"(",
"!",
"Subtarget",
".",
"isPPC64",
"(",
")",
")",
"CRSpillFrameIdx",
"=",
"0",
";",
"return",
"Subtarget",
".",
"isPPC64",
"(",
")",
"?",
"CSR_SVR464_SaveList",
":",
"CSR_SVR432_SaveList",
";",
"}",
"</s>"
] | [
"Code",
"Generation",
"virtual",
"methods",
"..."
] | [
"PowerPC",
"PPC",
"PPC",
"PPC",
"0",
"PPC"
] | PPCRegisterInfo14 | getCalleeSavedRegs | PowerPC | CPU | LLVM | 3,587 | 58 | 1 | [] |
[
"<s>",
"static",
"bool",
"spu_pass_by_reference",
"(",
"cumulative_args_t",
"cum",
"ATTRIBUTE_UNUSED",
",",
"machine_mode",
"mode",
"ATTRIBUTE_UNUSED",
",",
"const_tree",
"type",
",",
"bool",
"named",
"ATTRIBUTE_UNUSED",
")",
"{",
"return",
"type",
"&&",
"TREE_CODE",
"(",
"TYPE_SIZE",
"(",
"type",
")",
")",
"!=",
"INTEGER_CST",
";",
"}",
"</s>"
] | [
"Variable",
"sized",
"types",
"are",
"passed",
"by",
"reference",
"."
] | [
"spu"
] | spu | spu_pass_by_reference | spu | MPU | GCC | 3,588 | 34 | 1 | [] |
[
"<s>",
"bool",
"SIPeepholeSDWA",
"::",
"runOnMachineFunction",
"(",
"MachineFunction",
"&",
"MF",
")",
"{",
"const",
"GCNSubtarget",
"&",
"ST",
"=",
"MF",
".",
"getSubtarget",
"<",
"GCNSubtarget",
">",
"(",
")",
";",
"if",
"(",
"!",
"ST",
".",
"hasSDWA",
"(",
")",
"||",
"skipFunction",
"(",
"MF",
".",
"getFunction",
"(",
")",
")",
")",
"return",
"false",
";",
"MRI",
"=",
"&",
"MF",
".",
"getRegInfo",
"(",
")",
";",
"TRI",
"=",
"ST",
".",
"getRegisterInfo",
"(",
")",
";",
"TII",
"=",
"ST",
".",
"getInstrInfo",
"(",
")",
";",
"bool",
"Ret",
"=",
"false",
";",
"for",
"(",
"MachineBasicBlock",
"&",
"MBB",
":",
"MF",
")",
"{",
"bool",
"Changed",
"=",
"false",
";",
"do",
"{",
"matchSDWAOperands",
"(",
"MBB",
")",
";",
"for",
"(",
"const",
"auto",
"&",
"OperandPair",
":",
"SDWAOperands",
")",
"{",
"const",
"auto",
"&",
"Operand",
"=",
"OperandPair",
".",
"second",
";",
"MachineInstr",
"*",
"PotentialMI",
"=",
"Operand",
"->",
"potentialToConvert",
"(",
"TII",
")",
";",
"if",
"(",
"PotentialMI",
"&&",
"(",
"PotentialMI",
"->",
"getOpcode",
"(",
")",
"==",
"AMDGPU",
"::",
"V_ADD_CO_U32_e64",
"||",
"PotentialMI",
"->",
"getOpcode",
"(",
")",
"==",
"AMDGPU",
"::",
"V_SUB_CO_U32_e64",
")",
")",
"pseudoOpConvertToVOP2",
"(",
"*",
"PotentialMI",
",",
"ST",
")",
";",
"}",
"SDWAOperands",
".",
"clear",
"(",
")",
";",
"matchSDWAOperands",
"(",
"MBB",
")",
";",
"for",
"(",
"const",
"auto",
"&",
"OperandPair",
":",
"SDWAOperands",
")",
"{",
"const",
"auto",
"&",
"Operand",
"=",
"OperandPair",
".",
"second",
";",
"MachineInstr",
"*",
"PotentialMI",
"=",
"Operand",
"->",
"potentialToConvert",
"(",
"TII",
")",
";",
"if",
"(",
"PotentialMI",
"&&",
"isConvertibleToSDWA",
"(",
"*",
"PotentialMI",
",",
"ST",
")",
")",
"{",
"PotentialMatches",
"[",
"PotentialMI",
"]",
".",
"push_back",
"(",
"Operand",
".",
"get",
"(",
")",
")",
";",
"}",
"}",
"for",
"(",
"auto",
"&",
"PotentialPair",
":",
"PotentialMatches",
")",
"{",
"MachineInstr",
"&",
"PotentialMI",
"=",
"*",
"PotentialPair",
".",
"first",
";",
"convertToSDWA",
"(",
"PotentialMI",
",",
"PotentialPair",
".",
"second",
")",
";",
"}",
"PotentialMatches",
".",
"clear",
"(",
")",
";",
"SDWAOperands",
".",
"clear",
"(",
")",
";",
"Changed",
"=",
"!",
"ConvertedInstructions",
".",
"empty",
"(",
")",
";",
"if",
"(",
"Changed",
")",
"Ret",
"=",
"true",
";",
"while",
"(",
"!",
"ConvertedInstructions",
".",
"empty",
"(",
")",
")",
"legalizeScalarOperands",
"(",
"*",
"ConvertedInstructions",
".",
"pop_back_val",
"(",
")",
",",
"ST",
")",
";",
"}",
"while",
"(",
"Changed",
")",
";",
"}",
"return",
"Ret",
";",
"}",
"</s>"
] | [
"runOnMachineFunction",
"-",
"Emit",
"the",
"function",
"body",
"."
] | [
"AMDGPU",
"SI",
"AMDGPU::V_ADD_CO_U32_e64",
"AMDGPU::V_SUB_CO_U32_e64"
] | SIPeepholeSDWA | runOnMachineFunction | AMDGPU | GPU | LLVM | 3,589 | 320 | 1 | [] |
[
"<s>",
"void",
"Z80FrameLowering",
"::",
"emitEpilogue",
"(",
"MachineFunction",
"&",
"MF",
",",
"MachineBasicBlock",
"&",
"MBB",
")",
"const",
"{",
"const",
"MachineFrameInfo",
"*",
"MFI",
"=",
"MF",
".",
"getFrameInfo",
"(",
")",
";",
"Z80MachineFunctionInfo",
"*",
"Z80FI",
"=",
"MF",
".",
"getInfo",
"<",
"Z80MachineFunctionInfo",
">",
"(",
")",
";",
"const",
"Z80InstrInfo",
"&",
"TII",
"=",
"*",
"static_cast",
"<",
"const",
"Z80InstrInfo",
"*",
">",
"(",
"MF",
".",
"getTarget",
"(",
")",
".",
"getInstrInfo",
"(",
")",
")",
";",
"MachineBasicBlock",
"::",
"iterator",
"MBBI",
"=",
"MBB",
".",
"getLastNonDebugInstr",
"(",
")",
";",
"unsigned",
"RetOpcode",
"=",
"MBBI",
"->",
"getOpcode",
"(",
")",
";",
"DebugLoc",
"dl",
"=",
"MBBI",
"->",
"getDebugLoc",
"(",
")",
";",
"if",
"(",
"RetOpcode",
"!=",
"Z80",
"::",
"RET",
")",
"llvm_unreachable",
"(",
"\"Can only insert epilog into returning blocks\"",
")",
";",
"uint64_t",
"StackSize",
"=",
"MFI",
"->",
"getStackSize",
"(",
")",
";",
"uint64_t",
"CallFrameSize",
"=",
"MFI",
"->",
"getMaxCallFrameSize",
"(",
")",
";",
"uint64_t",
"FrameSize",
"=",
"Z80FI",
"->",
"getCalleeSavedFrameSize",
"(",
")",
";",
"uint64_t",
"NumBytes",
"=",
"StackSize",
"+",
"CallFrameSize",
"-",
"FrameSize",
";",
"while",
"(",
"MBBI",
"!=",
"MBB",
".",
"begin",
"(",
")",
")",
"{",
"MachineBasicBlock",
"::",
"iterator",
"I",
"=",
"prior",
"(",
"MBBI",
")",
";",
"unsigned",
"Opc",
"=",
"I",
"->",
"getOpcode",
"(",
")",
";",
"if",
"(",
"Opc",
"!=",
"Z80",
"::",
"POP16r",
"&&",
"!",
"I",
"->",
"isTerminator",
"(",
")",
")",
"break",
";",
"MBBI",
"--",
";",
"}",
"if",
"(",
"NumBytes",
")",
"{",
"unsigned",
"FP",
"=",
"TII",
".",
"getRegisterInfo",
"(",
")",
".",
"getFrameRegister",
"(",
"MF",
")",
";",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"dl",
",",
"TII",
".",
"get",
"(",
"Z80",
"::",
"LD16ri",
")",
",",
"FP",
")",
".",
"addImm",
"(",
"NumBytes",
")",
";",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"dl",
",",
"TII",
".",
"get",
"(",
"Z80",
"::",
"ADD16rSP",
")",
",",
"FP",
")",
";",
"BuildMI",
"(",
"MBB",
",",
"MBBI",
",",
"dl",
",",
"TII",
".",
"get",
"(",
"Z80",
"::",
"LD16SPr",
")",
")",
".",
"addReg",
"(",
"FP",
",",
"RegState",
"::",
"Kill",
")",
";",
"}",
"}",
"</s>"
] | [
"Insert",
"epilog",
"code",
"into",
"the",
"function",
"."
] | [
"Z80",
"Z80",
"Z80",
"Z80",
"Z80",
"Z80",
"Z80",
"Z80::RET",
"\"Can only insert epilog into returning blocks\"",
"Z80",
"Z80::POP16r",
"Z80::LD16ri",
"Z80::ADD16rSP",
"Z80::LD16SPr"
] | Z80FrameLowering | emitEpilogue | Z80 | MPU | LLVM | 3,590 | 285 | 1 | [] |
[
"<s>",
"X86TargetLowering",
"::",
"ConstraintType",
"X86TargetLowering",
"::",
"getConstraintType",
"(",
"const",
"std",
"::",
"string",
"&",
"Constraint",
")",
"const",
"{",
"if",
"(",
"Constraint",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"switch",
"(",
"Constraint",
"[",
"0",
"]",
")",
"{",
"case",
"'R'",
":",
"case",
"'q'",
":",
"case",
"'Q'",
":",
"case",
"'f'",
":",
"case",
"'t'",
":",
"case",
"'u'",
":",
"case",
"'y'",
":",
"case",
"'x'",
":",
"case",
"'Y'",
":",
"case",
"'l'",
":",
"return",
"C_RegisterClass",
";",
"case",
"'a'",
":",
"case",
"'b'",
":",
"case",
"'c'",
":",
"case",
"'d'",
":",
"case",
"'S'",
":",
"case",
"'D'",
":",
"case",
"'A'",
":",
"return",
"C_Register",
";",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'K'",
":",
"case",
"'L'",
":",
"case",
"'M'",
":",
"case",
"'N'",
":",
"case",
"'G'",
":",
"case",
"'C'",
":",
"case",
"'e'",
":",
"case",
"'Z'",
":",
"return",
"C_Other",
";",
"default",
":",
"break",
";",
"}",
"}",
"return",
"TargetLowering",
"::",
"getConstraintType",
"(",
"Constraint",
")",
";",
"}",
"</s>"
] | [
"Given",
"a",
"constraint",
"letter",
",",
"return",
"the",
"type",
"of",
"constraint",
"for",
"this",
"target",
"."
] | [
"X86",
"X86",
"X86",
"1",
"0"
] | X86ISelLowering (2) | getConstraintType | X86 | CPU | LLVM | 3,591 | 140 | 1 | [] |
[
"<s>",
"static",
"void",
"aarch64_override_options",
"(",
"void",
")",
"{",
"unsigned",
"long",
"cpu_isa",
"=",
"0",
";",
"unsigned",
"long",
"arch_isa",
"=",
"0",
";",
"aarch64_isa_flags",
"=",
"0",
";",
"bool",
"valid_cpu",
"=",
"true",
";",
"bool",
"valid_tune",
"=",
"true",
";",
"bool",
"valid_arch",
"=",
"true",
";",
"selected_cpu",
"=",
"NULL",
";",
"selected_arch",
"=",
"NULL",
";",
"selected_tune",
"=",
"NULL",
";",
"if",
"(",
"aarch64_cpu_string",
")",
"valid_cpu",
"=",
"aarch64_validate_mcpu",
"(",
"aarch64_cpu_string",
",",
"&",
"selected_cpu",
",",
"&",
"cpu_isa",
")",
";",
"if",
"(",
"aarch64_arch_string",
")",
"valid_arch",
"=",
"aarch64_validate_march",
"(",
"aarch64_arch_string",
",",
"&",
"selected_arch",
",",
"&",
"arch_isa",
")",
";",
"if",
"(",
"aarch64_tune_string",
")",
"valid_tune",
"=",
"aarch64_validate_mtune",
"(",
"aarch64_tune_string",
",",
"&",
"selected_tune",
")",
";",
"if",
"(",
"!",
"selected_cpu",
")",
"{",
"if",
"(",
"selected_arch",
")",
"{",
"selected_cpu",
"=",
"&",
"all_cores",
"[",
"selected_arch",
"->",
"ident",
"]",
";",
"aarch64_isa_flags",
"=",
"arch_isa",
";",
"explicit_arch",
"=",
"selected_arch",
"->",
"arch",
";",
"}",
"else",
"{",
"selected_cpu",
"=",
"aarch64_get_tune_cpu",
"(",
"aarch64_none",
")",
";",
"aarch64_isa_flags",
"=",
"TARGET_CPU_DEFAULT",
">>",
"6",
";",
"}",
"if",
"(",
"selected_tune",
")",
"explicit_tune_core",
"=",
"selected_tune",
"->",
"ident",
";",
"}",
"else",
"if",
"(",
"selected_arch",
")",
"{",
"if",
"(",
"selected_arch",
"->",
"arch",
"!=",
"selected_cpu",
"->",
"arch",
")",
"{",
"warning",
"(",
"0",
",",
"\"switch -mcpu=%s conflicts with -march=%s switch\"",
",",
"all_architectures",
"[",
"selected_cpu",
"->",
"arch",
"]",
".",
"name",
",",
"selected_arch",
"->",
"name",
")",
";",
"}",
"aarch64_isa_flags",
"=",
"arch_isa",
";",
"explicit_arch",
"=",
"selected_arch",
"->",
"arch",
";",
"explicit_tune_core",
"=",
"selected_tune",
"?",
"selected_tune",
"->",
"ident",
":",
"selected_cpu",
"->",
"ident",
";",
"}",
"else",
"{",
"aarch64_isa_flags",
"=",
"cpu_isa",
";",
"explicit_tune_core",
"=",
"selected_tune",
"?",
"selected_tune",
"->",
"ident",
":",
"selected_cpu",
"->",
"ident",
";",
"gcc_assert",
"(",
"selected_cpu",
")",
";",
"selected_arch",
"=",
"&",
"all_architectures",
"[",
"selected_cpu",
"->",
"arch",
"]",
";",
"explicit_arch",
"=",
"selected_arch",
"->",
"arch",
";",
"}",
"if",
"(",
"!",
"selected_arch",
")",
"{",
"gcc_assert",
"(",
"selected_cpu",
")",
";",
"selected_arch",
"=",
"&",
"all_architectures",
"[",
"selected_cpu",
"->",
"arch",
"]",
";",
"}",
"if",
"(",
"!",
"selected_tune",
")",
"selected_tune",
"=",
"selected_cpu",
";",
"if",
"(",
"TARGET_ILP32",
")",
"error",
"(",
"\"assembler does not support -mabi=ilp32\"",
")",
";",
"aarch64_sve_vg",
"=",
"aarch64_convert_sve_vector_bits",
"(",
"aarch64_sve_vector_bits",
")",
";",
"if",
"(",
"aarch64_ra_sign_scope",
"!=",
"AARCH64_FUNCTION_NONE",
"&&",
"TARGET_ILP32",
")",
"sorry",
"(",
"\"return address signing is only supported for -mabi=lp64\"",
")",
";",
"if",
"(",
"(",
"aarch64_cpu_string",
"&&",
"valid_cpu",
")",
"||",
"(",
"aarch64_tune_string",
"&&",
"valid_tune",
")",
")",
"gcc_assert",
"(",
"explicit_tune_core",
"!=",
"aarch64_none",
")",
";",
"if",
"(",
"(",
"aarch64_cpu_string",
"&&",
"valid_cpu",
")",
"||",
"(",
"aarch64_arch_string",
"&&",
"valid_arch",
")",
")",
"gcc_assert",
"(",
"explicit_arch",
"!=",
"aarch64_no_arch",
")",
";",
"aarch64_override_options_internal",
"(",
"&",
"global_options",
")",
";",
"target_option_default_node",
"=",
"target_option_current_node",
"=",
"build_target_option_node",
"(",
"&",
"global_options",
")",
";",
"}",
"</s>"
] | [
"Implement",
"TARGET_OPTION_OVERRIDE",
"."
] | [
"aarch64",
"0",
"0",
"0",
"6",
"0",
"\"switch -mcpu=%s conflicts with -march=%s switch\"",
"\"assembler does not support -mabi=ilp32\"",
"\"return address signing is only supported for -mabi=lp64\""
] | aarch645 | aarch64_override_options | aarch64 | CPU | GCC | 3,592 | 377 | 1 | [] |
[
"<s>",
"void",
"HexagonInstrInfo",
"::",
"storeRegToStackSlot",
"(",
"MachineBasicBlock",
"&",
"MBB",
",",
"MachineBasicBlock",
"::",
"iterator",
"I",
",",
"unsigned",
"SrcReg",
",",
"bool",
"isKill",
",",
"int",
"FI",
",",
"const",
"TargetRegisterClass",
"*",
"RC",
",",
"const",
"TargetRegisterInfo",
"*",
"TRI",
")",
"const",
"{",
"DebugLoc",
"DL",
"=",
"MBB",
".",
"findDebugLoc",
"(",
"I",
")",
";",
"MachineFunction",
"&",
"MF",
"=",
"*",
"MBB",
".",
"getParent",
"(",
")",
";",
"MachineFrameInfo",
"&",
"MFI",
"=",
"*",
"MF",
".",
"getFrameInfo",
"(",
")",
";",
"unsigned",
"Align",
"=",
"MFI",
".",
"getObjectAlignment",
"(",
"FI",
")",
";",
"MachineMemOperand",
"*",
"MMO",
"=",
"MF",
".",
"getMachineMemOperand",
"(",
"MachinePointerInfo",
"(",
"PseudoSourceValue",
"::",
"getFixedStack",
"(",
"FI",
")",
")",
",",
"MachineMemOperand",
"::",
"MOStore",
",",
"MFI",
".",
"getObjectSize",
"(",
"FI",
")",
",",
"Align",
")",
";",
"if",
"(",
"Hexagon",
"::",
"IntRegsRegClass",
".",
"hasSubClassEq",
"(",
"RC",
")",
")",
"{",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"Hexagon",
"::",
"S2_storeri_io",
")",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addReg",
"(",
"SrcReg",
",",
"getKillRegState",
"(",
"isKill",
")",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"}",
"else",
"if",
"(",
"Hexagon",
"::",
"DoubleRegsRegClass",
".",
"hasSubClassEq",
"(",
"RC",
")",
")",
"{",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"Hexagon",
"::",
"S2_storerd_io",
")",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addReg",
"(",
"SrcReg",
",",
"getKillRegState",
"(",
"isKill",
")",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"}",
"else",
"if",
"(",
"Hexagon",
"::",
"PredRegsRegClass",
".",
"hasSubClassEq",
"(",
"RC",
")",
")",
"{",
"BuildMI",
"(",
"MBB",
",",
"I",
",",
"DL",
",",
"get",
"(",
"Hexagon",
"::",
"STriw_pred",
")",
")",
".",
"addFrameIndex",
"(",
"FI",
")",
".",
"addImm",
"(",
"0",
")",
".",
"addReg",
"(",
"SrcReg",
",",
"getKillRegState",
"(",
"isKill",
")",
")",
".",
"addMemOperand",
"(",
"MMO",
")",
";",
"}",
"else",
"{",
"llvm_unreachable",
"(",
"\"Unimplemented\"",
")",
";",
"}",
"}",
"</s>"
] | [
"Store",
"the",
"specified",
"register",
"of",
"the",
"given",
"register",
"class",
"to",
"the",
"specified",
"stack",
"frame",
"index",
"."
] | [
"Hexagon",
"Hexagon",
"Hexagon::IntRegsRegClass",
"Hexagon::S2_storeri_io",
"0",
"Hexagon::DoubleRegsRegClass",
"Hexagon::S2_storerd_io",
"0",
"Hexagon::PredRegsRegClass",
"Hexagon::STriw_pred",
"0",
"\"Unimplemented\""
] | HexagonInstrInfo23 | storeRegToStackSlot | Hexagon | DSP | LLVM | 3,593 | 282 | 1 | [] |
[
"<s>",
"void",
"WasmPEI",
"::",
"assignCalleeSavedSpillSlots",
"(",
"MachineFunction",
"&",
"F",
",",
"const",
"BitVector",
"&",
"SavedRegs",
")",
"{",
"MinCSFrameIndex",
"=",
"INT_MAX",
";",
"MaxCSFrameIndex",
"=",
"0",
";",
"if",
"(",
"SavedRegs",
".",
"empty",
"(",
")",
")",
"return",
";",
"const",
"TargetRegisterInfo",
"*",
"RegInfo",
"=",
"F",
".",
"getSubtarget",
"(",
")",
".",
"getRegisterInfo",
"(",
")",
";",
"const",
"MCPhysReg",
"*",
"CSRegs",
"=",
"RegInfo",
"->",
"getCalleeSavedRegs",
"(",
"&",
"F",
")",
";",
"std",
"::",
"vector",
"<",
"CalleeSavedInfo",
">",
"CSI",
";",
"for",
"(",
"unsigned",
"i",
"=",
"0",
";",
"CSRegs",
"[",
"i",
"]",
";",
"++",
"i",
")",
"{",
"unsigned",
"Reg",
"=",
"CSRegs",
"[",
"i",
"]",
";",
"if",
"(",
"SavedRegs",
".",
"test",
"(",
"Reg",
")",
")",
"CSI",
".",
"push_back",
"(",
"CalleeSavedInfo",
"(",
"Reg",
")",
")",
";",
"}",
"const",
"TargetFrameLowering",
"*",
"TFI",
"=",
"F",
".",
"getSubtarget",
"(",
")",
".",
"getFrameLowering",
"(",
")",
";",
"MachineFrameInfo",
"*",
"MFI",
"=",
"F",
".",
"getFrameInfo",
"(",
")",
";",
"if",
"(",
"!",
"TFI",
"->",
"assignCalleeSavedSpillSlots",
"(",
"F",
",",
"RegInfo",
",",
"CSI",
")",
")",
"{",
"if",
"(",
"CSI",
".",
"empty",
"(",
")",
")",
"return",
";",
"unsigned",
"NumFixedSpillSlots",
";",
"const",
"TargetFrameLowering",
"::",
"SpillSlot",
"*",
"FixedSpillSlots",
"=",
"TFI",
"->",
"getCalleeSavedSpillSlots",
"(",
"NumFixedSpillSlots",
")",
";",
"for",
"(",
"std",
"::",
"vector",
"<",
"CalleeSavedInfo",
">",
"::",
"iterator",
"I",
"=",
"CSI",
".",
"begin",
"(",
")",
",",
"E",
"=",
"CSI",
".",
"end",
"(",
")",
";",
"I",
"!=",
"E",
";",
"++",
"I",
")",
"{",
"unsigned",
"Reg",
"=",
"I",
"->",
"getReg",
"(",
")",
";",
"const",
"TargetRegisterClass",
"*",
"RC",
"=",
"RegInfo",
"->",
"getMinimalPhysRegClass",
"(",
"Reg",
")",
";",
"int",
"FrameIdx",
";",
"if",
"(",
"RegInfo",
"->",
"hasReservedSpillSlot",
"(",
"F",
",",
"Reg",
",",
"FrameIdx",
")",
")",
"{",
"I",
"->",
"setFrameIdx",
"(",
"FrameIdx",
")",
";",
"continue",
";",
"}",
"const",
"TargetFrameLowering",
"::",
"SpillSlot",
"*",
"FixedSlot",
"=",
"FixedSpillSlots",
";",
"while",
"(",
"FixedSlot",
"!=",
"FixedSpillSlots",
"+",
"NumFixedSpillSlots",
"&&",
"FixedSlot",
"->",
"Reg",
"!=",
"Reg",
")",
"++",
"FixedSlot",
";",
"if",
"(",
"FixedSlot",
"==",
"FixedSpillSlots",
"+",
"NumFixedSpillSlots",
")",
"{",
"unsigned",
"Align",
"=",
"RC",
"->",
"getAlignment",
"(",
")",
";",
"unsigned",
"StackAlign",
"=",
"TFI",
"->",
"getStackAlignment",
"(",
")",
";",
"Align",
"=",
"std",
"::",
"min",
"(",
"Align",
",",
"StackAlign",
")",
";",
"FrameIdx",
"=",
"MFI",
"->",
"CreateStackObject",
"(",
"RC",
"->",
"getSize",
"(",
")",
",",
"Align",
",",
"true",
")",
";",
"if",
"(",
"(",
"unsigned",
")",
"FrameIdx",
"<",
"MinCSFrameIndex",
")",
"MinCSFrameIndex",
"=",
"FrameIdx",
";",
"if",
"(",
"(",
"unsigned",
")",
"FrameIdx",
">",
"MaxCSFrameIndex",
")",
"MaxCSFrameIndex",
"=",
"FrameIdx",
";",
"}",
"else",
"{",
"FrameIdx",
"=",
"MFI",
"->",
"CreateFixedSpillStackObject",
"(",
"RC",
"->",
"getSize",
"(",
")",
",",
"FixedSlot",
"->",
"Offset",
")",
";",
"}",
"I",
"->",
"setFrameIdx",
"(",
"FrameIdx",
")",
";",
"}",
"}",
"MFI",
"->",
"setCalleeSavedInfo",
"(",
"CSI",
")",
";",
"}",
"</s>"
] | [
"This",
"function",
"will",
"assign",
"callee",
"saved",
"gprs",
"to",
"volatile",
"vector",
"registers",
"for",
"prologue",
"spills",
"when",
"applicable",
"."
] | [
"WebAssembly",
"0",
"0"
] | WebAssemblyPEI | assignCalleeSavedSpillSlots | WebAssembly | Virtual ISA | LLVM | 3,594 | 407 | 1 | [] |
[
"<s>",
"std",
"::",
"unique_ptr",
"<",
"SICacheControl",
">",
"SICacheControl",
"::",
"create",
"(",
"const",
"GCNSubtarget",
"&",
"ST",
")",
"{",
"GCNSubtarget",
"::",
"Generation",
"Generation",
"=",
"ST",
".",
"getGeneration",
"(",
")",
";",
"if",
"(",
"Generation",
"<=",
"AMDGPUSubtarget",
"::",
"SOUTHERN_ISLANDS",
")",
"return",
"std",
"::",
"make_unique",
"<",
"SIGfx6CacheControl",
">",
"(",
"ST",
")",
";",
"if",
"(",
"Generation",
"<",
"AMDGPUSubtarget",
"::",
"GFX10",
")",
"return",
"std",
"::",
"make_unique",
"<",
"SIGfx7CacheControl",
">",
"(",
"ST",
")",
";",
"return",
"std",
"::",
"make_unique",
"<",
"SIGfx10CacheControl",
">",
"(",
"ST",
",",
"ST",
".",
"isCuModeEnabled",
"(",
")",
")",
";",
"}",
"</s>"
] | [
"This",
"creates",
"an",
"identified",
"struct",
"."
] | [
"AMDGPU",
"SI",
"SI",
"AMDGPU",
"SI",
"AMDGPU",
"SI",
"SI"
] | SIMemoryLegalizer14 | create | AMDGPU | GPU | LLVM | 3,595 | 83 | 1 | [] |
[
"<s>",
"bool",
"isImm",
"(",
")",
"const",
"{",
"return",
"Kind",
"==",
"k_Immediate",
";",
"}",
"</s>"
] | [
"isImm",
"-",
"Is",
"this",
"an",
"immediate",
"operand",
"?"
] | [
"AVR"
] | AVRAsmParser | isImm | AVR | MPU | LLVM | 3,596 | 12 | 1 | [] |
[
"<s>",
"static",
"rtx",
"generate_set_vrsave",
"(",
"rtx",
"reg",
",",
"rs6000_stack_t",
"*",
"info",
",",
"int",
"epiloguep",
")",
"{",
"int",
"nclobs",
",",
"i",
";",
"rtx",
"insn",
",",
"clobs",
"[",
"TOTAL_ALTIVEC_REGS",
"+",
"1",
"]",
";",
"rtx",
"vrsave",
"=",
"gen_rtx_REG",
"(",
"SImode",
",",
"VRSAVE_REGNO",
")",
";",
"clobs",
"[",
"0",
"]",
"=",
"gen_rtx_SET",
"(",
"vrsave",
",",
"gen_rtx_UNSPEC_VOLATILE",
"(",
"SImode",
",",
"gen_rtvec",
"(",
"2",
",",
"reg",
",",
"vrsave",
")",
",",
"UNSPECV_SET_VRSAVE",
")",
")",
";",
"nclobs",
"=",
"1",
";",
"for",
"(",
"i",
"=",
"FIRST_ALTIVEC_REGNO",
";",
"i",
"<=",
"LAST_ALTIVEC_REGNO",
";",
"++",
"i",
")",
"if",
"(",
"info",
"->",
"vrsave_mask",
"&",
"ALTIVEC_REG_BIT",
"(",
"i",
")",
")",
"{",
"if",
"(",
"!",
"epiloguep",
"||",
"call_used_regs",
"[",
"i",
"]",
")",
"clobs",
"[",
"nclobs",
"++",
"]",
"=",
"gen_hard_reg_clobber",
"(",
"V4SImode",
",",
"i",
")",
";",
"else",
"{",
"rtx",
"reg",
"=",
"gen_rtx_REG",
"(",
"V4SImode",
",",
"i",
")",
";",
"clobs",
"[",
"nclobs",
"++",
"]",
"=",
"gen_rtx_SET",
"(",
"reg",
",",
"gen_rtx_UNSPEC",
"(",
"V4SImode",
",",
"gen_rtvec",
"(",
"1",
",",
"reg",
")",
",",
"27",
")",
")",
";",
"}",
"}",
"insn",
"=",
"gen_rtx_PARALLEL",
"(",
"VOIDmode",
",",
"rtvec_alloc",
"(",
"nclobs",
")",
")",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"nclobs",
";",
"++",
"i",
")",
"XVECEXP",
"(",
"insn",
",",
"0",
",",
"i",
")",
"=",
"clobs",
"[",
"i",
"]",
";",
"return",
"insn",
";",
"}",
"</s>"
] | [
"Returns",
"an",
"insn",
"that",
"has",
"a",
"vrsave",
"set",
"operation",
"with",
"the",
"appropriate",
"CLOBBERs",
"."
] | [
"rs6000",
"1",
"0",
"2",
"1",
"1",
"27",
"0",
"0"
] | rs60008 | generate_set_vrsave | rs6000 | CPU | GCC | 3,597 | 200 | 1 | [] |
[
"<s>",
"static",
"void",
"mips_block_move_straight",
"(",
"rtx",
"dest",
",",
"rtx",
"src",
",",
"HOST_WIDE_INT",
"length",
")",
"{",
"HOST_WIDE_INT",
"offset",
",",
"delta",
";",
"unsigned",
"HOST_WIDE_INT",
"bits",
";",
"int",
"i",
";",
"machine_mode",
"mode",
";",
"rtx",
"*",
"regs",
";",
"if",
"(",
"!",
"ISA_HAS_LWL_LWR",
")",
"bits",
"=",
"MIN",
"(",
"BITS_PER_WORD",
",",
"MIN",
"(",
"MEM_ALIGN",
"(",
"src",
")",
",",
"MEM_ALIGN",
"(",
"dest",
")",
")",
")",
";",
"else",
"{",
"if",
"(",
"MEM_ALIGN",
"(",
"src",
")",
"==",
"BITS_PER_WORD",
"/",
"2",
"&&",
"MEM_ALIGN",
"(",
"dest",
")",
"==",
"BITS_PER_WORD",
"/",
"2",
")",
"bits",
"=",
"BITS_PER_WORD",
"/",
"2",
";",
"else",
"bits",
"=",
"BITS_PER_WORD",
";",
"}",
"mode",
"=",
"int_mode_for_size",
"(",
"bits",
",",
"0",
")",
".",
"require",
"(",
")",
";",
"delta",
"=",
"bits",
"/",
"BITS_PER_UNIT",
";",
"regs",
"=",
"XALLOCAVEC",
"(",
"rtx",
",",
"length",
"/",
"delta",
")",
";",
"for",
"(",
"offset",
"=",
"0",
",",
"i",
"=",
"0",
";",
"offset",
"+",
"delta",
"<=",
"length",
";",
"offset",
"+=",
"delta",
",",
"i",
"++",
")",
"{",
"regs",
"[",
"i",
"]",
"=",
"gen_reg_rtx",
"(",
"mode",
")",
";",
"if",
"(",
"MEM_ALIGN",
"(",
"src",
")",
">=",
"bits",
")",
"mips_emit_move",
"(",
"regs",
"[",
"i",
"]",
",",
"adjust_address",
"(",
"src",
",",
"mode",
",",
"offset",
")",
")",
";",
"else",
"{",
"rtx",
"part",
"=",
"adjust_address",
"(",
"src",
",",
"BLKmode",
",",
"offset",
")",
";",
"set_mem_size",
"(",
"part",
",",
"delta",
")",
";",
"if",
"(",
"!",
"mips_expand_ext_as_unaligned_load",
"(",
"regs",
"[",
"i",
"]",
",",
"part",
",",
"bits",
",",
"0",
",",
"0",
")",
")",
"gcc_unreachable",
"(",
")",
";",
"}",
"}",
"for",
"(",
"offset",
"=",
"0",
",",
"i",
"=",
"0",
";",
"offset",
"+",
"delta",
"<=",
"length",
";",
"offset",
"+=",
"delta",
",",
"i",
"++",
")",
"if",
"(",
"MEM_ALIGN",
"(",
"dest",
")",
">=",
"bits",
")",
"mips_emit_move",
"(",
"adjust_address",
"(",
"dest",
",",
"mode",
",",
"offset",
")",
",",
"regs",
"[",
"i",
"]",
")",
";",
"else",
"{",
"rtx",
"part",
"=",
"adjust_address",
"(",
"dest",
",",
"BLKmode",
",",
"offset",
")",
";",
"set_mem_size",
"(",
"part",
",",
"delta",
")",
";",
"if",
"(",
"!",
"mips_expand_ins_as_unaligned_store",
"(",
"part",
",",
"regs",
"[",
"i",
"]",
",",
"bits",
",",
"0",
")",
")",
"gcc_unreachable",
"(",
")",
";",
"}",
"if",
"(",
"offset",
"<",
"length",
")",
"{",
"src",
"=",
"adjust_address",
"(",
"src",
",",
"BLKmode",
",",
"offset",
")",
";",
"dest",
"=",
"adjust_address",
"(",
"dest",
",",
"BLKmode",
",",
"offset",
")",
";",
"move_by_pieces",
"(",
"dest",
",",
"src",
",",
"length",
"-",
"offset",
",",
"MIN",
"(",
"MEM_ALIGN",
"(",
"src",
")",
",",
"MEM_ALIGN",
"(",
"dest",
")",
")",
",",
"RETURN_BEGIN",
")",
";",
"}",
"}",
"</s>"
] | [
"Emit",
"straight-line",
"code",
"to",
"move",
"LENGTH",
"bytes",
"from",
"SRC",
"to",
"DEST",
".",
"Assume",
"that",
"the",
"areas",
"do",
"not",
"overlap",
"."
] | [
"mips",
"2",
"2",
"2",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
] | mips | mips_block_move_straight | mips | CPU | GCC | 3,598 | 377 | 1 | [] |
[
"<s>",
"void",
"AMDGPUHSATargetObjectFile",
"::",
"Initialize",
"(",
"MCContext",
"&",
"Ctx",
",",
"const",
"TargetMachine",
"&",
"TM",
")",
"{",
"TargetLoweringObjectFileELF",
"::",
"Initialize",
"(",
"Ctx",
",",
"TM",
")",
";",
"InitializeELF",
"(",
"TM",
".",
"Options",
".",
"UseInitArray",
")",
";",
"TextSection",
"=",
"AMDGPU",
"::",
"getHSATextSection",
"(",
"Ctx",
")",
";",
"}",
"</s>"
] | [
"This",
"method",
"must",
"be",
"called",
"before",
"any",
"actual",
"lowering",
"is",
"done",
"."
] | [
"AMDGPU",
"AMDGPU",
"AMDGPU::getHSATextSection"
] | AMDGPUHSATargetObjectFile | Initialize | AMDGPU | GPU | LLVM | 3,599 | 43 | 1 | [] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.