#4223: LLVM slower then NCG, C example
-------------------------------+--------------------------------------------
    Reporter:  dterei          |       Owner:  dterei                 
        Type:  bug             |      Status:  new                    
    Priority:  normal          |   Component:  Compiler (LLVM)        
     Version:  6.12.3          |    Keywords:                         
          Os:  Linux           |    Testcase:                         
Architecture:  x86_64 (amd64)  |     Failure:  Runtime performance bug
-------------------------------+--------------------------------------------

Comment(by dterei):

 OK found the problem.

 The LLVM opt tool (which is the llvm optimiser) actually makes the code
 worse. Here are the timings again, (on a different 64 bit machine then
 before [msrc64]):

 {{{
   * fasm: 1.993s
   * viac: 1.965s
   * llvm (O0): 1.935s
   * llvm (O1): 2.358s
   * llvm (O2): 2.366s
   * llvm (O3): 2.366s
 }}}

 Will have to narrow down further which optimisation pass is causing the
 problem. This also raises the question again though of what flags are a
 good default to pass to the opt tool for Haskell code. Here we see it
 significantly degrades the performance of the code. And for the nofib
 benchmark suite it doesn't seem to have any effect. Yet Don found some
 cases where it made significant differences!... what to do? Perhaps a good
 default is actually to not use opt for now, since here it hinders the code
 and for nofib there is no difference. Then users can manually choose
 optimisation passes anyway for the specific code, which is what good C
 programmers generally have to do anyway...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4223#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to