1. 22 Aug, 2006 5 commits
  2. 21 Aug, 2006 4 commits
    • Simon Marlow's avatar
      fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com> · 7adc29e8
      Simon Marlow authored
      From David's email:
      The problem is that the inline assembler code was placing the result
      of an operation in a register that is used as input later in the code.
      At the bottom of this message I've extracted a short short code
      fragment that you can run through gcc (on a powerpc machine) to see
      the generated assembly output.
      The changes to fix the problem are fairly simple.  The first adds an
      ampersand to the output list of the assembly fragment ("=r" (result)
      --> "=&r" (result)) The ampersand just tells gcc that result can not
      be placed in a register used for any of the input parameters (o, n, or
      p).  Otherwise, it feels free to place output parameters in the same
      registers used by the inputs -- but because of the flow of control
      here we need everything in a distinct register.  This change fixes the
      TVar program above.
      The second change adds a clobber list (the :"cc", "memory").  This
      tells gcc that the condition code (due to the compare) and memory (due
      to the store) might be changed during the asm execution.  The lack of
      a clobber list did not seem to be causing any trouble, but without it
      gcc is free to assume that no state is changed during the execution.
    • Simon Marlow's avatar
      Always use -funbox-strict-fields for Binary · 3b1f598f
      Simon Marlow authored
      For some reason this was only enabled when $(bootstrapped)=YES.  This
      would be one reason why the stage1 compiler is slow.  I guess we'll
      find out if anything goes wrong.
    • Simon Marlow's avatar
    • Simon Marlow's avatar
  3. 16 Aug, 2006 1 commit
  4. 21 Aug, 2006 2 commits
  5. 20 Aug, 2006 1 commit
  6. 21 Aug, 2006 3 commits
  7. 19 Aug, 2006 1 commit
  8. 18 Aug, 2006 7 commits
  9. 17 Aug, 2006 6 commits
  10. 16 Aug, 2006 10 commits
    • simonpj@microsoft.com's avatar
      Add ad-hoc typing checks for tagToEnum# · c938c386
      simonpj@microsoft.com authored
      The problem with tagToEnum# is that it is not overloaded (in the
      Haskell sense) but you are only supposed to apply it to a TyCon
      that is an enumeration (isEnumerationTyCon).
      The Real Way to do this is to have some special kind of type constraint
      for the purpose, but that is wild overkill. So this patch adds a small
      rather ad-hoc check to TcExpr.instFun.  Crude, simple, but it works fine.
      Fixes Trac #786
      Test is tcfail164
    • simonpj@microsoft.com's avatar
      Get dead-ness right in knownCon · c55001c5
      simonpj@microsoft.com authored
    • simonpj@microsoft.com's avatar
      Tuning for argToPat · d66ea3ef
      simonpj@microsoft.com authored
      argToPat is a crucial function for SpecConstr, because it decides
      what patterns are worth specialising.  I was being much too gung-ho about
      constants.  This patch makes it much better.
    • simonpj@microsoft.com's avatar
      Re-factor mkAtomicArgs and completeNonRecX · ad0cc1df
      simonpj@microsoft.com authored
      This refactoring ensures that when mkAtomicArgs adds new bindings,
      it does so using completeNonRecX, which adds unfoldings etc.  More
      modular, and saves passes too.
      (This was important when getting rules to work right.  We want tob
      fire a rule as soon as possible, taking into account all inlinings,
      else a less-good rule applies.  That's what I found when doing 
      stream fusion anyway.)
      Regardless, this is an improvement.
    • simonpj@microsoft.com's avatar
      Another try at the continuation-swapping stuff · 0e98e80c
      simonpj@microsoft.com authored
      I have spent altogether too long on my attempt to avoid case-of-case
      in situations where it is a Bad Thing.  All the action is in the
      case for mkDupableAlt that handles cases with a single alternative.
      I've added rather extensive comments, and it finally seems to be working
      more or less right.  If you compile (say) GHC/Real.o you'll see quite a
      few case-of-cases remain (which didn't happen before), and they mostly look
      pretty sensible to me.
    • simonpj@microsoft.com's avatar
      Don't build unnecessary lets in knownCon · eba4dfc2
      simonpj@microsoft.com authored
      Faced with
      	case x of y { (a,b) -> rhs }
      where x is bound to (c,d), we were generating
      	let y = (c,d) in rhs
      and thenn hoping to get rid of the y binding by CSE or some such.  It's
      better simply not to build it in the first place, by generating
      	let y = x in rhs
      This patch does the job.
    • simonpj@microsoft.com's avatar
      Comments only · 08896210
      simonpj@microsoft.com authored
    • simonpj@microsoft.com's avatar
    • simonpj@microsoft.com's avatar
      Record constructor arg occs correctly (bug-fix) · 5338fea3
      simonpj@microsoft.com authored
      I was forgetting the non-pattern-matched type args of a constructor.
    • simonpj@microsoft.com's avatar
      Disable form-checking for rule LHSs · 1c36a2c0
      simonpj@microsoft.com authored
      Previously we checked the form of the arguments of a RULE lhs, to 
      ensure that they were simple applications. There was no good reason
      for that, save to prevent you writing LHSs that were unlikely to match.
      And Don Stewart found he wanted to do something we didn't allow (a section,
      I think).  So I have just disabled the check.