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 07:48:34PM +0100, Jan Hubicka wrote:
> > > isn't exactly enabled by default ;)
> > 
> > OK :))
> > > 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.
> > 
> > Yep, we will need to add an interface for late passes that needs to look
> > only into specific bodies. (in fact, I already added cgraph_get_body
> > and perhaps I can just integrate IPA transformation into that and make late IPA passes
> > to use them)
> 
> Note that while the late IPA pass for simd clones is enabled say for
> -fopenmp, even if it needed the bodies that wouldn't be in current
> partition, it wants to look only at a fraction of all functions, so loading
> the bodies just in case for everything would be tons of unnecessary work.

Indeed.
> If IPA-PTA needs bodies of everything always, perhaps it could call
> cgraph_get_body at the beginning of handling each function?

Well, ipa-pta is mostlly off, so I did not care about it (yet).  I will need to
re-arrange the way IPA transforms are executed - currently cgraph_get_body only
loads the body. The actual transformations are executed by pass manager either
before first simple IPA pass on all function bodies (this path we go only with
-fipa-pta for now) or before first local pass on the current body (this is what
happens by default).  Because funtion bodies are removed after compiling, we don't
really load whole partition at once this way.

Getting cgraph_get_body to do the right thing is not terribly difficult, but it
will need a bit of cooperation with the way inliner is hooked into it.  I can
do it next week quite easilly.  Given that debug info is major memory sink
of ltrans (with -g), this is not that critical for 4.9, so perhaps it can also wait for
next stage1.

Honza
> 
> 	Jakub


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