Skip to content

Commit

Permalink
change default optimization level to O3
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Jul 4, 2024
1 parent 59e2e00 commit a286e0a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions example/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ int main() {
}
```
<!-- TODO: remove `-O1` once symbolic popcnt is implemented -->
```sh
$ owi c ./dobble.c -w1 --no-value
$ owi c -O1 ./dobble.c -w1 --no-value
...
Model:
(model
Expand Down Expand Up @@ -311,7 +312,7 @@ OPTIONS
-o VAL, --output=VAL (absent=owi-out)
write results to dir

-O VAL (absent=0)
-O VAL (absent=3)
specify which optimization level to use

--optimize
Expand Down
2 changes: 1 addition & 1 deletion src/bin/owi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ let c_cmd =
in
let opt_lvl =
let doc = "specify which optimization level to use" in
Arg.(value & opt string "0" & info [ "O" ] ~doc)
Arg.(value & opt string "3" & info [ "O" ] ~doc)
in
let testcomp =
let doc = "test-comp mode" in
Expand Down
4 changes: 2 additions & 2 deletions test/c/collections-c/pqueue_tests.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Pqueue tests:
$ owi c -I files/normal/include files/normal/src/pqueue.c files/normal/src/common.c files/normal/src/utils.c files/normal/testsuite/pqueue/pqueue_test_enqueue.c --no-value
$ owi c -O0 -I files/normal/include files/normal/src/pqueue.c files/normal/src/common.c files/normal/src/utils.c files/normal/testsuite/pqueue/pqueue_test_enqueue.c --no-value
Trap: memory heap buffer overflow
Model:
(model
Expand All @@ -11,7 +11,7 @@ Pqueue tests:
(symbol_5 i32))
Reached problem!
[13]
$ owi c -I files/normal/include files/normal/src/pqueue.c files/normal/src/common.c files/normal/src/utils.c files/normal/testsuite/pqueue/pqueue_test_pop.c --no-value
$ owi c -O0 -I files/normal/include files/normal/src/pqueue.c files/normal/src/common.c files/normal/src/utils.c files/normal/testsuite/pqueue/pqueue_test_pop.c --no-value
Trap: memory heap buffer overflow
Model:
(model
Expand Down
2 changes: 1 addition & 1 deletion test/c/test-comp/simple.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ owi c --testcomp ./simple.c
$ owi c -O0 --testcomp ./simple.c
Assert failure: (bool.ne (i32.mul symbol_0 symbol_0) (i32 0))
Model:
(model
Expand Down

0 comments on commit a286e0a

Please sign in to comment.