[polly] r246161 - Do not detect Scops with only one loop.
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 05:10:29 PDT 2015
On 08/28/2015 02:26 PM, Tobias Grosser wrote:
> On 08/28/2015 02:15 PM, Johannes Doerfert wrote:
>> On 08/28, Tobias Grosser wrote:
>>>>> What about the following:
>>>>>
>>>>> Algorithm:
>>>>>
>>>>> loopNum = 0;
>>>>>
>>>>> entryNodeLoop = LI->getLoopFor(R->getEntry)
>>>>>
>>>>> if loop in R
>>>>> children = loop->getParent()->children
>>>>> else if loop not in R:
>>>>> children = loop->children
>>>>> else // no loop at all
>>>>> children = LI->getoutermostloops
>>>>>
>>>>> for child in children
>>>>> if (R->contains(child)) {
>>>>> loopNum++;
>>>>> if (child->subloops > 0)
>>>>> loopNum++;
>>>>>
>>>>> if (loopNum >= 2)
>>>>> return true;
>>>>> }
>>>>> return false;
The above fix has been applied in r246433.
Best,
Tobias
More information about the llvm-commits
mailing list