diff options
author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-05-10 14:01:21 +0000 |
---|---|---|
committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-05-10 14:01:21 +0000 |
commit | ede4ecaefb087126a68a5380ec60e107fe8cc022 (patch) | |
tree | 811ab3dc192849aaa0f65ae2e548d1563fb5a537 /polly/lib/Analysis/ScopInfo.cpp | |
parent | 2b92a0e4ee7c9e1429f5b63b242295055fb95d4b (diff) | |
download | bcm5719-llvm-ede4ecaefb087126a68a5380ec60e107fe8cc022.tar.gz bcm5719-llvm-ede4ecaefb087126a68a5380ec60e107fe8cc022.zip |
[FIX] Cleanup isl objects prior to early exit
llvm-svn: 269061
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 96c4ed90d60..38d402f10b4 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -1301,12 +1301,15 @@ buildConditionSets(ScopStmt &Stmt, Value *Condition, TerminatorInst *TI, auto Opcode = BinOp->getOpcode(); assert(Opcode == Instruction::And || Opcode == Instruction::Or); - if (!buildConditionSets(Stmt, BinOp->getOperand(0), TI, L, Domain, - ConditionSets)) - return false; - if (!buildConditionSets(Stmt, BinOp->getOperand(1), TI, L, Domain, - ConditionSets)) + bool Valid = buildConditionSets(Stmt, BinOp->getOperand(0), TI, L, Domain, + ConditionSets) && + buildConditionSets(Stmt, BinOp->getOperand(1), TI, L, Domain, + ConditionSets); + if (!Valid) { + while (!ConditionSets.empty()) + isl_set_free(ConditionSets.pop_back_val()); return false; + } isl_set_free(ConditionSets.pop_back_val()); isl_set *ConsCondPart0 = ConditionSets.pop_back_val(); |