[polly] r332775 - [SCEVAffinator] BB can be null; don't use it to get the LLVMContext.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 14:57:44 PDT 2018


Author: efriedma
Date: Fri May 18 14:57:44 2018
New Revision: 332775

URL: http://llvm.org/viewvc/llvm-project?rev=332775&view=rev
Log:
[SCEVAffinator] BB can be null; don't use it to get the LLVMContext.

Fixes post-commit review comment on r332309.


Modified:
    polly/trunk/lib/Support/SCEVAffinator.cpp

Modified: polly/trunk/lib/Support/SCEVAffinator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/SCEVAffinator.cpp?rev=332775&r1=332774&r2=332775&view=diff
==============================================================================
--- polly/trunk/lib/Support/SCEVAffinator.cpp (original)
+++ polly/trunk/lib/Support/SCEVAffinator.cpp Fri May 18 14:57:44 2018
@@ -538,5 +538,5 @@ PWACtx SCEVAffinator::complexityBailout(
   // 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())));
+  return visit(SE.getZero(Type::getInt32Ty(S->getFunction().getContext())));
 }




More information about the llvm-commits mailing list