Re: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Ben Gamari
Ccing David Spitzenberg, who has thought about proc-point splitting, which is relevant for reasons that we will see below. Harendra Kumar writes: > On 16 June 2016 at 13:59, Ben Gamari wrote: >> >> It actually came to my attention while researching this that the >> -fregs-graph flag is curren

RE: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Simon Peyton Jones
| All-in-all, the graph coloring allocator is in great need of some love; | Harendra, perhaps you'd like to have a try at dusting it off and perhaps | look into why it regresses in compiler performance? It would be great if | we could use it by default. I second this. Volunteers are sorely neede

Re: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Harendra Kumar
That's a nice read, thanks for the pointer. I agree with the solution presented there. If we can do that it will be awesome. If help is needed I can spend some time on it. One of the things that I noticed is that the code can be optimized significantly if we know the common case so that we can opt

Re: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Karel Gardas
On 06/16/16 12:53 PM, Harendra Kumar wrote: A thought that came to my mind was whether we should focus on getting better code out of the llvm backend or the native code generator. LLVM seems pretty good at the specialized task of code generation and low level optimization, it is well funded, wide

Re: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Harendra Kumar
On 16 June 2016 at 13:59, Ben Gamari wrote: > > It actually came to my attention while researching this that the > -fregs-graph flag is currently silently ignored [2]. Unfortunately this > means you'll need to build a new compiler if you want to try using it. Yes I did try -fregs-graph and -fregs

Re: ghc-pkg, package database path containing a trailing slash, and ${pkgroot}

2016-06-16 Thread Ben Gamari
Nicolas Dudebout writes: > When passing a package database to ghc-pkg via GHC_PACKAGE_PATH or > --package-db, ${pkgroot} does not get computed properly if the input path > contains a trailing slash. > Thanks for the report, Nicolas. I've opened #12196 to track this and proposed a fix in D2336. C

Re: CMM-to-ASM: Register allocation wierdness

2016-06-16 Thread Ben Gamari
Harendra Kumar writes: > My earlier experiment was on GHC-7.10.3. I repeated this on GHC-8.0.1 and > the assembly traced was exactly the same except for a marginal improvement. > The 8.0.1 code generator removed the r14/r11 swap but the rest of the > register ring shift remains the same. I have u