Thanks! That works!
Richard Biener <richard.guent...@gmail.com> 于2023年9月18日周一 15:56写道: > > On Mon, Sep 18, 2023 at 9:17 AM Hanke Zhang via Gcc <gcc@gcc.gnu.org> wrote: > > > > Hi, I am currently developing a new pass in the late_ipa_passes phase, > > located behind the pass_ipa_pta and in front of the > > pass_omp_simd_clone. I now hope that after the pass I developed, the > > code can be vectorized, that is, the code that can be vectorized > > during the pass_omp_simd_clone. > > > > But not yet, I'm guessing that maybe it's because I added some dead > > code during the pass I developed, so I want to be followed by a DCE > > pass right after my pass, hoping that this will allow > > pass_omp_simd_clone to vectorize the code after my pass. > > > > But I've found that adding NEXT_PASS(pass_dce) directly after my pass > > results in a runtime error, so I would like to ask if there is any > > good way to get pass_dce to work in the late_ipa_passes phase? > > You could try doing > > NEXT_PASS (pass_your_ipa_pass) > PUSH_INSERT_PASSES_WITHIN (pass_your_ipa_pass) > NEXT_PASS (pass_dce); > POP_INSERT_PASES () > NEXT_PASS (pass_omp_simd_clone) > > > > Hanke Zhang.