[PATCH] D63155: [clang][NewPM] Fix broken profile test

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 17:00:41 PDT 2019


they are not doing the exacly the same thing for old pass manager and new
pass manger: old pass manger is doing instrumentation, while the new pass
manager with this change is NOT.
the test is not check instrumentation, (it only check the variables that
generates by InstroProfiling pass).
In this sense, the test is not well written.

I can draft a patch for this.

On Fri, Jun 28, 2019 at 4:53 PM Chandler Carruth via Phabricator <
reviews at reviews.llvm.org> wrote:

> chandlerc added a comment.
>
> In D63155#1563229 <https://reviews.llvm.org/D63155#1563229>, @xur wrote:
>
> > This patch does not make sense to me.
> >
> > The reason of failing with -fexperimental-new-pass-manager is because we
> don't do PGO instrumentation at -O0. This is due to the fact that PGO
> instrumentation/use passes are under
> PassBuilder::buildPerModuleDefaultPipeline.
> >
> > This patch add a pass
> >
> >   MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));
> >
> > which only gives you the wrong signal  of instrumentation is done.
> >
> > I wrote pass PGOInstrumentationGenCreateVar only for some trick
> interactions for thinlto under ldd for CSPGO.
> >  Regular FDO should not use it.
> >
> > The right fix is to enable PGO instrumentation and use in pass builder
> for O0.
> >
> > I would like to request to revert this patch.
>
>
> I mean, I'm happy for the patch to be reverted, but I still really don't
> understand why this fixes the test to work *exactly* the same as w/ the old
> pass manager and doesn't break any other tests if it is completely wrong?
> It seems like there must be something strange with the test coverage if
> this is so far off of correct without any failures...
>
> I also don't understand what fix you are suggesting instead, but maybe you
> can show a patch?
>
>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D63155/new/
>
> https://reviews.llvm.org/D63155
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190628/13492e34/attachment.html>


More information about the llvm-commits mailing list