Navigation Menu

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

[ipsccp] Sparse conditional IP constant propagation #787

Closed
lattner opened this issue Aug 4, 2004 · 6 comments
Closed

[ipsccp] Sparse conditional IP constant propagation #787

lattner opened this issue Aug 4, 2004 · 6 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature ipo Interprocedural optimizations

Comments

@lattner
Copy link
Collaborator

lattner commented Aug 4, 2004

Bugzilla Link 415
Resolution FIXED
Resolved on Feb 22, 2010 12:47
Version 1.0
OS All

Extended Description

Brian pointed out that the Olden/mst benchmark has code that basically looks
like this:

main() {
Do_all_BlueRule(..., 1, 0);
}

void Do_all_BlueRule(..., int nproc, int pn) {
if (nproc > 1) {
Do_all_BlueRule(nproc/2, nproc/2+pn);
... A BUNCH OF OTHER STUFF ...
}

bar();
}

The observation is that Do_all_BlueRule contains a bunch of code that is
dynamically dead, but it requires a smarter IPCP algorithm to notice it (the
unreachable recursive call causes us to miss this).

It seems like an aggressive IPCP coupled with SCCP'y techniques could solve this
pretty easily.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Aug 4, 2004

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Sep 8, 2004

There are some notes for this bug here:
http://nondot.org/sabre/LLVMNotes/IP-SCCP.txt

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Nov 10, 2004

Here's a trivial testcase this should handle:

implementation ; Functions:

internal int %foo(int %X) {
%Y = call int %foo( int %X ) ; [#uses=1]
%Z = add int %Y, 1 ; [#uses=1]
ret int %Z
}

void %bar() {
call int %foo( int 17 ) ; :0 [#uses=0]
ret void
}

IPCP should realize that %X is always '17'. The current, simple IPCP, should
detect and handle this too. I wish it already did, it would help pool
allocation. :(

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Nov 10, 2004

ok, another note. Simple IPCP now handles the simple case above.

@lattner
Copy link
Collaborator Author

lattner commented Dec 10, 2004

Initial implementation:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/022044.html

There is more to come for this PR, stay tuned!

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Dec 11, 2004

This is now implemented, named -ipsccp.

-Chris

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new-feature labels Aug 15, 2023
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 enhancement Improving things as opposed to bug fixing, e.g. new or missing feature ipo Interprocedural optimizations
Projects
None yet
Development

No branches or pull requests

2 participants