#define DEBUG_TYPE "polly-scop-helper"
+static cl::opt<bool> PollyAllowErrorBlocks(
+ "polly-allow-error-blocks",
+ cl::desc("Allow to speculate on the execution of 'error blocks'."),
+ cl::Hidden, cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory));
+
bool polly::hasInvokeEdge(const PHINode *PN) {
for (unsigned i = 0, e = PN->getNumIncomingValues(); i < e; ++i)
if (InvokeInst *II = dyn_cast<InvokeInst>(PN->getIncomingValue(i)))
bool polly::isErrorBlock(BasicBlock &BB, const Region &R, LoopInfo &LI,
const DominatorTree &DT) {
+ if (!PollyAllowErrorBlocks)
+ return false;
if (isa<UnreachableInst>(BB.getTerminator()))
return true;