#7063: Register allocators can't handle non-uniform register sets
-------------------------------+--------------------------------------------
    Reporter:  simonmar        |       Owner:                         
        Type:  bug             |      Status:  new                    
    Priority:  normal          |   Milestone:  7.8.1                  
   Component:  Compiler (NCG)  |     Version:  7.4.2                  
    Keywords:                  |          Os:  Unknown/Multiple       
Architecture:  x86             |     Failure:  Runtime performance bug
  Difficulty:  Unknown         |    Testcase:                         
   Blockedby:                  |    Blocking:                         
     Related:                  |  
-------------------------------+--------------------------------------------
 Neither the linear scan register allocator nor the graph-colouring
 allocator can properly handle the fact that some registers on x86 have 8
 and 16-bit versions and some don't.  We got away with this until now
 because the only free registers on x86 were `%eax`, `%ecx` and `%edx`, but
 now we can also treat `%esi` as free when it isn't being used for R1 (see
 f857f0741515b9ebf186beb38fe64448de355817).  However, `%esi` doesn't have
 an 8-bit version, so we cannot treat it as allocatable because the
 register allocator will try to use it when an 8-bit register is needed
 (see 105754792adac0802a9a59b0df188b58fb53503f).

 LLVM doesn't have this problem, so one workaround is to compile with
 `-fllvm` to get the extra register(s) on x86.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7063>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to