Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[asmwriter] Asmwriter is really slow for functions with lots of values #794

Closed
lattner opened this issue Aug 15, 2004 · 2 comments
Closed

Comments

@lattner
Copy link
Collaborator

lattner commented Aug 15, 2004

Bugzilla Link 422
Resolution FIXED
Resolved on Feb 22, 2010 12:52
Version 1.3
OS All
Attachments testcase that is really slow

Extended Description

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

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 16, 2004

Mine. Confirmed. I'll look at it this week, its kinda complicated :)

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 16, 2004

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)

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants