Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Target/GlobalISel/Combine.td
Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Lines | def combine_insert_vec_elts_build_vector : GICombineRule< | ||||
(apply [{ Helper.applyCombineInsertVecElts(*${root}, ${info}); }])>; | (apply [{ Helper.applyCombineInsertVecElts(*${root}, ${info}); }])>; | ||||
def load_or_combine : GICombineRule< | def load_or_combine : GICombineRule< | ||||
(defs root:$root, build_fn_matchinfo:$info), | (defs root:$root, build_fn_matchinfo:$info), | ||||
(match (wip_match_opcode G_OR):$root, | (match (wip_match_opcode G_OR):$root, | ||||
[{ return Helper.matchLoadOrCombine(*${root}, ${info}); }]), | [{ return Helper.matchLoadOrCombine(*${root}, ${info}); }]), | ||||
(apply [{ Helper.applyBuildFn(*${root}, ${info}); }])>; | (apply [{ Helper.applyBuildFn(*${root}, ${info}); }])>; | ||||
def truncstore_merge_matcdata : GIDefMatchData<"MergeTruncStoresInfo">; | |||||
def truncstore_merge : GICombineRule< | |||||
(defs root:$root, truncstore_merge_matcdata:$info), | |||||
(match (wip_match_opcode G_STORE):$root, | |||||
[{ return Helper.matchTruncStoreMerge(*${root}, ${info}); }]), | |||||
(apply [{ Helper.applyTruncStoreMerge(*${root}, ${info}); }])>; | |||||
def extend_through_phis_matchdata: GIDefMatchData<"MachineInstr*">; | def extend_through_phis_matchdata: GIDefMatchData<"MachineInstr*">; | ||||
def extend_through_phis : GICombineRule< | def extend_through_phis : GICombineRule< | ||||
(defs root:$root, extend_through_phis_matchdata:$matchinfo), | (defs root:$root, extend_through_phis_matchdata:$matchinfo), | ||||
(match (wip_match_opcode G_PHI):$root, | (match (wip_match_opcode G_PHI):$root, | ||||
[{ return Helper.matchExtendThroughPhis(*${root}, ${matchinfo}); }]), | [{ return Helper.matchExtendThroughPhis(*${root}, ${matchinfo}); }]), | ||||
(apply [{ Helper.applyExtendThroughPhis(*${root}, ${matchinfo}); }])>; | (apply [{ Helper.applyExtendThroughPhis(*${root}, ${matchinfo}); }])>; | ||||
// Currently only the one combine above. | // Currently only the one combine above. | ||||
▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | def all_combines : GICombineGroup<[trivial_combines, insert_vec_elt_combines, | ||||
shl_ashr_to_sext_inreg, sext_inreg_of_load, | shl_ashr_to_sext_inreg, sext_inreg_of_load, | ||||
width_reduction_combines, select_combines, | width_reduction_combines, select_combines, | ||||
known_bits_simplifications, ext_ext_fold, | known_bits_simplifications, ext_ext_fold, | ||||
not_cmp_fold, opt_brcond_by_inverting_cond, | not_cmp_fold, opt_brcond_by_inverting_cond, | ||||
unmerge_merge, fabs_fabs_fold, unmerge_cst, unmerge_dead_to_trunc, | unmerge_merge, fabs_fabs_fold, unmerge_cst, unmerge_dead_to_trunc, | ||||
unmerge_zext_to_zext, merge_unmerge, trunc_ext_fold, trunc_shl, | unmerge_zext_to_zext, merge_unmerge, trunc_ext_fold, trunc_shl, | ||||
const_combines, xor_of_and_with_same_reg, ptr_add_with_zero, | const_combines, xor_of_and_with_same_reg, ptr_add_with_zero, | ||||
shift_immed_chain, shift_of_shifted_logic_chain, load_or_combine, | shift_immed_chain, shift_of_shifted_logic_chain, load_or_combine, | ||||
div_rem_to_divrem, funnel_shift_combines, form_bitfield_extract, | truncstore_merge, div_rem_to_divrem, funnel_shift_combines, | ||||
constant_fold]>; | form_bitfield_extract, constant_fold]>; | ||||
// A combine group used to for prelegalizer combiners at -O0. The combines in | // A combine group used to for prelegalizer combiners at -O0. The combines in | ||||
// this group have been selected based on experiments to balance code size and | // this group have been selected based on experiments to balance code size and | ||||
// compile time performance. | // compile time performance. | ||||
def optnone_combines : GICombineGroup<[trivial_combines, | def optnone_combines : GICombineGroup<[trivial_combines, | ||||
ptr_add_immed_chain, combines_for_extload, | ptr_add_immed_chain, combines_for_extload, | ||||
not_cmp_fold, opt_brcond_by_inverting_cond]>; | not_cmp_fold, opt_brcond_by_inverting_cond]>; |