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] data prefetch support and __builtin_prefetch (take 2)


2001-12-03  Janis Johnson  <janis187@us.ibm.com>

        * rtl.def (PREFETCH): New rtx code.
        * doc/rtl.texi (PREFETCH): Add documentation.
        * function.c (instantiate_virtual_regs_1): Handle PREFETCH rtx.
        * rtlanal.c (reg_referenced_p): Ditto.
        * sched-vis.c (print_exp):  Ditto.
        * ssa-dce.c (find_inherently_necessary):  Ditto.

        * config/ia64/ia64.h (SIMULTANEOUS PREFETCHES): Define.
          (PREFETCH_BLOCK): Define.
        * config/ia64/ia64.md (itanium_class): Add lfetch.
          (prefetch, prefetch_internal): New.

        * builtin-types.def (BT_FN_VOID_PTR_INT_INT): New.
        * builtins.def (BUILT_IN_PREFETCH): New.
        * builtins.c (expand_builtin_expect): New.
          (expand_builtin): Call it.
        * doc/extend.texi: Document __builtin_expect.

        * config/i386/i386.md (prefetch): Rename as prefetch_sse to avoid
          conflicts with new generic prefetch functionality.
        * config/i386/i386.c (ix86_expand_builtin): Use new name for
          prefetch_sse.

Argh!  This patch breaks the build on ARM platforms.  Three problems with 
it:

1) The arm.md already has a "prefetch" expander that takes a different 
number of arguments.  (I can fix this, but it should have been fixed in 
the above check-in).

2) ARM targets already have a __builtin_prefetch function that takes one 
argument; as far as I can tell your new implementation will mean an API 
change for users of gcc-3.0

3) There's no documentation of the "prefetch" expander in md.texi

and finally,

4)      * builtins.c (expand_builtin_expect): New.
          (expand_builtin): Call it.
        * doc/extend.texi: Document __builtin_expect.

Don't you mean "prefetch" not "expect"?

R.


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