Hi Will, on 2022/7/20 04:15, will schmidt wrote: > [PATCH, rs6000, v2] Additional cleanup of rs6000_builtin_mask > > Hi, > Post the rs6000 builtins rewrite, some of the leftover builtin > code is redundant and can be removed. > This replaces the usage of bu_mask in rs6000_target_modify_macros > with checks against the rs6000_isa_flags equivalent directly. Thusly > the bu_mask variable can be removed. After this update there > are no other uses of rs6000_builtin_mask_calculate, so that function > can also be safely removed. > > No functional change, though some output under debug has been removed. > > [V2] > Per patch review and subsequent investigations, the > rs6000_builtin_mask and x_rs6000_builtin_mask can also be removed, as > well as the entirety of the rs6000_builtin_mask_names table. >
I assumed this has been tested as before, so this patch is OK. Thanks! > gcc/ > * config/rs6000/rs6000-c.cc: Update comments. > (rs6000_target_modify_macros): Remove bu_mask references. > (rs6000_define_or_undefine_macro): Replace bu_mask reference > with a rs6000_cpu value check. > (rs6000_cpu_cpp_builtins): Remove rs6000_builtin_mask_calculate() > parameter from call to rs6000_target_modify_macros. > * config/rs6000/rs6000-protos.h (rs6000_target_modify_macros, > rs6000_target_modify_macros_ptr): Remove parameter from extern > for the prototype. > * config/rs6000/rs6000.cc (rs6000_target_modify_macros_ptr): Remove > parameter from prototype, update calls to this function. > (rs6000_print_builtin_options): Remove prototype, call and function. > (rs6000_builtin_mask_calculate): Remove function. > (rs6000_debug_reg_global): Remove call to rs6000_print_builtin_options. > (rs6000_option_override_internal): Remove rs6000_builtin_mask var > and builtin_mask debug output. > (rs6000_builtin_mask_names): Remove. > (rs6000_pragma_target_parse): Remove prev_bumask, cur_bumask, > diff_bumask references; Update calls to > rs6000_target_modify_ptr. Nit: this "rs6000_target_modify_ptr" seems not necessarily to start one new line. :) BR, Kewen > * config/rs6000/rs6000.opt (rs6000_builtin_mask): Remove. >