[PATCH] Move StructurizeCFG out of R600 to generic Transforms
Owen Anderson
resistor at mac.com
Wed Jun 5 13:49:53 PDT 2013
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.
--owen
More information about the llvm-commits
mailing list