This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Move get_addr_base_and_unit_offset_1() out of tree-dfa.h


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]