On 30 September 2011 10:09, Max Bolingbroke <[email protected]> wrote:
> On 30 September 2011 16:07, Max Bolingbroke <[email protected]> 
> wrote:
>> I just tried to run David Peixotto's fibon suite with and without the
>> new analysis, but all the benchmarks time out for me. I've sent him an
>> email to find out what I'm doing wrong - if he can help me out then I
>> should be able to post fuller numbers.

Hmmm. I'll have to shoot him an email and get the same guidance. I ran
into the same issue a month or two back when I tried to use fibon.

>
> David Peixotto's has generously given me some guidance on the use of
> fibon, and I've been able to get some numbers on how the GHC alias
> analysis changes things. The results are kind of surprising: runtime
> gets worse by a geometric mean of 0.5%, with a worst case of 5.45%, at
> a 13% cost in compile time!
>
> So, I can perfectly well believe that the alias analysis is not enough
> to help LLVM to improve the code in more general examples than the one
> I considered. However, I'm quite surprised by the result it actually
> made the code *worse* on average -- I've set it up so my analysis is
> guaranteed to always return results that are no worse than those from
> the standard analysis! So either LLVM is actually doing *worse
> optimisation* when given more precise information, or a 0.5% runtime
> change is not statistically meaningful. (Or perhaps I've made another
> error in running Fibon)
>
> I'm going to try to understand some of the benchmark examples in more
> detail to figure out what is going on.

Hmmm this is a little surprising. I wasn't expecting a big gain in the
general case since as I've expressed to you before there seem to be
some problems with LLVM unrelated to alias analysis. Or at least the
problems can't be fixed via the alias analysis infrastructure provided
by LLVM currently. Are you using LLVM 2.9 or the unreleased 3.0? I'm
excited about the new register allocator in 3.0. I don't know if it
will help but more then any other improvement in the last few releases
it seems to have the potential to. I was hoping the new register
allocator combined with your alias pass would be a winning
combination.

At least with this result now we have something a little more concrete
to talk to the LLVM guys about. When we have previously tried to
discuss with them our end has been to vague to really get traction on
the issue.

Cheers,
David

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to