From b4859240e1796505a5a5efde656570156d193dfc Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 16 Sep 2019 13:57:40 +0200 Subject: [PATCH] main: stop running the LLVM verifier for trivial changes The above changes might indeed introduce inconsistencies in the IR, but the code is small and doesn't change often so it's unnecessary to always check for errors. It will be tested again later anyway. The compile time impact was somewhere around 6%, so that's a nice improvement. --- main.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/main.go b/main.go index 0865bff5..6d29328b 100644 --- a/main.go +++ b/main.go @@ -154,9 +154,6 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act if spec.GOOS != "darwin" { c.ApplyFunctionSections() // -ffunction-sections } - if err := c.Verify(); err != nil { - return errors.New("verification error after applying function sections") - } // Browsers cannot handle external functions that have type i64 because it // cannot be represented exactly in JavaScript (JS only has doubles). To @@ -168,9 +165,6 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act if err != nil { return err } - if err := c.Verify(); err != nil { - return errors.New("verification error after running the wasm i64 hack") - } } // Optimization levels here are roughly the same as Clang, but probably not