[PATCH] Move StructurizeCFG out of R600 to generic Transforms

Christian König deathsimple at vodafone.de
Thu Jun 6 00:30:21 PDT 2013


Am 05.06.2013 22:49, schrieb Owen Anderson:
> On Jun 5, 2013, at 11:01 AM, Christian König <deathsimple at vodafone.de> wrote:
>
>> Am 03.06.2013 18:56, schrieb Owen Anderson:
>>> On Jun 2, 2013, at 3:47 AM, Christian König <deathsimple at vodafone.de> wrote:
>>>
>>>> Hi Matt,
>>>>
>>>> in general looks like a good idea to me.
>>>>
>>>> The NearestCommonDominator class should get their own source file. It actually implements an algorithm ontop of the dominator tree that might actually be useful outside of the structurizer.
>>> Why is this needed?  DominatorTree already has a findNearestCommonDominator method.
>> The findNearestCommonDominator method only searches the common dominator of two nodes, while this class (based on a slightly modified algorithm) efficiently finds the common dominator of N nodes.
> OK, I see how it can be more efficient by maintaining the IDom tree for the "accumulator" side of the merge.  Do you think it would be reasonable to move this into the DomTreeBase class itself?  That would allow it to be used on MachineCFG's as well.

Yes that code should probably be more abstracted and moved to/in the 
DomTree classes. Initially I just used the existing 
findNearestCommonDominator method, but found that this is a bottleneck 
for our use case, so I created the NearestCommonDominator class as a 
specific solution for our problem.

Moving and generalizing this functionality out of the target specific 
code should probably be a step on it's own.

Christian.

> --owen




More information about the llvm-commits mailing list