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

livevars takes 50% of codegen time (N^2 algorithm?) #1301

Closed
lattner opened this issue Sep 28, 2006 · 6 comments
Closed

livevars takes 50% of codegen time (N^2 algorithm?) #1301

lattner opened this issue Sep 28, 2006 · 6 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:codegen slow-compile

Comments

@lattner
Copy link
Collaborator

lattner commented Sep 28, 2006

Bugzilla Link 929
Resolution FIXED
Resolved on Feb 22, 2010 12:44
Version 1.8
OS All

Extended Description

Livevars takes 50% of the compile time on the testcase in #1250 (now that Bill fixed the issue in phielim).
Livevars is probably doing something algorithmically wrong, which should be investigated.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Sep 28, 2006

assigned to @isanbard

@isanbard
Copy link
Contributor

isanbard commented Oct 3, 2006

This problem is similar to #1250 . It's looping through the PHI nodes of the successors of a block again.

@lattner
Copy link
Collaborator Author

lattner commented Oct 3, 2006

w00t. The best thing about being stupid is that there are so many places to be stupid in :) Thanks for
looking into this Bill!

-Chris

@isanbard
Copy link
Contributor

isanbard commented Oct 3, 2006

LOL. I know all too well about that. ;-)

No problem checking this out. I'm testing a potential patch right now.

-bw

@isanbard
Copy link
Contributor

isanbard commented Oct 3, 2006

Fixed:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061002/038239.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061002/038238.html

Before:

$ llvm.obj/Debug/bin/llc interpret.bc -time-passes -f -fast
===-------------------------------------------------------------------------===
... Pass execution timing report ...
===-------------------------------------------------------------------------===
Total Execution Time: 81.9564 seconds (150.8072 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
37.2380 ( 46.0%) 0.4395 ( 40.1%) 37.6775 ( 45.9%) 78.9992 ( 52.3%) Live Variable Analysis
7.1519 ( 8.8%) 0.2003 ( 18.3%) 7.3523 ( 8.9%) 20.3752 ( 13.5%) X86 DAG->DAG Instruction
Selection
9.9280 ( 12.2%) 0.2185 ( 19.9%) 10.1466 ( 12.3%) 18.4788 ( 12.2%) Eliminate PHI nodes for
register allocation

After:

llvm.obj/Debug/bin/llc interpret.bc -time-passes -f -fast
===-------------------------------------------------------------------------===
... Pass execution timing report ...
===-------------------------------------------------------------------------===
Total Execution Time: 46.5941 seconds (78.4110 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
14.2680 ( 31.1%) 0.1674 ( 19.7%) 14.4354 ( 30.9%) 23.9314 ( 30.5%) Linear Scan Register Allocator
10.0606 ( 21.9%) 0.2507 ( 29.5%) 10.3114 ( 22.1%) 17.3218 ( 22.0%) Eliminate PHI nodes for
register allocation
9.8416 ( 21.5%) 0.1711 ( 20.1%) 10.0128 ( 21.4%) 16.7627 ( 21.3%) Live Interval Analysis

@isanbard
Copy link
Contributor

isanbard commented Oct 3, 2006

It would be nice to show the actual total runtime for LVA :-)

llvm.obj/Debug/bin/llc interpret.bc -time-passes -f -fast
===-------------------------------------------------------------------------===
... Pass execution timing report ...
===-------------------------------------------------------------------------===
Total Execution Time: 46.5941 seconds (78.4110 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
...
7.1271 ( 15.5%) 0.1849 ( 21.7%) 7.3121 ( 15.6%) 12.6530 ( 16.1%) X86 DAG->DAG Instruction
Selection
1.5604 ( 3.4%) 0.0256 ( 3.0%) 1.5860 ( 3.4%) 2.6984 ( 3.4%) Live Variable Analysis

@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
Labels
bugzilla Issues migrated from bugzilla llvm:codegen slow-compile
Projects
None yet
Development

No branches or pull requests

2 participants