The instruction list is ignored for region statements, there
is no reason to set it.
llvm-svn: 309196
/// Set the list of instructions for this statement. It replaces the current
/// list.
void setInstructions(ArrayRef<Instruction *> Range) {
+ assert(isBlockStmt() &&
+ "The instruction list only matters for block-statements");
Instructions.assign(Range.begin(), Range.end());
}
// Remove all non-reachable instructions.
for (ScopStmt &Stmt : *S) {
+ if (!Stmt.isBlockStmt())
+ continue;
+
SmallVector<Instruction *, 32> AllInsts(Stmt.insts_begin(),
Stmt.insts_end());
SmallVector<Instruction *, 32> RemainInsts;