This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Move get_addr_base_and_unit_offset_1() out of tree-dfa.h
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 5 Jun 2014 15:52:24 +0200
- Subject: Re: [PATCH] Move get_addr_base_and_unit_offset_1() out of tree-dfa.h
- Authentication-results: sourceware.org; auth=none
- References: <539074B6 dot 1050902 at redhat dot com>
On Thu, Jun 5, 2014 at 3:46 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
> I'd like to move this rather large inline function out of the header file
> and into the .c file. The function has the following comment:
>
> /* ??? This is a static inline here to avoid the overhead of the indirect
> calls
> + to VALUEIZE. But is this overhead really that significant? And should
> we
> + perhaps just rely on WHOPR to specialize the function? */
>
>
> I highly doubt we'd be able to measure any compile time difference by not
> inlining this, however due diligence:
>
> get_addr_base_and_unit_offset_1 () is only called from 2 files.
> - tree-dfa.c : Being moved here, so not an issue.
>
> - gimple-fold.c : Only called from gimple_fold_stmt_to_constant_1 (). This
> function is called internally only from gimple_fold_stmt_to_constant ().
> Both functions also take a passed in VALUEIZE function pointer and pass it
> on.
>
> *All* calls to the gimple_fold_stmt_to_constant* functions occur *outside*
> of gimple-fold.c, so there would never be any inlined versions that remove
> the indirect call to VALUEIZE anyway.
>
> Bootstrapped on x86_64-unknown-linux-gnu, regressions running.
> Assuming no new failures, OK for trunk?
Ok.
Thanks,
Richard.
> Andrew
>