LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 217 - LLVM needs a generic update SSA mechanism
Summary: LLVM needs a generic update SSA mechanism
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Global Analyses (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords: quality-of-implementation
Depends on:
Blocks:
 
Reported: 2004-01-31 20:02 PST by Chris Lattner
Modified: 2009-10-10 21:09 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments
it compiles, but i've never run it. (4.92 KB, patch)
2006-09-14 22:35 PDT, Nick Lewycky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2004-01-31 20:02:40 PST
Certain transformations, like tail-duplication (Bug 174) and the correlated
expression elimination pass, fundamentally need to make arbitrary changes to the
CFG _AND_ update the SSA form of expressions.  To do this, they need to _update_
dominators and dominator frontiers as they change the CFG.

Basically the dominator information passes need an 'addEdge/removeEdge'
interface that clients can use to incrementally update the dominator
information.  There is a paper that describes how to do this:

http://citeseer.nj.nec.com/sreedhar94efficient.html

... someone should implement it.

Given this functionality, many other transformations would also be able to
incrementally update dominator information, instead of recalculating it, which
would speed up the optimizer as well.

-Chris
Comment 1 Chris Lattner 2004-02-26 15:31:25 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 2 Chris Lattner 2004-02-26 15:31:53 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 3 Chris Lattner 2004-02-26 15:34:55 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 4 Chris Lattner 2004-02-26 15:35:29 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 5 Nick Lewycky 2006-09-14 22:33:55 PDT
I would also like this for my pass in PR807.

Unfortunately, my compiler theory is no match for this paper. What does it mean
on page 14:
"2. PseudoAffected: This set consists of any /proper/ descendant of a
*PossiblyAffected* node." Assuming that I have the list of PossiblyAffected
nodes, what are the proper descendants? Every node in the sub-tree?
Comment 6 Nick Lewycky 2006-09-14 22:35:31 PDT
Created attachment 390 [details]
it compiles, but i've never run it.

I tried to implement it and this is as far as I got.
Comment 7 Owen Anderson 2007-04-11 15:38:57 PDT
Nick,

If you're still interested in this, there's an expanded/clearer version of the
paper at:

http://citeseer.ist.psu.edu/sreedhar95incremental.html

Otherwise, I might tackle this next time I need something to do.

--Owen
Comment 8 Chris Lattner 2007-04-15 16:50:32 PDT
Step #1 complete: Owen removed idom.
Comment 10 Owen Anderson 2009-10-10 18:16:25 PDT
Chris, I don't think that solves _all_ of what this bug asks for.  We're still lacking a generc dominato r update function.  
Comment 11 Chris Lattner 2009-10-10 18:17:30 PDT
As originator of the bug, I know what it was about.  :)  Updating domtree wasn't the point, that was seen as a way to get to SSA updates.
Comment 12 Owen Anderson 2009-10-10 20:30:38 PDT
Would it be worthwhile to split dominator updates into a new PR?  It still seems like a useful feature.
Comment 13 Chris Lattner 2009-10-10 21:09:59 PDT
Why?  If it existed, we still wouldn't use it in the standard optimizer (too slow).  Lets wait until there is an actual reason to have it.