It's not needed here since there is no recursive access to BBs. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- sparse-llvm.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sparse-llvm.c b/sparse-llvm.c index e35ac01a2..4fc5777c7 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -1024,12 +1024,10 @@ static void output_insn(struct function *fn, struct instruction *insn) } } -static void output_bb(struct function *fn, struct basic_block *bb, unsigned long generation) +static void output_bb(struct function *fn, struct basic_block *bb) { struct instruction *insn; - bb->generation = generation; - FOR_EACH_PTR(bb->insns, insn) { if (!insn->bb) continue; @@ -1043,7 +1041,6 @@ static void output_bb(struct function *fn, struct basic_block *bb, unsigned long static void output_fn(LLVMModuleRef module, struct entrypoint *ep) { - unsigned long generation = ++bb_generation; struct symbol *sym = ep->name; struct symbol *base_type = sym->ctype.base_type; struct symbol *ret_type = sym->ctype.base_type->ctype.base_type; @@ -1088,9 +1085,6 @@ static void output_fn(LLVMModuleRef module, struct entrypoint *ep) /* create the BBs */ FOR_EACH_PTR(ep->bbs, bb) { - if (bb->generation == generation) - continue; - LLVMBasicBlockRef bbr; char bbname[32]; struct instruction *insn; @@ -1121,12 +1115,9 @@ static void output_fn(LLVMModuleRef module, struct entrypoint *ep) END_FOR_EACH_PTR(bb); FOR_EACH_PTR(ep->bbs, bb) { - if (bb->generation == generation) - continue; - LLVMPositionBuilderAtEnd(function.builder, bb->priv); - output_bb(&function, bb, generation); + output_bb(&function, bb); } END_FOR_EACH_PTR(bb); } -- 2.11.1 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html