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] OpenMP #pragma omp declare simd support (take 2)


On Mon, Nov 25, 2013 at 06:15:50PM +0100, Jan Hubicka wrote:
> > > What's the reason you cannot defer SIMD cloning to LTRANS stage
> > > as simple IPA pass next to IPA-PTA?
> > 
> > Ok, deferring till after IPA-PTA was easy, just small ipa-cp.c changes
> > (look at the attribute rather than simd*clone* fields), passes.def and
> > had to tweak ipa_add_new_function which assumed that all new functions
> > must be definitions with gimple body.
> 
> Note that any small IPA pass at ltrans will increase peak memory use of
> ltrans copmilation by loading all function bodies into memory (since
> IPA transformations needs to be applied first).
> 
> It would be nice to avoid these enabled by default unless we have really
> good reason for it.

  bool gate () { return flag_openmp || flag_openmp_simd
                        || flag_enable_cilkplus; }

isn't exactly enabled by default ;)
Anyway, all the pass needs is bodies of functions with "omp declare simd"
attribute which will be defined in the current partition, for functions
defined in other partitions all it wants to do is just clone the
DECL_EXTERNAL FUNCTION_DECL.  But it needs to be called before any
caller's of that function (whether extern/in another partition, or local
(defined in the current partition) will run through vectorization.

	Jakub


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