On Thu, Dec 18, 2014 at 05:00:01PM +0000, Jiong Wang wrote: > On 17/12/14 15:54, Richard Biener wrote: > >ick. I realize we don't have SSA form on RTL but doesn't DF provide > >at least some help in looking up definition statements for pseudos? > >In fact we want to restrict the transform to single-use pseudos, thus > >hopefully it can at least tell us that... (maybe not and this is what > >LOG_LINKS are for in combine...?) At least loop-invariant alreadly > >computes df_chain with DF_UD_CHAIN which seems exactly what > >is needed (apart from maybe getting at single-use info). > > thanks very much for these inspiring questions. > > yes, we want to restrict the transformation on single-use pseudo only, > and it's better the transformation could re-use existed info and helper > function to avoid increase compile time. but I haven't found anything I > can reuse at the stage the transformation happen. > > the info similar as LOG_LINKS is what I want, but maybe simpler. I'd study > the code about build LOG_LINKS, and try to see if we can do some factor out.
LOG_LINKs in combine are just historical. combine should be converted to use DF fully. LOG_LINKs have nothing to do with single use; they point from the _first_ use to its corresponding def. You might want to look at what fwprop does instead. Segher