... | ... | @@ -108,7 +108,7 @@ make EXTRA_HC_OPTS="-O2 -fregs-iterative -ddump-to-file -ddump-asm-regalloc-stag |
|
|
|
|
|
- **Visualisation of conflict graphs**
|
|
|
|
|
|
Graphviz, available from [ http://www.graphviz.org](http://www.graphviz.org) can be used to make nice visualisations of the register conflict graphs. Use `-ddump-asm-regalloc-stages`, and copy one of the graphs into a new file `niceGraph.dot`
|
|
|
Graphviz, available from [ http://www.graphviz.org](http://www.graphviz.org) can be used to make nice visualisations of the register conflict graphs. Use `-ddump-asm-regalloc-stages`, and copy one of the graph descriptions into a new file `niceGraph.dot`
|
|
|
|
|
|
```wiki
|
|
|
circo -Tpng niceGraph.dot -o niceGraph.png
|
... | ... | @@ -121,7 +121,8 @@ circo -Tpng niceGraph.dot -o niceGraph.png |
|
|
|
|
|
> > > [graph-colored.dot](/trac/ghc/attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/graph-colored.dot)[](/trac/ghc/raw-attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/graph-colored.dot) -\> [graph-colored.png](/trac/ghc/attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/graph-colored.png)[](/trac/ghc/raw-attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/graph-colored.png)
|
|
|
|
|
|
- checkSpills
|
|
|
- **checkSpills**
|
|
|
[checkSpills.hs](/trac/ghc/attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/checkSpills.hs)[](/trac/ghc/raw-attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/checkSpills.hs) is a nasty, throw away script which can be used to automate the comparison of allocation algorithms. Copy it and a list of test like [checkSpills.tests](/trac/ghc/attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/checkSpills.tests)[](/trac/ghc/raw-attachment/wiki/Commentary/Compiler/Backends/NCG/RegisterAllocator/checkSpills.tests) to the top level nofib directory, compile and run. It will build the nofib benchmarks in the list 6 times each, once each with each of the allocators to extract spill counts, and then once again to get compile timings which are unperterbed by the space leaks introduced by compiling with debugging turned on. It's only needed if you're hacking on the allocator, parses the nofib make output directly, and is likely to rot - which is why it isn't included in the main source tree.
|
|
|
|
|
|
## Possible Improvements
|
|
|
|
... | ... | |