#5598: Function quotRem is inefficient
----------------------------------------------+-----------------------------
    Reporter:  boris                          |       Owner:  igloo             
     
        Type:  task                           |      Status:  new               
     
    Priority:  normal                         |   Milestone:  7.6.1             
     
   Component:  Compiler                       |     Version:  7.0.3             
     
    Keywords:  division, performance, primop  |          Os:  Unknown/Multiple  
     
Architecture:  x86                            |     Failure:  Runtime 
performance bug
  Difficulty:  Unknown                        |    Testcase:                    
     
   Blockedby:                                 |    Blocking:                    
     
     Related:                                 |  
----------------------------------------------+-----------------------------

Comment(by igloo@…):

 commit 7bfb7bfc6da981ef827b1a166c8cbfb5b29a25a4
 {{{
 Author: Ian Lynagh <[email protected]>
 Date:   Tue Feb 14 21:26:18 2012 +0000

     Define a quotRem CallishMachOp; fixes #5598

     This means we no longer do a division twice when we are using quotRem
     (on platforms on which the op is supported; currently only amd64).

  compiler/cmm/CmmMachOp.hs                 |    5 +-
  compiler/cmm/OldCmmUtils.hs               |   11 +
  compiler/cmm/PprC.hs                      |   10 +-
  compiler/codeGen/CgPrimOp.hs              |    9 +
  compiler/ghc.cabal.in                     |    1 -
  compiler/llvmGen/LlvmCodeGen/CodeGen.hs   |   15 +-
  compiler/nativeGen/PPC/CodeGen.hs         |   14 +-
  compiler/nativeGen/SPARC/CodeGen.hs       |  499
 +++++++++++++++++++++++-----
  compiler/nativeGen/SPARC/CodeGen/CCall.hs |  343 --------------------
  compiler/nativeGen/X86/CodeGen.hs         |   31 ++-
  compiler/prelude/primops.txt.pp           |    5 +
  11 files changed, 495 insertions(+), 448 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5598#comment:11>
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