1. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  2. 13 Sep, 2002 1 commit
    • simonpj's avatar
      [project @ 2002-09-13 15:02:25 by simonpj] · 9af77fa4
      simonpj authored
      --------------------------------------
      	Make Template Haskell into the HEAD
      	--------------------------------------
      
      This massive commit transfers to the HEAD all the stuff that
      Simon and Tim have been doing on Template Haskell.  The
      meta-haskell-branch is no more!
      
      WARNING: make sure that you
      
        * Update your links if you are using link trees.
          Some modules have been added, some have gone away.
      
        * Do 'make clean' in all library trees.
          The interface file format has changed, and you can
          get strange panics (sadly) if GHC tries to read old interface files:
          e.g.  ghc-5.05: panic! (the `impossible' happened, GHC version 5.05):
      	  Binary.get(TyClDecl): ForeignType
      
        * You need to recompile the rts too; Linker.c has changed
      
      
      However the libraries are almost unaltered; just a tiny change in
      Base, and to the exports in Prelude.
      
      
      NOTE: so far as TH itself is concerned, expression splices work
      fine, but declaration splices are not complete.
      
      
      		---------------
      		The main change
      		---------------
      
      The main structural change: renaming and typechecking have to be
      interleaved, because we can't rename stuff after a declaration splice
      until after we've typechecked the stuff before (and the splice
      itself).
      
      * Combine the renamer and typecheker monads into one
      	(TcRnMonad, TcRnTypes)
        These two replace TcMonad and RnMonad
      
      * Give them a single 'driver' (TcRnDriver).  This driver
        replaces TcModule.lhs and Rename.lhs
      
      * The haskell-src library package has a module
      	Language/Haskell/THSyntax
        which defines the Haskell data type seen by the TH programmer.
      
      * New modules:
      	hsSyn/Convert.hs 	converts THSyntax -> HsSyn
      	deSugar/DsMeta.hs 	converts HsSyn -> THSyntax
      
      * New module typecheck/TcSplice type-checks Template Haskell splices.
      
      		-------------
      		Linking stuff
      		-------------
      
      * ByteCodeLink has been split into
      	ByteCodeLink	(which links)
      	ByteCodeAsm	(which assembles)
      
      * New module ghci/ObjLink is the object-code linker.
      
      * compMan/CmLink is removed entirely (was out of place)
        Ditto CmTypes (which was tiny)
      
      * Linker.c initialises the linker when it is first used (no need to call
        initLinker any more).  Template Haskell makes it harder to know when
        and whether to initialise the linker.
      
      
      	-------------------------------------
      	Gathering the LIE in the type checker
      	-------------------------------------
      
      * Instead of explicitly gathering constraints in the LIE
      	tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE)
        we now dump the constraints into a mutable varabiable carried
        by the monad, so we get
      	tcExpr :: RenamedExpr -> TcM TypecheckedExpr
      
        Much less clutter in the code, and more efficient too.
        (Originally suggested by Mark Shields.)
      
      
      		-----------------
      		Remove "SysNames"
      		-----------------
      
      Because the renamer and the type checker were entirely separate,
      we had to carry some rather tiresome implicit binders (or "SysNames")
      along inside some of the HsDecl data structures.  They were both
      tiresome and fragile.
      
      Now that the typechecker and renamer are more intimately coupled,
      we can eliminate SysNames (well, mostly... default methods still
      carry something similar).
      
      		-------------
      		Clean up HsPat
      		-------------
      
      One big clean up is this: instead of having two HsPat types (InPat and
      OutPat), they are now combined into one.  This is more consistent with
      the way that HsExpr etc is handled; there are some 'Out' constructors
      for the type checker output.
      
      So:
      	HsPat.InPat	--> HsPat.Pat
      	HsPat.OutPat	--> HsPat.Pat
      	No 'pat' type parameter in HsExpr, HsBinds, etc
      
      	Constructor patterns are nicer now: they use
      		HsPat.HsConDetails
      	for the three cases of constructor patterns:
      		prefix, infix, and record-bindings
      
      	The *same* data type HsConDetails is used in the type
      	declaration of the data type (HsDecls.TyData)
      
      Lots of associated clean-up operations here and there.  Less code.
      Everything is wonderful.
      9af77fa4
  3. 29 Apr, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-04-29 14:03:38 by simonmar] · b085ee40
      simonmar authored
      FastString cleanup, stage 1.
      
      The FastString type is no longer a mixture of hashed strings and
      literal strings, it contains hashed strings only with O(1) comparison
      (except for UnicodeStr, but that will also go away in due course).  To
      create a literal instance of FastString, use FSLIT("..").
      
      By far the most common use of the old literal version of FastString
      was in the pattern
      
      	  ptext SLIT("...")
      
      this combination still works, although it doesn't go via FastString
      any more.  The next stage will be to remove the need to use this
      special combination at all, using a RULE.
      
      To convert a FastString into an SDoc, now use 'ftext' instead of
      'ptext'.
      
      I've also removed all the FAST_STRING related macros from HsVersions.h
      except for SLIT and FSLIT, just use the relevant functions from
      FastString instead.
      b085ee40
  4. 14 Mar, 2002 1 commit
    • simonpj's avatar
      [project @ 2002-03-14 15:27:15 by simonpj] · 1553c778
      simonpj authored
      ------------------------
      	Change
      		GlobalName --> ExternalName
      		LocalName  ->  InternalName
      	------------------------
      
      For a long time there's been terminological confusion between
      
      	GlobalName vs LocalName	 (property of a Name)
      	GlobalId vs LocalId	 (property of an Id)
      
      I've now changed the terminology for Name to be
      
      	ExternalName vs InternalName
      
      I've also added quite a bit of documentation in the Commentary.
      1553c778
  5. 14 Feb, 2002 1 commit
    • njn's avatar
      [project @ 2002-02-14 11:56:03 by njn] · 89577706
      njn authored
      This commit affects ticky-ticky profiling.  Entry counts for thunks,
      constructors, functions (standard and direct) and indirections are split into
      two counters, one for entries to static closures and one for entries to dynamic
      closures.
      
      This required changing ticky-ticky details in the RTS (introducing new counters
      and corresponding TICK_* events), and also changing the code generator to
      generate the new event names (eg. TICK_ENT_THK is replaced by
      TICK_ENT_STATIC_THK and TICK_ENT_DYN_THK).
      89577706
  6. 02 Jan, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-01-02 12:32:18 by simonmar] · 2c71b5db
      simonmar authored
      - Implement a small GC optimisation: when a static constructor has
        been determined to have no (indirect) CAF references, we set its
        static link field to a non-zero value (currently 1).  This prevents
        the garbage collector from traversing this closure and transitively
        everything it points to, and thus should speed up GC a little.
      
      - Omit the static link field from static constructors which have no
        pointer fields (i.e. they are CONSTR_NOCAF_STATIC).
      
      - Add the padding words and the static link field for a static
        constructor at (AbsC) code generation time, rather than in the back
        ends.  This eliminates some duplication between PprAbsC and
        AbsCStixGen.
      2c71b5db
  7. 23 Nov, 2001 1 commit
  8. 06 Nov, 2001 1 commit
  9. 25 Oct, 2001 1 commit
    • sof's avatar
      [project @ 2001-10-25 02:13:10 by sof] · 9e933350
      sof authored
      - Pet peeve removal / code tidyup, replaced various sub-optimal
        uses of 'length' with something a bit better, i.e., replaced
        the following patterns
      
         *  length as `cmpOp` length bs
         *  length as `cmpOp` val   -- incl. uses where val == 1 and val == 0
         *  {take,drop,splitAt} (length as) bs
         *  length [ () | pat <- as ]
      
        with uses of misc Util functions.
      
        I'd be surprised if there's a noticeable reduction in running
        times as a result of these changes, but every little bit helps.
      
        [ The changes have been tested wrt testsuite/ - I'm seeing a couple
          of unexpected breakages coming from CorePrep, but I'm currently
          assuming that these are due to other recent changes. ]
      
      - compMan/CompManager.lhs: restored 4.08 compilability + some code
        cleanup.
      
      None of these changes are HEADworthy.
      9e933350
  10. 03 Oct, 2001 1 commit
  11. 26 Sep, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-09-26 15:11:50 by simonpj] · 5cd3527d
      simonpj authored
      -------------------------------
      	Code generation and SRT hygiene
      	-------------------------------
      
      This is a big tidy up commit.  I don't think it breaks anything,
      but it certainly makes the code clearer (to me).
      
      I'm not certain that you can use it without sucking in my other
      big commit... they come from the same tree.
      
      
      Core-to-STG, live variables and Static Reference Tables (SRTs)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      I did a big tidy-up of the live-variable computation in CoreToStg.
      The key idea is that the live variables consist of two parts:
      	dynamic live vars
      	static live vars (CAFs)
      
      These two always travel round together, but they were always
      treated separately by the code until now. Now it's a new data type:
      
      type LiveInfo = (StgLiveVars, 	-- Dynamic live variables;
      				-- i.e. ones with a nested (non-top-level) binding
      		 CafSet)	-- Static live variables;
      				-- i.e. top-level variables that are CAFs or refer to them
      
      There's lots of documentation in CoreToStg.
      
      Code generation
      ~~~~~~~~~~~~~~~
      Arising from this, I found that SRT labels were stored in
      a LambdaFormInfo during code generation, whereas they *ought*
      to be in the ClosureInfo (which in turn contains a LambdaFormInfo).
      
      This led to lots of changes in ClosureInfo, and I took the opportunity
      to make it into a labelled record.
      
      Similarly, I made the data type in AbstractC a bit more explicit:
      
        -- C_SRT is what StgSyn.SRT gets translated to...
        -- we add a label for the table, and expect only the 'offset/length' form
      
      data C_SRT = NoC_SRT
      	   | C_SRT CLabel !Int{-offset-} !Int{-length-}
      
      (Previously there were bottoms lying around.)
      5cd3527d
  12. 10 Sep, 2001 1 commit
    • rje's avatar
      [project @ 2001-09-10 10:07:21 by rje] · 8d367f60
      rje authored
      Fixed a bug in TICKY_TICKY profiling.
      
      Previously, the TICK_ENT_DIRECT event was logged before the heap/stack
      check was done. As a result, if the check failed, the TICK_ENT_DIRECT
      event would be logged a second time, causing TICKY_TICKY to give innacurate
      numbers.
      
      This patch shouldn't have any affect on non-ticky compilation.
      
      Also changed the modified bit of code to use "do" notation, and so look a bit
      neater.
      8d367f60
  13. 21 Aug, 2001 1 commit
  14. 22 Mar, 2001 1 commit
    • hwloidl's avatar
      [project @ 2001-03-22 03:51:08 by hwloidl] · 20fc2f0c
      hwloidl authored
      -*- outline -*-
      Time-stamp: <Thu Mar 22 2001 03:50:16 Stardate: [-30]6365.79 hwloidl>
      
      This commit covers changes in GHC to get GUM (way=mp) and GUM/GdH (way=md)
      working. It is a merge of my working version of GUM, based on GHC 4.06,
      with GHC 4.11. Almost all changes are in the RTS (see below).
      
      GUM is reasonably stable, we used the 4.06 version in large-ish programs for
      recent papers. Couple of things I want to change, but nothing urgent.
      GUM/GdH has just been merged and needs more testing. Hope to do that in the
      next weeks. It works in our working build but needs tweaking to run.
      GranSim doesn't work yet (*sigh*). Most of the code should be in, but needs
      more debugging.
      
      ToDo: I still want to make the following minor modifications before the release
      - Better wrapper skript for parallel execution [ghc/compiler/main]
      - Update parallel docu: started on it but it's minimal [ghc/docs/users_guide]
      - Clean up [nofib/parallel]: it's a real mess right now (*sigh*)
      - Update visualisation tools (minor things only IIRC) [ghc/utils/parallel]
      - Add a Klingon-English glossary
      
      * RTS:
      
      Almost all changes are restricted to ghc/rts/parallel and should not
      interfere with the rest. I only comment on changes outside the parallel
      dir:
      
      - Several changes in Schedule.c (scheduling loop; createThreads etc);
        should only affect parallel code
      - Added ghc/rts/hooks/ShutdownEachPEHook.c
      - ghc/rts/Linker.[ch]: GUM doesn't know about Stable Names (ifdefs)!!
      - StgMiscClosures.h: END_TSO_QUEUE etc now defined here (from StgMiscClosures.hc)
                           END_ECAF_LIST was missing a leading stg_
      - SchedAPI.h: taskStart now defined in here; it's only a wrapper around
                    scheduleThread now, but might use some init, shutdown later
      - RtsAPI.h: I have nuked the def of rts_evalNothing
      
      * Compiler:
      
      - ghc/compiler/main/DriverState.hs
        added PVM-ish flags to the parallel way
        added new ways for parallel ticky profiling and distributed exec
      
      - ghc/compiler/main/DriverPipeline.hs
        added a fct run_phase_MoveBinary which is called with way=mp after linking;
        it moves the bin file into a PVM dir and produces a wrapper script for
        parallel execution
        maybe cleaner to add a MoveBinary phase in DriverPhases.hs but this way
        it's less intrusive and MoveBinary makes probably only sense for mp anyway
      
      * Nofib:
      
      - nofib/spectral/Makefile, nofib/real/Makefile, ghc/tests/programs/Makefile:
        modified to skip some tests if HWL_NOFIB_HACK is set; only tmp to record
        which test prgs cause problems in my working build right now
      20fc2f0c
  15. 06 Mar, 2001 1 commit
  16. 06 Dec, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-12-06 13:19:49 by simonmar] · b5a7f584
      simonmar authored
      Re-engineer the transition from Core to STG syntax.  Main changes in
        this commit:
      
          - a new pass, CoreSat, handles saturation of constructors and PrimOps,
            and puts the syntax into STG-like normal form (applications to atoms
            only, etc), modulo type applications and Notes.
      
          - CoreToStg is now done at the same time as StgVarInfo.  Most of the
            contents of StgVarInfo.lhs have been copied into CoreToStg.lhs and
            some simplifications made.
      
        less major changes:
      
          - globalisation of names for the purposes of object splitting is
            now done by the C code generator (which is the Right Place in
            principle, but it was a bit fiddly).
      
          - CoreTidy now does cloning of local binders and collection of arity
            info.  The IdInfo from CoreTidy is now *almost* the final IdInfo we
            put in the interface file, except for CafInfo.  I'm going to move
            the CafInfo collection into CoreTidy in due course too.
      
          - and some other minor tidyups while I was in cluster-bomb commit mode.
      b5a7f584
  17. 06 Nov, 2000 1 commit
  18. 24 Oct, 2000 1 commit
  19. 14 Jul, 2000 1 commit
  20. 06 Jul, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-07-06 14:08:31 by simonmar] · 5d42ac16
      simonmar authored
      New form of literal: MachLabel, for addresses of labels.  Used by
      foreign label instead of MachLitLit now.
      
      Real lit-lits now cause the NCG to panic.
      
      Also: removed CLitLit from AbsCSyn; it was only used in one place for
      a purpose it shouldn't have been used for in the first place.
      5d42ac16
  21. 13 Jan, 2000 1 commit
    • hwloidl's avatar
      [project @ 2000-01-13 14:33:57 by hwloidl] · 1b28d4e1
      hwloidl authored
      Merged GUM-4-04 branch into the main trunk. In particular merged GUM and
      SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.
      1b28d4e1
  22. 11 Nov, 1999 1 commit
  23. 02 Nov, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-11-02 15:05:38 by simonmar] · f6692611
      simonmar authored
      This commit adds in the current state of our SMP support.  Notably,
      this allows the new way 's' to be built, providing support for running
      multiple Haskell threads simultaneously on top of any pthreads
      implementation, the idea being to take advantage of commodity SMP
      boxes.
      
      Don't expect to get much of a speedup yet; due to the excessive
      locking required to synchronise access to mutable heap objects, you'll
      see a slowdown in most cases, even on a UP machine.  The best I've
      seen is a 1.6-1.7 speedup on an example that did no locking (two
      optimised nfibs in parallel).
      
      	- new RTS -N flag specifies how many pthreads to start.
      
      	- new driver -smp flag, tells the driver to use way 's'.
      
      	- new compiler -fsmp option (not for user comsumption)
      	  tells the compiler not to generate direct jumps to
      	  thunk entry code.
      
      	- largely rewritten scheduler
      
      	- _ccall_GC is now done by handing back a "token" to the
      	  RTS before executing the ccall; it should now be possible
      	  to execute blocking ccalls in the current thread while
      	  allowing the RTS to continue running Haskell threads as
      	  normal.
      
      	- you can only call thread-safe C libraries from a way 's'
      	  build, of course.
      
      Pthread support is still incomplete, and weird things (including
      deadlocks) are likely to happen.
      f6692611
  24. 01 Nov, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-11-01 17:09:54 by simonpj] · 30b5ebe4
      simonpj authored
      A regrettably-gigantic commit that puts in place what Simon PJ
      has been up to for the last month or so, on and off.
      
      The basic idea was to restore unfoldings to *occurrences* of
      variables without introducing a space leak.  I wanted to make
      sure things improved relative to 4.04, and that proved depressingly
      hard.  On the way I discovered several quite serious bugs in the
      simplifier.
      
      Here's a summary of what's gone on.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * No commas between for-alls in RULES.  This makes the for-alls have
        the same syntax as in types.
      
      * Arrange that simplConArgs works in one less pass than before.
        This exposed a bug: a bogus call to completeBeta.
      
      * Add a top-level flag in CoreUnfolding, used in callSiteInline
      
      * Extend w/w to use etaExpandArity, so it does eta/coerce expansion
      
      * Implement inline phases.   The meaning of the inline pragmas is
        described in CoreUnfold.lhs.  You can say things like
      	{#- INLINE 2 build #-}
        to mean "inline build in phase 2"
      
      * Don't float anything out of an INLINE.
        Don't float things to top level unless they also escape a value lambda.
      	[see comments with SetLevels.lvlMFE
        Without at least one of these changes, I found that
      	{-# INLINE concat #-}
      	concat = __inline (/\a -> foldr (++) [])
        was getting floated to
      	concat = __inline( /\a -> lvl a )
      	lvl = ...inlined version of foldr...
      
        Subsequently I found that not floating constants out of an INLINE
        gave really bad code like
      	__inline (let x = e in \y -> ...)
        so I now let things float out of INLINE
      
      * Implement the "reverse-mapping" idea for CSE; actually it turned out to be easier
        to implement it in SetLevels, and may benefit full laziness too.
      
      * It's a good idea to inline inRange. Consider
      
      	index (l,h) i = case inRange (l,h) i of
      		  	  True ->  l+i
      			  False -> error
        inRange itself isn't strict in h, but if it't inlined then 'index'
        *does* become strict in h.  Interesting!
      
      * Big change to the way unfoldings and occurrence info is propagated in the simplifier
        The plan is described in Subst.lhs with the Subst type
        Occurrence info is now in a separate IdInfo field than user pragmas
      
      * I found that
      	(coerce T (coerce S (\x.e))) y
        didn't simplify in one round. First we get to
      	(\x.e) y
        and only then do the beta. Solution: cancel the coerces in the continuation
      
      * Amazingly, CoreUnfold wasn't counting the cost of a function an application.
      
      * Disable rules in initial simplifier run.  Otherwise full laziness
        doesn't get a chance to lift out a MFE before a rule (e.g. fusion)
        zaps it.  queens is a case in point
      
      * Improve float-out stuff significantly.  The big change is that if we have
      
      	\x -> ... /\a -> ...let p = ..a.. in let q = ...p...
      
        where p's rhs doesn't x, we abstract a from p, so that we can get p past x.
        (We did that before.)  But we also substitute (p a) for p in q, and then
        we can do the same thing for q.  (We didn't do that, so q got stuck.)
        This is much better.  It involves doing a substitution "as we go" in SetLevels,
        though.
      30b5ebe4
  25. 13 Oct, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-10-13 16:39:10 by simonmar] · 5c67176d
      simonmar authored
      Crude allocation-counting extension to ticky-ticky profiling.
      
      Allocations are counted against the closest lexically enclosing
      function closure, so you need to map the output back to the STG code.
      5c67176d
  26. 14 Jul, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-07-14 14:40:20 by simonpj] · 4e7d56fd
      simonpj authored
      Main things:
      
      * Add splitProductType_maybe to DataCon.lhs, with type
        splitProductType_maybe
      	:: Type 			-- A product type, perhaps
      	-> Maybe (TyCon, 		-- The type constructor
      		  [Type],		-- Type args of the tycon
      		  DataCon,		-- The data constructor
      		  [Type])		-- Its *representation* arg types
      
        Then use it in many places (e.g. worker-wrapper places) instead
        of a pile of junk
      
      * Clean up various uses of dataConArgTys, which were plain wrong because
        they weren't passed the existential type arguments.  Most of these calls
        are eliminated by using splitProductType_maybe above.  I hope I correctly
        squashed the others. This fixes a bug that Meurig's programs showed up.
      
          module FailGHC (killSustainer) where
          import Weak
          import IOExts
      
          data Sustainer = forall a . Sustainer (IORef (Maybe a)) (IO ())
      
          killSustainer :: Sustainer -> IO ()
          killSustainer (Sustainer _ act) = act
      
        The above program used to kill the compiler.
      
      * A fairly concerted attack on the Dreaded Space Leak.
      	- Add Type.seqType, CoreSyn.seqExpr, CoreSyn.seqRules
      
      	- Add some seq'ing when building Ids and IdInfos
      		These reduce the space usage a lot
      
      	- Add CoreSyn.coreBindsSize, which is pretty strict in the program,
      		and call it when we have -dshow-passes.
      
      	- Do not put the inlining in an Id that is being plugged into
      		the result-expression of the simplifier.  This cures
      		a the 'wedge' in the space profile for reasons I don't understand fully
      
        Together, these things reduce the max space usage when compiling PrelNum from
        17M to about 7Mbytes.
      
        I think there are now *too many* seqs, and they waste work, but I don't have
        time to find which ones.
      
        Furthermore, we aren't done. For some reason, some of the stuff allocated by
        the simplifier makes it through all during code generation and I don't see why.
        There's a should-be-unnecessary call to coreBindsSize in Main.main which
        zaps some, but not all of this space.
      
        -dshow-passes reduces space usage a bit, but I don't think it should really.
      
        All the measurements were made on a compiler compiled with profiling by
        GHC 3.03.    I hope they carry over to other builds!
      
      * One trivial thing: changed all variables 'label' to 'lbl', becuase the
        former is a keyword with -fglagow-exts in GHC 3.03 (which I was compiling with).
        Something similar in StringBuffer.
      4e7d56fd
  27. 24 Jun, 1999 1 commit
  28. 08 Jun, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-06-08 15:56:44 by simonmar] · 62812240
      simonmar authored
      Allow reserving of stack slots for non-pointer data (eg. cost
      centres).  This means the previous hacks to keep the stack bitmaps
      correct in the presence of cost centres are now unnecessary, and
      case-of-case expressions will be compiled properly with profiling on.
      62812240
  29. 18 May, 1999 1 commit
  30. 13 May, 1999 1 commit
    • simonm's avatar
      [project @ 1999-05-13 17:30:50 by simonm] · 589b7946
      simonm authored
      Support for "unregisterised" builds.  An unregisterised build doesn't
      use the assembly mangler, doesn't do tail jumping (uses the
      mini-interpreter), and doesn't use global register variables.
      
      Plenty of cleanups and bugfixes in the process.
      
      Add way 'u' to GhcLibWays to get unregisterised libs & RTS.
      
      [ note: not *quite* working fully yet... there's still a bug or two
        lurking ]
      589b7946
  31. 11 May, 1999 1 commit
    • keithw's avatar
      [project @ 1999-05-11 16:44:02 by keithw] · 5c0b6550
      keithw authored
      (this is number 7 of 9 commits to be applied together)
      
        The code generator now incorporates the update avoidance
        optimisation: a thunk of __o type is now made SingleEntry rather
        than Updatable.
      
        We want to verify that SingleEntry thunks are indeed entered at most
        once.  In order to do this, -ticky turns on eager blackholing.
        Ordinary thunks will be dealt with by the RTS, but CAFs are
        blackholed by the code generator.  We blackhole with new blackholes:
        SE_CAF_BLACKHOLE.  We will enter one of these if we attempt to enter
        a SingleEntry thunk twice.
      5c0b6550
  32. 23 Apr, 1999 1 commit
  33. 08 Apr, 1999 1 commit
    • simonm's avatar
      [project @ 1999-04-08 15:46:12 by simonm] · 36e45f65
      simonm authored
      Profiling fixes:
      
      Function closures which are inside a lambda now *set* the CCCS,
      instead of possibly appending to it.
      
      In Simplify.lhs: allow inlining imported functions when profiling.
      What we really want to do is allow any top-level binding to be
      inlined, but there doesn't seem to be an easy way to tell whether a
      binding is top-level or not.
      36e45f65
  34. 22 Mar, 1999 1 commit
  35. 11 Mar, 1999 1 commit
  36. 02 Mar, 1999 1 commit
    • sof's avatar
      [project @ 1999-03-02 14:34:33 by sof] · dc7d7a2f
      sof authored
      - import list tweaks
      - moved the code that decides that a StgCon really shouldn't
        be mapped to a static constructor but an updateable thunk
        if it contains lit-lits from the codegen into the CoreToStg
        translation.
      
        Added an extra case to this code to deal with StgCon's that contain
        references to values that reside in a DLL, where we also have to
        opt for an updateable thunk instead of a static constructor. Only
        applies when compiling on/for Win32 platforms.
      dc7d7a2f
  37. 21 Jan, 1999 1 commit
  38. 15 Jan, 1999 1 commit
  39. 18 Dec, 1998 1 commit
    • simonpj's avatar
      [project @ 1998-12-18 17:40:31 by simonpj] · 7e602b0a
      simonpj authored
      Another big commit from Simon.  Actually, the last one
      didn't all go into the main trunk; because of a CVS glitch it
      ended up in the wrong branch.
      
      So this commit includes:
      
      * Scoped type variables
      * Warnings for unused variables should work now (they didn't before)
      * Simplifier improvements:
      	- Much better treatment of strict arguments
      	- Better treatment of bottoming Ids
      	- No need for w/w split for fns that are merely strict
      	- Fewer iterations needed, I hope
      * Less gratuitous renaming in interface files and abs C
      * OccName is a separate module, and is an abstract data type
      
      I think the whole Prelude and Exts libraries compile correctly.
      Something isn't quite right about typechecking existentials though.
      7e602b0a
  40. 02 Dec, 1998 1 commit