[LLVMdev] weird issue with mem2reg

Misha Brukman brukman at uiuc.edu
Wed Jun 23 15:58:01 PDT 2004


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




More information about the llvm-dev mailing list