summaryrefslogtreecommitdiff
path: root/ghc/includes/InfoMacros.h
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 2004-08-13 13:04:50 by simonmar]simonmar2004-08-131-692/+0
| | | | Merge backend-hacking-branch onto HEAD. Yay!
* [project @ 2003-05-14 09:13:52 by simonmar]simonmar2003-05-141-60/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the way SRTs are represented: Previously, the SRT associated with a function or thunk would be a sub-list of the enclosing top-level function's SRT. But this approach can lead to lots of duplication: if a CAF is referenced in several different thunks, then it may appear several times in the SRT. Let-no-escapes compound the problem, because the occurrence of a let-no-escape-bound variable would expand to all the CAFs referred to by the let-no-escape. The new way is to describe the SRT associated with a function or thunk as a (pointer+offset,bitmap) pair, where the pointer+offset points into some SRT table (the enclosing function's SRT), and the bitmap indicates which entries in this table are "live" for this closure. The bitmap is stored in the 16 bits previously used for the length field, but this rarely overflows. When it does overflow, we store the bitmap externally in a new "SRT descriptor". Now the enclosing SRT can be a set, hence eliminating the duplicates. Also, we now have one SRT per top-level function in a recursive group, where previously we used to have one SRT for the whole group. This helps keep the size of SRTs down. Bottom line: very little difference most of the time. GHC itself got slightly smaller. One bad case of a module in GHC which had a huge SRT has gone away. While I was in the area: - Several parts of the back-end require bitmaps. Functions for creating bitmaps are now centralised in the Bitmap module. - We were trying to be independent of word-size in a couple of places in the back end, but we've now abandoned that strategy so I simplified things a bit.
* [project @ 2002-12-11 15:36:20 by simonmar]simonmar2002-12-111-158/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [project @ 2002-09-25 20:43:34 by wolfgang]wolfgang2002-09-251-22/+22
| | | | merge rev. 1.19.2.1
* [project @ 2002-06-03 12:56:41 by matthewc]matthewc2002-06-031-22/+1
| | | | Remove pointless macro INIT_VECTOR
* [project @ 2002-02-26 05:03:27 by sof]sof2002-02-261-2/+3
| | | | | | | | | | | | | INFO_VECTOR (MINIINTERPRETER case): gcc-2.96 doesn't like a mixture of labelled and non-labelled members in a struct initializer, which is reasonable. So, be explicit that we're initializing the 'vector' member. I'd be surprised if this change causes breakage with earlier GCCen. A comment next to INFO_VECTOR as to why it has to be empty in the non-MINIINTERPRETER case, would be nice.
* [project @ 2001-09-17 22:46:59 by ken]ken2001-09-171-2/+3
| | | | | The size of a large bitmap is in number of (32- or 64-bit) words, not 32-bit words. MERGE TO STABLE
* [project @ 2001-07-24 05:04:58 by ken]ken2001-07-241-3/+14
| | | | | | | | 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!
* [project @ 2001-07-23 23:14:58 by ken]ken2001-07-231-24/+24
| | | | | Removed 32-bit assumptions in info table macros (mostly replacing StgWord32 with StgWord).
* [project @ 2001-03-22 03:51:08 by hwloidl]hwloidl2001-03-221-25/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -*- 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
* [project @ 2000-08-17 15:19:17 by rrt]rrt2000-08-171-2/+2
| | | | | Changed HAVE_WIN32_DLL_SUPPORT to ENABLE_WIN32_DLL_SUPPORT so that the relevant bits are only used in the dynamic Windows build (as they should be).
* [project @ 2000-05-26 10:14:33 by sewardj]sewardj2000-05-261-2/+2
| | | | | | | | | Changes to allow Hugs to be built with mingw32, not cygwin. Also, updates so that DietHEP works properly for mingw32. Most changes are trivial (assert --> ASSERT), etc. For hugs, have deleted queries about the width of a terminal window, and so the printing of dots as progress indicators is gone too. No great loss. Zapped various other out-of-date platform-specific junk in machdep.c.
* [project @ 2000-04-05 15:27:59 by simonmar]simonmar2000-04-051-53/+76
| | | | | Include the closure description and type description fields in the info table, for PROFILING.
* [project @ 2000-03-31 03:09:35 by hwloidl]hwloidl2000-03-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Numerous changes in the RTS to get GUM-4.06 working (currently works with parfib-ish programs). Most changes are isolated in the rts/parallel dir. rts/parallel/: The most important changes are a rewrite of the (un-)packing code (Pack.c) and changes in LAGA, GALA table operations (Global.c) expecially in rebuilding the tables during GC. rts/: Minor changes in Schedule.c, GC.c (interface to par specific root marking and evacuation), and lots of additions to Sanity.c (surprise ;-) Main.c change for startup: I use a new function rts_evalNothing to start non-main-PEs in a PAR || SMP setup (RtsAPI.c) includes/: Updated GranSim macros in PrimOps.h. lib/std: Few changes in PrelHandle.c etc replacing ForeignObj by Addr in a PAR setup (we still don't support ForeignObjs or WeakPtrs in GUM). Typically use #define FILE_OBJECT Addr when dealing with files. hslibs/lang/: Same as above (in Foreign(Obj).lhs, Weak.lhs, IOExts.lhs etc). -- HWL
* [project @ 2000-01-13 14:33:57 by hwloidl]hwloidl2000-01-131-1/+141
| | | | | 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.
* [project @ 1999-11-30 11:44:32 by simonmar]simonmar1999-11-301-3/+7
| | | | Eliminate warnings for uninitialised srt fields in constructors.
* [project @ 1999-06-25 09:13:37 by simonmar]simonmar1999-06-251-4/+4
| | | | | | | | | New define: TABLES_NEXT_TO_CODE says whether info tables are assumed to reside just before the code for a function. We used to use USE_MINIINTERPRETER for this function, but it makes sense in certain cases to separate the use of tail-calls from tables-next-to-code. StgMacros: add a couple of missing macros to support update in place.
* [project @ 1999-05-13 17:30:50 by simonm]simonm1999-05-131-78/+319
| | | | | | | | | | | | | 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 ]
* [project @ 1999-03-15 16:30:24 by simonm]simonm1999-03-151-6/+3
| | | | | Remove flags field from info tables; create a separate table of flags indexed by the closure type in the RTS.
* [project @ 1999-03-02 19:44:07 by sof]sof1999-03-021-5/+17
| | | | | - misc changes to support DLLs - StgNat* --> StgWord*
* [project @ 1999-02-05 16:02:18 by simonm]simonm1999-02-051-1/+3
| | | | Copyright police.
* [project @ 1998-12-02 13:17:09 by simonm]simonm1998-12-021-0/+199
Move 4.01 onto the main trunk.