On Sep 19, 2008, at 4:03 PM, David Greene wrote:>> Well, one of the domiantor info interface is >> bool dominates(Instruction *A, Instruction *B); >> This will return invalid results. So yes, the info is dirty. > > Not right now it isn't. Right now dominators simply iterates through > instructions.Aha... OK.> In my proposed scheme, it would be dirty only in the sense that > the numbering is dirty. As soon as the numbering is updated, > dominator > information is up-to-date. > >>> If the whole dominator information is recalculated when only >>> Instructions are manipulated, that's rather wasteful. >> >> This is a question of how to update and maintain dom info. properly. >> The pass that is modifying instructions should update "number" >> appropriately in your scheme. Many loop passes goes through a length >> to maintain dominator info. > > No way I'm going to go through every Pass, check if it manipulates > instructions, and update the numbering info if it does. I'd rather > have > dominators check whenther numbering is up-to-date and update the > numbering > itself if it's not, on-the-fly.Well, then pass manager is not involved here at all in your scheme. - Devang
On Friday 19 September 2008 18:16, Devang Patel wrote:> > No way I'm going to go through every Pass, check if it manipulates > > instructions, and update the numbering info if it does. I'd rather > > have > > dominators check whenther numbering is up-to-date and update the > > numbering > > itself if it's not, on-the-fly. > > Well, then pass manager is not involved here at all in your scheme.But PassManager should be able to tell me whether the numbering is up-to-date if the numbering is itself an analysis pass. I just don't know if there's an API to that information yet. -Dave
On Sep 19, 2008, at 4:29 PM, David Greene wrote:> On Friday 19 September 2008 18:16, Devang Patel wrote: > >>> No way I'm going to go through every Pass, check if it manipulates >>> instructions, and update the numbering info if it does. I'd rather >>> have >>> dominators check whenther numbering is up-to-date and update the >>> numbering >>> itself if it's not, on-the-fly. >> >> Well, then pass manager is not involved here at all in your scheme. > > But PassManager should be able to tell me whether the numbering is > up-to-date > if the numbering is itself an analysis pass. I just don't know if > there's an > API to that information yet.Right now, pass manager does not provide such API. Note, pass manager does not dynamically schedule passes. - Devang