1. 25 Jul, 2001 6 commits
    • simonmar's avatar
      [project @ 2001-07-25 10:10:25 by simonmar] · 7d34d68c
      simonmar authored
      - Move FptoolsHcOpts out of the hslibs section of this file (which was
        *exactly* the wrong place for it).
      
      - Clarify the meaning of FptoolsHcOpts and GhcHcOpts.
      
      NOTE: $(FptoolsHcOpts) gets added to every Haskell compilation for
      Haskell *programs* (not libraries), including GHC itself.  By default,
      it contains only -O.  To remove the -O, you need to override
      FptoolsHcOpts in build.mk, not GhcHcOpts.
      
      GhcHcOpts is still there, and contains options to be added when
      compiling GHC only.
      7d34d68c
    • simonpj's avatar
      [project @ 2001-07-25 09:19:41 by simonpj] · a47868d5
      simonpj authored
      ---------------------------------
      	Another long-standing infelicity!
      	---------------------------------
      
      CoreTidy was throwing away demand info on let-binders.
      This meant that CorePrep would build a let (thunk) instead of
      a case, even if the Id is sure to be demanded.
      
      Easily fixed by making CoreTidy retain the demand info.
      
      This demand-analysis stuff is having the excellent side effect
      of flushing out performance bugs!
      a47868d5
    • simonmar's avatar
      [project @ 2001-07-25 09:14:21 by simonmar] · e16e9973
      simonmar authored
      - bugfix (was erroneously ignoring the return value from scavenge_one() and
        checking failed_to_evac instead, which was always false)
      
      - printf format fix (shut gcc up).
      e16e9973
    • simonpj's avatar
      [project @ 2001-07-25 08:04:00 by simonpj] · 513e9c2f
      simonpj authored
      Change pretty-print of DmdType slightly
      513e9c2f
    • simonpj's avatar
      [project @ 2001-07-25 07:43:53 by simonpj] · 7ca7d77a
      simonpj authored
      ---------------------------
      	Fix another bad DmdAnal bug
      	---------------------------
      
      The `both` operator wasn't commutative, leading to most
      strange results.  In particular, the fixpoint finder went into
      an infinite fip/flop loop on Marcin's program.
      7ca7d77a
    • simonpj's avatar
      [project @ 2001-07-25 07:42:23 by simonpj] · 72904630
      simonpj authored
      ---------------------------------------
      	Fix a grevious dict-inlining infelicity
      	---------------------------------------
      
      This commit fixes an infelicity that must have been there
      for a long time.  The problem was that dictionary functions
      (arising from instance declarations) were treated as GlobalIds,
      and hence no taken account of when doing free variable and dependency
      analysis.    As a result, the specialiser was messing up dependency
      order, so the program was considerably more complex than it should
      be by the time it got to the strictness analyser.
      
      Net result:
      	PrelRead.$sreduce :: Integer -> Integer -> (Integer,Integer)
      didn't get detected as strict.
      
      Easily fixed, by making DictFunIds into LocalIds (albeit exported ones).
      72904630
  2. 24 Jul, 2001 34 commits
    • sof's avatar
      [project @ 2001-07-24 18:04:01 by sof] · 394de04a
      sof authored
      Capture the dependency of PrelIO.hsc on PrelHandle_hsc.h (as was, 'make clean; make all' broke)
      394de04a
    • simonpj's avatar
      [project @ 2001-07-24 16:47:40 by simonpj] · b766a90f
      simonpj authored
      Print a bit more info in an old strictness analyser assert fail
      b766a90f
    • simonpj's avatar
      [project @ 2001-07-24 16:46:51 by simonpj] · ff868a84
      simonpj authored
      Print a bit more info in the dmdFix loop
      ff868a84
    • simonpj's avatar
      [project @ 2001-07-24 16:42:11 by simonpj] · 7c03fd3b
      simonpj authored
      A major demand-analyser fix, which made it say something was
      absent when it wasn't at all.  Here's the comment from the
      Case equation of dmdAnal.
      
      	-- Figure out whether the case binder is used, and use
      	-- that to set the keepity of the demand.  This is utterly essential.
      	-- Consider	f x = case x of y { (a,b) -> k y a }
      	-- If we just take scrut_demand = U(L,A), then we won't pass x to the
      	-- worker, so the worker will rebuild
      	--	x = (a, absent-error)
      	-- and that'll crash.
      7c03fd3b
    • simonmar's avatar
      [project @ 2001-07-24 16:36:43 by simonmar] · 76a51a41
      simonmar authored
      Bugfixes; take large objects into account in stats output.
      76a51a41
    • simonpj's avatar
      [project @ 2001-07-24 16:09:48 by simonpj] · 9acd03bd
      simonpj authored
      wibble
      9acd03bd
    • simonpj's avatar
      [project @ 2001-07-24 16:04:21 by simonpj] · ecce1269
      simonpj authored
      Add errorCString
      ecce1269
    • simonpj's avatar
      [project @ 2001-07-24 15:57:27 by simonpj] · 83a812bf
      simonpj authored
      Make absent-arg errors more descriptive
      83a812bf
    • simonmar's avatar
      [project @ 2001-07-24 15:13:01 by simonmar] · 195abb24
      simonmar authored
      More tweaks.  Getting usable now.
      195abb24
    • simonmar's avatar
      [project @ 2001-07-24 14:29:13 by simonmar] · 5d38ec16
      simonmar authored
      Make compacting GC faster, stage 1.
      
      A cunning trick from Simon P.J. to avoid needing to call the
      potentially expensive LOOKS_LIKE_GHC_INFO() a lot.
      5d38ec16
    • simonmar's avatar
      [project @ 2001-07-24 10:38:48 by simonmar] · eb3f8eaf
      simonmar authored
      remove extra SRC_MKDEPENDC_OPTS, since we shouldn't be doing a
      mkdependC in this directory at all.
      eb3f8eaf
    • simonmar's avatar
      [project @ 2001-07-24 10:37:57 by simonmar] · e74ac509
      simonmar authored
      Remove whitespace from the end of lines.  The extra whitespace is
      syntactically meaningful to make(!) and was causing us to do
      a superfluous mkdependC in directories without any C files.
      e74ac509
    • simonmar's avatar
      [project @ 2001-07-24 10:31:07 by simonmar] · 69a01994
      simonmar authored
      libm is a dependency of the RTS now, so don't also depend on it for
      package "std".
      69a01994
    • simonmar's avatar
      [project @ 2001-07-24 10:28:51 by simonmar] · cbda7114
      simonmar authored
      back the last change out; a better way to get all the hc files you need is
      
      	SRC_HC_OPTS += -keep-hc-files
      
      in your build.mk.
      cbda7114
    • simonpj's avatar
      [project @ 2001-07-24 09:55:16 by simonpj] · ba4b4b51
      simonpj authored
      Two fixes to the demand analyis.
      
      1.  Don't look inside Coerces.  These wrap recursive newtypes,
      and we might fail to find a fixpoint if we look inside them.
      
      2.  Polymorphic 'seq' is represented by a (Seq _ _ []) demand,
      so lub/both must be prepared to take a Seq with an empty list
      of demands without complaint.
      ba4b4b51
    • simonpj's avatar
      [project @ 2001-07-24 09:53:27 by simonpj] · 198ee273
      simonpj authored
      Keep the printed stuff for Demand and DmdResult separate, else
      we can get confused when parsing a strictness signature.  For
      example, previously
      
      	LX
      
      could have been parsed as	L  -> X
      or as				LX -> T
      
      Urk!  I've taken the simple path of making DmdResults print in
      lower case.  Thus
      
      	Lx 	means	L  -> x
      	LX	means	LX -> t
      198ee273
    • simonmar's avatar
      [project @ 2001-07-24 09:46:55 by simonmar] · 85d18ab5
      simonmar authored
      Add Ken Shan to the contributor's list for his heroic work on the
      Alpha port of GHC.  Thanks Ken!
      85d18ab5
    • simonpj's avatar
      [project @ 2001-07-24 09:08:47 by simonpj] · 0b6113b8
      simonpj authored
      Add missing cases to newDemand
      0b6113b8
    • ken's avatar
      [project @ 2001-07-24 06:31:35 by ken] · d888cbcb
      ken authored
      Innocent changes to resurrect/add 64-bit support.
      d888cbcb
    • ken's avatar
      [project @ 2001-07-24 06:02:21 by ken] · f6709386
      ken authored
      Fix typo in StgRun() for the Alpha
      f6709386
    • ken's avatar
      [project @ 2001-07-24 06:01:21 by ken] · 63252248
      ken authored
      #include <string.h> to get proper prototypes
      63252248
    • ken's avatar
      [project @ 2001-07-24 05:53:27 by ken] · d83e7dcf
      ken authored
      Removed debugging (tracing) code.
      d83e7dcf
    • ken's avatar
      [project @ 2001-07-24 05:49:32 by ken] · 5c6558a5
      ken authored
      Fixed punctuation typo.
      5c6558a5
    • ken's avatar
      [project @ 2001-07-24 05:17:52 by ken] · d5053232
      ken authored
      Added -I$(GHC_INCLUDE_DIR) to $(SRC_MKDEPENDC_OPTS), so that
      mkdependC can find its include files properly.
      d5053232
    • ken's avatar
      [project @ 2001-07-24 05:08:51 by ken] · d91879fb
      ken authored
      Made "nat" 64-bit ("unsigned long") rather than 32-bit ("unsigned int")
      on 64-bit machines.  This fixes some problems caused by code elsewhere
      assuming that sizeof(nat) == sizeof(void *).
      d91879fb
    • ken's avatar
      [project @ 2001-07-24 05:07:37 by ken] · c8279740
      ken authored
      Added -lm to the extra_libraries list for the rts package.  This is
      because ldexp() is used by StgPrimFloat.c and is in -lm on alpha-osf3.
      c8279740
    • ken's avatar
      [project @ 2001-07-24 05:05:41 by ken] · 9772e7c1
      ken authored
      Added $(GhcHcOpts) to $(SRC_HC_OPTS), so that by setting
      --keep-hc-files-too in $(GhcHcOpts) we get .hc files for the
      Haskell code under this directory, ghc/driver.
      9772e7c1
    • ken's avatar
      [project @ 2001-07-24 05:04:58 by ken] · 030787e5
      ken authored
      Removed 32-bit dependencies in the generation and handling of
      liveness mask bitmaps.  We now support both 32-bit and 64-bit
      machines with identical .hc files.  Support for >64-bit machines
      would be easy to add.  Note that old .hc files are incompatible
      with the changes made to ghc/include/InfoMacros.h!
      030787e5
    • ken's avatar
      [project @ 2001-07-24 04:52:49 by ken] · 1146fac5
      ken authored
      Made some code #ifdef GHCI, so that it will compile without GHCI enabled.
      1146fac5
    • ken's avatar
      [project @ 2001-07-24 04:47:06 by ken] · 276ee4fa
      ken authored
      Added missing hyphen in frnot of machdepCCOpts for mips and powerpc.
      276ee4fa
    • ken's avatar
      [project @ 2001-07-24 04:46:37 by ken] · aad02f03
      ken authored
      Added -Xlinker -noprefix_recognition to Alpha-specific
      machdepCCOpts.  We need this flag to disable the following
      documented behavior of ld(1) on Digital UNIX:
      
         All routines that start with __init_ are treated, by default,
         as initialization routines. These are routines that are called
         without an argument when the file that contains them is loaded
         or when the program that contains them is started.
      
      Unfortunately, this flag produces the annoying (but harmless) gcc
      message
      
          gcc: -noprefix_recognition: linker input file unused since
          linking not done
      
      (See also mk/bootstrap.mk)
      aad02f03
    • ken's avatar
      [project @ 2001-07-24 04:45:59 by ken] · a7373b8d
      ken authored
      Added -static, a flag for compiling on the Alpha that is already
      listed under machdepCCOpts in DriverFlags.hs.  Without it, the
      following assert in GC.c fails:
      
          /* make sure the info pointer is into text space */
          ASSERT(q && (LOOKS_LIKE_GHC_INFO(GET_INFO(q))
                       || IS_HUGS_CONSTR_INFO(GET_INFO(q))));
      
      Added -Xlinker -noprefix_recognition, a flag for Alpha compilation
      that I just added to machdepCCOpts in DriverFlags.hs.  We need
      this flag to disable the following documented behavior of ld(1) on
      Digital UNIX:
      
         All routines that start with __init_ are treated, by default,
         as initialization routines. These are routines that are called
         without an argument when the file that contains them is loaded
         or when the program that contains them is started.
      
      Unfortunately, this flag produces the annoying (but harmless) gcc
      message
      
          gcc: -noprefix_recognition: linker input file unused since
          linking not done
      
      (See also ghc/compiler/main/DriverFlags.hs)
      a7373b8d
    • ken's avatar
      [project @ 2001-07-24 04:41:40 by ken] · 395065b0
      ken authored
      Added #include "SchedAPI.h" to fix compiler warning message.
      395065b0
    • ken's avatar
      [project @ 2001-07-24 04:39:31 by ken] · af27ab5c
      ken authored
      Make the Time module thread-safe by calling the reentrant functions
      gmtime_r and localtime_r instead of gmtime and localtime wherever
      they are available.
      
      (This is necessary to make Time work at all on our Alpha machine --
      perhaps GHC tickles the reentrancy of the C library or something?)
      af27ab5c