On Tue, Apr 30, 2024 at 9:58 AM Richard Biener <richard.guent...@gmail.com> wrote: > > On Fri, Apr 26, 2024 at 11:45 AM Aldy Hernandez via Gcc <gcc@gcc.gnu.org> > wrote: > > > > Hi folks! > > > > In implementing prange (pointer ranges), I have found a 1.74% slowdown > > in VRP, even without any code path actually using the code. I have > > tracked this down to irange::get_bitmask() being compiled differently > > with and without the bare bones patch. With the patch, > > irange::get_bitmask() has a lot of code inlined into it, particularly > > get_bitmask_from_range() and consequently the wide_int_storage code. > > > > I don't know whether this is expected behavior, and if it is, how to > > mitigate it. I have tried declaring get_bitmask_from_range() inline, > > but that didn't help. OTOH, using __attribute__((always_inline)) > > helps a bit, but not entirely. What does help is inlining > > irange::get_bitmask() entirely, but that seems like a big hammer. > > You can use -Winline to see why we don't inline an inline declared > function. I would guess the unit-growth limit kicks in?
Ah, will do. Thanks. > > Did you check a release checking compiler? That might still > inline things. Yes, we only measure performance with release builds. Aldy