Hi Jakub: I saw the omp and oacc related passes are in the head of all_passes, so I plan added after pass_omp_target_link, does it late enough?
diff --git a/gcc/passes.def b/gcc/passes.def index 2bf2cb78fc5..92cbe587a8a 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -183,6 +183,7 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_oacc_device_lower); NEXT_PASS (pass_omp_device_lower); NEXT_PASS (pass_omp_target_link); + NEXT_PASS (pass_adjust_alignment); NEXT_PASS (pass_all_optimizations); PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations) NEXT_PASS (pass_remove_cgraph_callee_edges); Thanks :) On Sat, Mar 28, 2020 at 2:27 AM Jakub Jelinek <ja...@redhat.com> wrote: > > On Sat, Mar 28, 2020 at 02:06:56AM +0800, Kito Cheng wrote: > > PR target/90811 > > * ipa-increase-alignment.cc (increase_alignment_local_var): New. > > (increase_alignment_global_var): New. > > (pass_ipa_increase_alignment::gate): Remove. > > I'm afraid this is too early, pass_ipa_increase_alignment is part of > all_small_ipa_passes list, those are run before the LTO streaming. > See cgraphunit.c (ipa_passes). > For OpenMP/OpenACC offloading, this has to run after the streaming, > which means either a pass in the all_regular_ipa_passes list, or much better > (I don't see any advantage of this being an IPA pass) some new pass that is > run very early in the all_passes list. > > At which point I don't really see the benefit of moving this into a new file > either. > > Jakub >