LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 967 - [predsimplify] release run works fine, debug run goes crazy
Summary: [predsimplify] release run works fine, debug run goes crazy
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Scalar Optimizations (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2006-10-25 16:36 PDT by Chris Lattner
Modified: 2010-02-22 12:47 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
bc file (25.56 KB, application/octet-stream)
2006-10-25 16:36 PDT, Chris Lattner
Details
updated to current bytecode format (31.28 KB, application/octet-stream)
2007-01-10 23:16 PST, Nick Lewycky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2006-10-25 16:36:01 PDT
This is a nasty bug that points to some memory corruption issue or something.

time ~/llvm/Release/bin/opt -predsimplify -disable-output bugpoint-reduced-simplified.bc 
0.055u 0.009s 0:00.06 83.3%     0+0k 0+1io 0pf+0w

time ~/llvm/Debug/bin/opt -predsimplify -disable-output bugpoint-reduced-simplified.bc 
<forever>

Note that the .bc *does* have a large nasty cfg, but it is strange that this issue should only affect a 
debug opt and not a release opt.  This points to some memory clobbering, or deleting something, but 
not removing it from a map or something (i.e. it's address is still the key or value of some map).

I'm disabling predsimplify in llvm-gcc until this is resolved, this breaks debug bootstraps on both ppc 
and x86.

-Chris
Comment 1 Chris Lattner 2006-10-25 16:36:31 PDT
Created attachment 422 [details]
bc file
Comment 2 Reid Spencer 2006-10-25 17:06:51 PDT
Could it be a wonky assert?

Did you try Release+Asserts build?

Reid.
Comment 3 Chris Lattner 2006-10-25 17:21:15 PDT
entirely possible.  No I didn't try.
Comment 4 Nick Lewycky 2006-10-26 18:45:30 PDT
I tried the testcase under valgrind and it didn't show any memory errors. That
said, I haven't been able to reproduce this yet on x86/linux.
Comment 5 Reid Spencer 2006-11-11 19:50:23 PST
Given that predsimplify is being rewritten, the problem doesn't reproduce on
Linux and this hasn't shown up recently, can we just close this WONTFIX ?
Comment 6 Chris Lattner 2006-11-11 19:59:46 PST
Perhaps when predsimplify is rewritten.  Until then, we can't verify it.

-Chris
Comment 7 Nick Lewycky 2007-01-10 23:16:03 PST
Created attachment 556 [details]
updated to current bytecode format

I was never able to reproduce the original bug, but this does seem to expose
poor performance, possibly due to debugging code. I'm seeing large numbers of
nodes with a lot of interconnections, probably constants. This isn't
surprising, as the constant code is full of fixme's at the moment.
Comment 8 Nick Lewycky 2007-04-08 10:19:55 PDT
This is done.