It looks like one of the changes to the asmwriter made it recompute the slotmachine for every value that needs a slot number. If that is ALL values, we spend lots of time computing SlotTable objects, only to throw them away. The AsmWriter used to create the slot table once and use it. The fact that it does not anymore is a major regression from LLVM 1.2. I'm attaching a testcase (from Marek Materzok) that takes minutes to disassemble. -Chris
Created attachment 166 [details] testcase that is really slow
Mine. Confirmed. I'll look at it this week, its kinda complicated :)
Turns out it wasn't all that complicated. The patch below corrects the problem. Not sure how this slipped through the cracks but thanks go to Marek for finding this and providing a test case. http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040816/017195.html Patch passes 100% of Feature and Regression tests. Test Results: /usr/bin/time llvm-dis slow.bc -f 0.53user 0.01system 0:00.54elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (770major+767minor)pagefaults 0swaps (slow.bc is the test case attached to this report)