On Mon, 11 Jan 2010 09:52:59 +0000 Ramana Radhakrishnan <ramana.radhakrish...@arm.com> wrote:
> cam-bc3-b12:ramrad01 68 > ocamlc -c neon-schedgen.ml > File "neon-schedgen.ml", line 51, characters 0-10: > Unbound module Utils > > It sounds like a configuration issue but given my rather rusty ocaml > skills - I'm not sure where to look. Googling around doesn't show me > anything obvious. I see this both with v. 3.09.3 and v 3.11 (on > karmic). This is apparently due to a missing source file, "utils.ml", but unfortunately I have no idea what has happened to it (I'm not the original author). Luckily it only seems to be used for a single function definition (find_with_result), so we can just re-implement that. Another thing which might bite you is that recent OCaml versions don't like hyphens in filenames: replacing them with underscores works OK though (i.e. neon_schedgen.ml). Compiling neon-schedgen.ml with the attached patch, the parts of cortex-a8-neon.md below the line: ;; The remainder of this file is auto-generated by neon-schedgen. are generated identically. Would you like to try this out and see how you get on with it? Followups set to gcc-patches. Thanks, Julian ChangeLog gcc/ * config/arm/neon-schedgen.ml (Utils): Don't try to open missing module. (find_with_result): New.
Index: neon-schedgen.ml =================================================================== --- neon-schedgen.ml (revision 155808) +++ neon-schedgen.ml (working copy) @@ -48,7 +48,14 @@ and at present we do not emit specific guards.) *) -open Utils +let find_with_result fn lst = + let rec scan = function + [] -> raise Not_found + | l::ls -> + match fn l with + Some result -> result + | _ -> scan ls in + scan lst let n1 = 1 and n2 = 2 and n3 = 3 and n4 = 4 and n5 = 5 and n6 = 6 and n7 = 7 and n8 = 8 and n9 = 9