[polly] r332309 - [SCEVAffinator] Fix handling of pwaff complexity limit.

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 11:27:14 PDT 2018


On 5/17/2018 9:08 AM, Michael Kruse wrote:
> 2018-05-14 18:05 GMT-05:00 Eli Friedman via llvm-commits
> <llvm-commits at lists.llvm.org>:
>> +PWACtx SCEVAffinator::complexityBailout() {
>> +  // We hit the complexity limit for affine expressions; invalidate the scop
>> +  // and return a constant zero.
>> +  const DebugLoc &Loc = BB ? BB->getTerminator()->getDebugLoc() : DebugLoc();
>> +  S->invalidate(COMPLEXITY, Loc);
>> +  return visit(SE.getZero(Type::getInt32Ty(BB->getContext())));
> Coverity warns about this line. There is an explicit null-check two
> for BB two lines above, but here it gets dereferences unconditionally.
> Can BB ever be NULL?

Yes, it can be null, I think; I'll fix it.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-commits mailing list