hi Jeff Please see my earlier reply here. https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg310656.html
Maybe you scrolled past it in so many emails:) BR, Fei On 2023-06-25 21:36 Jeff Law <jeffreya...@gmail.com> wrote: > > > >On 6/20/23 03:40, Fei Gao wrote: >> gcc/ChangeLog: >> >> * shrink-wrap.cc (try_shrink_wrapping_separate):call >> use_shrink_wrapping_separate. >> (use_shrink_wrapping_separate): wrap the condition >> check in use_shrink_wrapping_separate. >> * shrink-wrap.h (use_shrink_wrapping_separate): add to extern >I'm still missing somethign here. > >Why doesn't the RISC-V target simply disable separate shrink wrapping by >indicating no components are eligible in the relevant cases. ie, I do >not think we need another knob here. > >To be more concrete: > >> /* Implement TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS. */ >> >> static sbitmap >> riscv_get_separate_components (void) >> { >> HOST_WIDE_INT offset; >> sbitmap components = sbitmap_alloc (FIRST_PSEUDO_REGISTER); >> bitmap_clear (components); >> >> if (riscv_use_save_libcall (&cfun->machine->frame) >> || cfun->machine->interrupt_handler_p >> || !cfun->machine->frame.gp_sp_offset.is_constant ()) >> return components; >Don't we get the behavior we want if we change this code to return an >zero'd sbitmap? > >jeff