[Beignet] [PATCH] add the reduced self loop node detection.
xionghu.luo at intel.com
xionghu.luo at intel.com
Tue Nov 18 19:36:16 PST 2014
From: Luo Xionghu <xionghu.luo at intel.com>
if the self loop node is reduced, the llvm loop info couldn't detect
such kind of self loops, handle it by checking whether the compacted
node has a successor pointed to itself.
Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
backend/src/ir/structural_analysis.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/backend/src/ir/structural_analysis.cpp b/backend/src/ir/structural_analysis.cpp
index 21c04f3..a9d21ce 100644
--- a/backend/src/ir/structural_analysis.cpp
+++ b/backend/src/ir/structural_analysis.cpp
@@ -1038,6 +1038,15 @@ namespace analysis
}
}
+ if(reachUnder.size() == 0 )
+ {
+ if(n->succs().find(n) != n->succs().end())
+ {
+ reachUnder.push_front(n);
+ nset.insert(n);
+ }
+ }
+
region = cyclicRegionType(n, reachUnder);
if(NULL != region)
--
1.7.9.5
More information about the Beignet
mailing list