Add -O option to enable optims.

This commit is contained in:
Léonard Gérard 2011-11-02 17:23:23 +01:00
parent fd40bcefcf
commit 76109b553a
3 changed files with 11 additions and 2 deletions

View file

@ -127,7 +127,8 @@ let main () =
"-memalloc", Arg.Unit do_mem_alloc_and_typing, doc_memalloc;
"-only-memalloc", Arg.Set do_mem_alloc, doc_memalloc_only;
"-only-linear", Arg.Set do_linear_typing, doc_linear_only;
"-old-scheduler", Arg.Set use_old_scheduler, doc_interf_scheduler
"-old-scheduler", Arg.Set use_old_scheduler, doc_interf_scheduler;
"-O", Arg.Unit do_optim, doc_optim
]
compile errmsg;
with

View file

@ -114,6 +114,13 @@ let do_mem_alloc_and_typing () =
let use_old_scheduler = ref false
let optim = ref false
let do_optim () =
do_mem_alloc_and_typing ();
tomato := true;
deadcode := true;
do_iterator_fusion := true
let doc_verbose = "\t\t\tSet verbose mode"
and doc_version = "\t\tThe version of the compiler"
and doc_print_types = "\t\t\tPrint types"
@ -146,3 +153,4 @@ and doc_memalloc = "\t\tEnable memory allocation and linear annotations"
and doc_memalloc_only = "\tEnable memory allocation"
and doc_linear_only = "\t\tEnable linear annotations"
and doc_interf_scheduler = "\tUse the old scheduler"
and doc_optim = "\t\t\tOptimize with deadcode, tomato, itfusion and memalloc"

View file

@ -10,7 +10,7 @@ shopt -s nullglob
# script de test
compilo=../../heptc
coption="-memalloc"
coption="-O"
# compilateurs utilises pour les tests de gen. de code