[GHC] #12745: Compile cmm file for register allocator stats

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: Type: task | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 8.0.1 (NCG) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #12744 Differential Rev(s): Phab:D2621 | Wiki Page: -------------------------------------+------------------------------------- I'm trying to write a unit test for the graph coloring register allocator and to start I'm trying to write a function (mostly modeled on hscCompileCmmFile and cmmNativeGen) that will compile a cmm file and return register allocation stats (that can then be asserted against). It should be less cumbersome to use than cmmNativeGen. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: new Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2621 Wiki Page: | -------------------------------------+------------------------------------- Changes (by tjakway): * owner: => tjakway -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: new Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2621 Wiki Page: | -------------------------------------+------------------------------------- Comment (by tjakway): The issue stems from RegAlloc.Graph.Main lines 100-106: {{{ -- If any of these dump flags are turned on we want to hang on to -- intermediate structures in the allocator - otherwise tell the -- allocator to ditch them early so we don't end up creating space leaks. let dump = or [ dopt Opt_D_dump_asm_regalloc_stages dflags , dopt Opt_D_dump_asm_stats dflags , dopt Opt_D_dump_asm_conflicts dflags ] }}} Without the dump flags the intermediate structures we need are scrapped. I propose adding a flag to keep the intermediates without printing them. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: new Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2621 Wiki Page: | -------------------------------------+------------------------------------- Description changed by tjakway: @@ -2,4 +2,3 @@ - and to start I'm trying to write a function (mostly modeled on - hscCompileCmmFile and cmmNativeGen) that will compile a cmm file and - return register allocation stats (that can then be asserted against). It - should be less cumbersome to use than cmmNativeGen. + and to start I'm trying to write a function that will compile a cmm file + and return register allocation stats (that can then be asserted against). + It should be less cumbersome to use than cmmNativeGen. New description: I'm trying to write a unit test for the graph coloring register allocator and to start I'm trying to write a function that will compile a cmm file and return register allocation stats (that can then be asserted against). It should be less cumbersome to use than cmmNativeGen. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: new Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2638 Wiki Page: | -------------------------------------+------------------------------------- Changes (by tjakway): * differential: Phab:D2621 => Phab:D2638 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: new Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2638 Wiki Page: | -------------------------------------+------------------------------------- Comment (by tjakway): I've submitted the first patch with a test for avoiding unnecessary spills and reloads. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12745: Compile cmm file for register allocator stats
-------------------------------------+-------------------------------------
Reporter: tjakway | Owner: tjakway
Type: task | Status: new
Priority: lowest | Milestone:
Component: Compiler (NCG) | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #12744 | Differential Rev(s): Phab:D2638
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12745: Compile cmm file for register allocator stats -------------------------------------+------------------------------------- Reporter: tjakway | Owner: tjakway Type: task | Status: closed Priority: lowest | Milestone: Component: Compiler (NCG) | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12744 | Differential Rev(s): Phab:D2638 Wiki Page: | -------------------------------------+------------------------------------- Changes (by tjakway): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12745#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC