On November 10, 2014 9:13:29 PM CET, Uros Bizjak <ubiz...@gmail.com> wrote: >Hello! > >std::swap was recently mentioned in gcc-patches@ mailing list, so I >gave it a try. As can be seen below, a lot of code in config/i386 >benefits from this conversion. > >Surprisingly, I didn't have to include any header on F20 linux build. >So, is this patch OK as far as c++ is concerned? > >2014-11-10 Uros Bizjak <ubiz...@gmail.com> > > * config/i386/i386.c (ix86_decompose_address): Replace open-coded
No extra includes required? Then certainly OK. Otherwise the required includes have to go to system.h in which case please drop the custom swap template from tree-vect-data-refs.c Thanks, Richard. > swap with std::swap to swap values. > (ix86_fixup_binary_operands): Ditto. > (ix86_binary_operator_ok): Ditto. > (ix86_prepare_fp_compare_args): Ditto. > (ix86_expand_branch): Ditto. > (ix86_expand_carry_flag_compare): Ditto. > (ix86_expand_int_movcc): Ditto. > (ix86_prepare_sse_fp_compare_args): Ditto. > (ix86_expand_sse_fp_minmax): Ditto. > (ix86_expand_int_vcond): Ditto. > (ix86_split_long_move): Ditto. > (ix86_expand_sse_comi): Ditto. > (ix86_expand_sse_compare_and_jump): Ditto. > (ix86_expand_sse_compare_mask): Ditto. > * config/i386/i386.md (*add<mode>_1): Ditto. > (addsi_1_zext): Ditto. > (*addhi_1): Ditto. > (*addqi_1): Ditto. > (*add<mode>_2): Ditto. > (*addsi_2_zext): Ditto. > (*add<mode>_3): Ditto. > (*addsi_3_zext): Ditto. > (*add<mode>_5): Ditto. > (absneg splitter): Ditto. > >Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > >I will wait for a day or two for possible comments from c++ side... > >Uros.