We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Assignments.is_noop
1 parent d52f710 commit e4ad372Copy full SHA for e4ad372
arrayjit/lib/assignments.ml
@@ -44,8 +44,6 @@ and t =
44
| Fetch of { array : Tn.t; fetch_op : fetch_op; dims : int array Lazy.t }
45
[@@deriving sexp_of]
46
47
-let is_noop = function Noop -> true | _ -> false
48
-
49
let get_name_exn asgns =
50
let punct_or_sp = Str.regexp "[-@*/:.;, ]" in
51
let punct_and_sp = Str.regexp {|[-@*/:.;,]\( |$\)|} in
@@ -250,6 +248,9 @@ let flatten c =
250
248
in
251
249
loop c
252
+let is_noop c =
+ List.for_all ~f:(function Noop | Block_comment (_, Noop) -> true | _ -> false) @@ flatten c
253
+
254
let get_ident_within_code ?no_dots c =
255
let ident_style = Tn.get_style ~arg_name:"cd_ident_style" ?no_dots () in
256
let nograd_idents = Hashtbl.create (module String) in
0 commit comments