Hi,
two minor enhancements to Cil:
- Cil.compactStmts removes Block statements that have no label and no
attribute (and are thus nothing more than a pointless pair of curly
brackets),
- compiling in bytecode mode with PROFILE=1 uses ocamlcp:
http://caml.inria.fr/pub/docs/manual-ocaml/manual031.html
Regards,
--
Gabriel Kerneis
diff -ru -x _darcs cil-darcs/src/cil.ml cil-patched/src/cil.ml
--- cil-darcs/src/cil.ml 2009-06-08 16:51:50.000000000 +0200
+++ cil-patched/src/cil.ml 2009-06-08 16:57:41.000000000 +0200
@@ -1323,6 +1323,8 @@
else
finishLast (compress s ils rest)
+ | {skind=Block b;labels = []} :: rest when b.battrs = [] ->
+ compress lastinstrstmt lastinstrs (b.bst...@rest)
| s :: rest ->
let res = s :: compress dummyStmt Clist.empty rest in
finishLast res
Seulement dans cil-patched/src: cil.ml-darcs-backup0
diff -ru -x _darcs cil-darcs/ocamlutil/Makefile.ocaml cil-patched/ocamlutil/Makefile.ocaml
--- cil-darcs/ocamlutil/Makefile.ocaml 2009-06-08 16:51:30.000000000 +0200
+++ cil-patched/ocamlutil/Makefile.ocaml 2009-06-08 17:02:39.000000000 +0200
@@ -271,8 +271,13 @@
EXEEXT = .byte
MOVEAFTERCAMLC = cmi cmo
COMPILETOWHAT = bytecode
- CAMLC = $(CAMLDIR)ocamlc $(COMPILE_FLAGS)
- CAMLLINK = $(CAMLDIR)ocamlc -custom $(LINK_FLAGS)
+ ifdef PROFILE
+ CAMLC = $(CAMLDIR)ocamlcp -p a $(COMPILE_FLAGS)
+ CAMLLINK = $(CAMLDIR)ocamlcp -p a -custom $(LINK_FLAGS)
+ else
+ CAMLC = $(CAMLDIR)ocamlc $(COMPILE_FLAGS)
+ CAMLLINK = $(CAMLDIR)ocamlc -custom $(LINK_FLAGS)
+ endif
CAML_NOOPT = 1
endif
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users