@@ -379,15 +379,16 @@ let createCFG (file: file) =
379379 | [] -> failwith " MyCFG.createCFG: 0 Asm succ"
380380 | [succ, skippedStatements] -> begin
381381 addEdge ~skipped Statements (Statement stmt) (loc, ASM (tmpls, outs, ins, false )) (Statement succ);
382- let unique_dests = List. fold_left (fun acc label ->
383- let succ, skippedStatements = find_real_stmt ~parent: stmt ! label in
384- match List. assoc_opt succ acc with
385- | Some _ -> acc
386- | None -> (succ, skippedStatements) :: acc
387- ) [] labels in
388- List. iter (fun (succ , skippedStatements ) ->
389- addEdge ~skipped Statements (Statement stmt) (loc, ASM (tmpls, outs, ins, true )) (Statement succ)
390- ) unique_dests;
382+ if not (get_bool " asm_is_nop" ) then
383+ let unique_dests = List. fold_left (fun acc label ->
384+ let succ, skippedStatements = find_real_stmt ~parent: stmt ! label in
385+ match List. assoc_opt succ acc with
386+ | Some _ -> acc
387+ | None -> (succ, skippedStatements) :: acc
388+ ) [] labels in
389+ List. iter (fun (succ , skippedStatements ) ->
390+ addEdge ~skipped Statements (Statement stmt) (loc, ASM (tmpls, outs, ins, true )) (Statement succ)
391+ ) unique_dests;
391392 end
392393 | _ -> failwith " MyCFG.createCFG: >1 Asm succ"
393394 end
0 commit comments