[llvm] r305245 - Inliner: Don't remove calls to readnone+nounwind (but not always_inline) functions in the AlwaysInliner
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 17 14:59:48 PDT 2017
I think I tried to fix this once but the review stalled for lack of test
case.
On Sat, Jun 17, 2017 at 1:24 PM Sanjoy Das via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Hi,
>
> On Fri, Jun 16, 2017 at 8:47 AM, Björn Pettersson A via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > What I noticed was that AddReachableCodeToWorklist (in
> > InstructionCombining.cpp) does not always set MadeIRChange = true even if
> > optimisations are done.
> >
> > This happens at least for the
> >
> > // DCE instruction if trivially dead.
> >
> > and the
> >
> > // ConstantProp instruction if trivially constant.
> >
> > optimisations.
> >
> > If I add
> >
> > MadeIRChange = true;
> >
> > when doing those optimisations, then the CGPassManager will set
> > CallGraphUpToDate = false, and later refresh the CallGraph if needed
> again.
> >
> > So with such a modification to AddReachableCodeToWorklist we no longer
> get
> > the assert.
> >
> > I can prepare a patch for this next week if it sounds reasonable (and no
> one
> > else is faster than me… my work week has actually ended already..).
>
> Yes, it sounds like you're on the right track -- changing the IR and
> pretending that the IR was not changed is definitely a bug in
> InstCombine.
>
> Thanks!
> -- Sanjoy
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
--
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170617/2c3a205e/attachment.html>
More information about the llvm-commits
mailing list