First Last Prev Next    No search results available
Details
: [ipsccp] Sparse conditional IP constant propagation
Bug#: 415
: libraries
: Interprocedural Optimizations
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: enhancement
: 1.5

:
: new-feature
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Chris Lattner <sabre@nondot.org>
:

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-08-04 15:12
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
------- Comment #1 From Chris Lattner 2004-09-08 11:21:14 -------
There are some notes for this bug here:
http://nondot.org/sabre/LLVMNotes/IP-SCCP.txt

-Chris
------- Comment #2 From Chris Lattner 2004-11-10 01:10:01 -------
Here's a trivial testcase this should handle:

implementation   ; Functions:

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

void %bar() {
        call int %foo( int 17 )         ; <int>: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
------- Comment #3 From Chris Lattner 2004-11-10 13:44:24 -------
ok, another note.  Simple IPCP now handles the simple case above.
------- Comment #4 From Chris Lattner 2004-12-10 02:04:54 -------
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
------- Comment #5 From Chris Lattner 2004-12-11 00:09:15 -------
This is now implemented, named -ipsccp.

-Chris

First Last Prev Next    No search results available