[llvm] r277614 - [CloneFunction] Don't crash if the value map doesn't hold something
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 11:25:03 PDT 2016
On Wed, Aug 3, 2016 at 11:23 AM, Bruno Cardoso Lopes <
bruno.cardoso at gmail.com> wrote:
> Hi David,
>
> I don't know if this is supposed to fix the same issue in
> http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/23319,
> but looks like r277611 is still the culprit here.
>
> Our internal bots reproduce the same issue and there are only two
> commit in the range, r277611 and r277610, but r277610 seems unlikely.
>
I am not sure what is wrong yet but am working on a reduction. Feel free
to revert if this is in your way.
>
> Thanks,
>
> On Wed, Aug 3, 2016 at 10:37 AM, David Majnemer via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: majnemer
> > Date: Wed Aug 3 12:37:10 2016
> > New Revision: 277614
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=277614&view=rev
> > Log:
> > [CloneFunction] Don't crash if the value map doesn't hold something
> >
> > It is possible for the value map to not have an entry for some value
> > that has already been removed.
> >
> > I don't have a testcase, this is fall-out from a buildbot.
> >
> > Modified:
> > llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
> >
> > Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=277614&r1=277613&r2=277614&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Wed Aug 3
> 12:37:10 2016
> > @@ -562,7 +562,7 @@ void llvm::CloneAndPruneIntoFromInst(Fun
> > // Note that we must test the size on each iteration, the worklist
> can grow.
> > for (unsigned Idx = 0; Idx != Worklist.size(); ++Idx) {
> > const Value *OrigV = Worklist[Idx];
> > - auto *I = cast<Instruction>(VMap.lookup(OrigV));
> > + auto *I = cast_or_null<Instruction>(VMap.lookup(OrigV));
> > if (!I)
> > continue;
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
> --
> Bruno Cardoso Lopes
> http://www.brunocardoso.cc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160803/21ffb591/attachment.html>
More information about the llvm-commits
mailing list