compiler: move optimizer into the binary

This commit is contained in:
Ayke van Laethem
2018-09-04 18:55:47 +02:00
parent c109ec0955
commit 0746d61639
3 changed files with 14 additions and 10 deletions
+3 -1
View File
@@ -59,7 +59,9 @@ func Compile(pkgName, runtimePath, outpath, target string, printIR, dumpSSA bool
if err := c.Verify(); err != nil {
return err
}
//c.Optimize(2, 1) // -O2 -Os
// TODO: provide a flag to disable (most) optimizations.
c.Optimize(2, 2, 5) // -Oz params
if err := c.Verify(); err != nil {
return err
}