[ScopInfo] Fix isl object leak.

Fix return from function without releasing isl objects, which was introduced
in r269055.

llvm-svn: 285924
This commit is contained in:
Michael Kruse
2016-11-03 15:19:41 +00:00
parent 43556c14fe
commit e1dc387731

View File

@@ -2798,8 +2798,11 @@ bool Scop::addLoopBoundsToHeaderDomain(Loop *L, LoopInfo &LI) {
SmallVector<isl_set *, 8> ConditionSets;
int idx = BI->getSuccessor(0) != HeaderBB;
if (!buildConditionSets(*getStmtFor(LatchBB), TI, L, LatchBBDom,
ConditionSets))
ConditionSets)) {
isl_map_free(NextIterationMap);
isl_set_free(UnionBackedgeCondition);
return false;
}
// Free the non back edge condition set as we do not need it.
isl_set_free(ConditionSets[1 - idx]);