[LLVMdev] weird issue with mem2reg, should have guessed
Patrick Meredith
pmeredit at uiuc.edu
Wed Jun 23 16:10:02 PDT 2004
What's different about code that's been mem2reg'd from straight front end
code, or anything that mem2reg hasn't been run on? PHINODES! It appears to
be crashing when I try to cast a Value* that's really a BB* (from the
PHInode operands) to a User*, insteresting since I am dyn_casting. I just
caught this on cerr though (printing out what the Value* was each time).
Let me check bugpoint.
----- Original Message -----
From: "Misha Brukman" <brukman at uiuc.edu>
To: <llvmdev at cs.uiuc.edu>
Sent: Wednesday, June 23, 2004 3:56 PM
Subject: Re: [LLVMdev] weird issue with mem2reg
> On Wed, Jun 23, 2004 at 03:50:09PM -0500, Patrick Meredith wrote:
> > MetaSplit is an anlysis I just finished writing. It doesn't alter
> > anything, all it does is build a set of "program instructions". For
> > some reason even though if I run it with any other combination of
> > passes I've found, anytime I run it with mem2reg I get a seg fault in
> > dyn_cast! Here's output:
>
> Since the crash is after your code is entered, the problem is probably
> not in mem2reg, but in your pass. To see if that's the case, you can do
> this:
>
> % opt -mem2reg < orig.bc > m2r.bc
> % opt -load=... -metasplit < m2r.bc > output.bc
>
> And see if it crashes in mem2reg or in your pass. To narrow your
> testcase down further, we recommend the use of bugpoint, the automatic
> test case reducer:
>
> http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html
>
> In this case, this should work:
>
> % bugpoint -load=... -mem2reg -metasplit orig.bc
>
> --
> Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list