> 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 ;)
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) Honza > > Jakub