summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmBuildInfoTables.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* no need to export cafTransfersSimon Marlow2012-07-171-2/+1
|
* Remove "fuel", adapt to Hoopl changes, fix warningsSimon Marlow2012-07-051-6/+5
|
* Fix merge-related problemsSimon Marlow2012-07-041-10/+2
|
* Merge remote-tracking branch 'origin/master' into newcgSimon Marlow2012-07-041-20/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (756 commits) don't crash if argv[0] == NULL (#7037) -package P was loading all versions of P in GHCi (#7030) Add a Note, copying text from #2437 improve the --help docs a bit (#7008) Copy Data.HashTable's hashString into our Util module Build fix Build fixes Parse error: suggest brackets and indentation. Don't build the ghc DLL on Windows; works around trac #5987 On Windows, detect if DLLs have too many symbols; trac #5987 Add some more Integer rules; fixes #6111 Fix PA dfun construction with silent superclass args Add silent superclass parameters to the vectoriser Add silent superclass parameters (again) Mention Generic1 in the user's guide Make the GHC API a little more powerful. tweak llvm version warning message New version of the patch for #5461. Fix Word64ToInteger conversion rule. Implemented feature request on reconfigurable pretty-printing in GHCi (#5461) ... Conflicts: compiler/basicTypes/UniqSupply.lhs compiler/cmm/CmmBuildInfoTables.hs compiler/cmm/CmmLint.hs compiler/cmm/CmmOpt.hs compiler/cmm/CmmPipeline.hs compiler/cmm/CmmStackLayout.hs compiler/cmm/MkGraph.hs compiler/cmm/OldPprCmm.hs compiler/codeGen/CodeGen.lhs compiler/codeGen/StgCmm.hs compiler/codeGen/StgCmmBind.hs compiler/codeGen/StgCmmLayout.hs compiler/codeGen/StgCmmUtils.hs compiler/main/CodeOutput.lhs compiler/main/HscMain.hs compiler/nativeGen/AsmCodeGen.lhs compiler/simplStg/SimplStg.lhs
| * Remove some uses of sortLeIan Lynagh2012-06-221-1/+1
| | | | | | | | | | | | Technically the behaviour of sortWith has changed, as it used x `le` y = get_key x < get_key y (note "<" rather than "<="), but I assume that that was just a mistake.
| * Remove some unnecessary platform argumentsIan Lynagh2012-06-131-11/+9
| |
| * Remove PlatformOutputableIan Lynagh2012-06-131-5/+5
| | | | | | | | | | We can now get the Platform from the DynFlags inside an SDoc, so we no longer need to pass the Platform in.
| * Change how macros like ASSERT are definedIan Lynagh2012-06-051-1/+1
| | | | | | | | | | By using Haskell's debugIsOn rather than CPP's "#ifdef DEBUG", we don't need to kludge things to keep the warning checker happy etc.
| * Change -X flags into LANGUAGE pragmasIan Lynagh2012-02-261-3/+3
| |
* | take the analyses out of the FuelUniqSM monadSimon Marlow2012-03-151-1/+1
| |
* | Remove the old stack layout algorithmsSimon Marlow2012-03-151-1/+0
| | | | | | | | | | | | | | | | Also, do removeDeadAssignments instead of cmmLiveness before stack allocation, because the former also does liveness analysis, and we can do just one liveness analysis instead of two. The stack layout algorithm doesn't introduce any dead assignments, so this doesn't affect the generated code.
* | Lower safe foreign calls in the new CmmLayoutStackSimon Marlow2012-03-061-89/+0
| | | | | | | | | | | | | | | | We also generate much better code for safe foreign calls (and maybe also unsafe foreign calls) than previously. See the two new Notes: Note [lower safe foreign calls] Note [safe foreign call convention]
* | tiny refactoringSimon Marlow2012-02-141-2/+1
| |
* | Build info tables with the new stack layout codeSimon Marlow2012-02-081-116/+1
| |
* | New stack layout algorithmSimon Marlow2012-02-081-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Also: - improvements to code generation: push slow-call continuations on the stack instead of generating explicit continuations - remove unused CmmInfo wrapper type (replace with CmmInfoTable) - squash Area and AreaId together, remove now-unused RegSlot - comment out old unused stack-allocation code that no longer compiles after removal of RegSlot
* | Run the complete backend (Stg -> .S) incrementally on each StgBindingSimon Marlow2012-01-261-5/+11
| | | | | | | | | | | | | | | | | | This is so that we can process the Stg code in constant space. Before we were generating all the C-- up front, leading to a large space leak. I haven't converted the LLVM or C back ends to the incremental scheme, but it's not hard to do.
* | Use Set instead of Map for CAFSetSimon Marlow2012-01-251-20/+22
| |
* | tiny refactoringSimon Marlow2012-01-191-1/+1
| |
* | SnapshotSimon Marlow2012-01-171-2/+2
|/
* Clarify some commentsIan Lynagh2011-11-051-3/+3
|
* Use -fwarn-tabs when validatingIan Lynagh2011-11-041-0/+7
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-021-12/+18
| | | | And some knock-on changes
* refactoring and fixing the stage 2 compilationSimon Marlow2011-08-251-2/+2
|
* Renaming onlySimon Peyton Jones2011-08-251-12/+12
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* Snapshot of codegen refactoring to share with simonpjSimon Marlow2011-08-251-25/+27
|
* Don't export the _info symbol for the data constructor worker bindingsMax Bolingbroke2011-07-071-3/+3
| | | | | | | This is safe because GHC never generates a fast call to a data constructor worker: if the call is seen statically it will be eta-expanded and the allocation of the data will be inlined. We still need to export the _closure in case the constructor is used in an unapplied fashion.
* Refactoring: use a structured CmmStatics type rather than [CmmStatic]Max Bolingbroke2011-07-051-2/+2
| | | | | | | | | | | | | | | | | | I observed that the [CmmStatics] within CmmData uses the list in a very stylised way. The first item in the list is almost invariably a CmmDataLabel. Many parts of the compiler pattern match on this list and fail if this is not true. This patch makes the invariant explicit by introducing a structured type CmmStatics that holds the label and the list of remaining [CmmStatic]. There is one wrinkle: the x86 backend sometimes wants to output an alignment directive just before the label. However, this can be easily fixed up by parameterising the native codegen over the type of CmmStatics (though the GenCmmTop parameterisation) and using a pair (Alignment, CmmStatics) there instead. As a result, I think we will be able to remove CmmAlign and CmmDataLabel from the CmmStatic data type, thus nuking a lot of code and failing pattern matches. This change will come as part of my next patch.
* Merge in new code generator branch.Simon Marlow2011-01-241-221/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the new code generator to make use of the Hoopl package for dataflow analysis. Hoopl is a new boot package, and is maintained in a separate upstream git repository (as usual, GHC has its own lagging darcs mirror in http://darcs.haskell.org/packages/hoopl). During this merge I squashed recent history into one patch. I tried to rebase, but the history had some internal conflicts of its own which made rebase extremely confusing, so I gave up. The history I squashed was: - Update new codegen to work with latest Hoopl - Add some notes on new code gen to cmm-notes - Enable Hoopl lag package. - Add SPJ note to cmm-notes - Improve GC calls on new code generator. Work in this branch was done by: - Milan Straka <fox@ucw.cz> - John Dias <dias@cs.tufts.edu> - David Terei <davidterei@gmail.com> Edward Z. Yang <ezyang@mit.edu> merged in further changes from GHC HEAD and fixed a few bugs.
* Remove code that is dead now that we need >= 6.12 to buildIan Lynagh2010-12-151-2/+0
|
* Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4Edward Z. Yang2010-09-191-7/+8
| | | | | | | | | | | | | | | | | | | | | | | This is patch that adds support for interruptible FFI calls in the form of a new foreign import keyword 'interruptible', which can be used instead of 'safe' or 'unsafe'. Interruptible FFI calls act like safe FFI calls, except that the worker thread they run on may be interrupted. Internally, it replaces BlockedOnCCall_NoUnblockEx with BlockedOnCCall_Interruptible, and changes the behavior of the RTS to not modify the TSO_ flags on the event of an FFI call from a thread that was interruptible. It also modifies the bytecode format for foreign call, adding an extra Word16 to indicate interruptibility. The semantics of interruption vary from platform to platform, but the intent is that any blocking system calls are aborted with an error code. This is most useful for making function calls to system library functions that support interrupting. There is no support for pre-Vista Windows. There is a partner testsuite patch which adds several tests for this functionality.
* Remove (most of) the FiniteMap wrapperIan Lynagh2010-09-141-34/+39
| | | | | | | | We still have insertList, insertListWith, deleteList which aren't in Data.Map, and foldRightWithKey which works around the fold(r)WithKey addition and deprecation.
* Fix build with 6.10Ian Lynagh2010-09-131-0/+2
|
* Super-monster patch implementing the new typechecker -- at lastsimonpj@microsoft.com2010-09-131-0/+4
| | | | | | | | | This major patch implements the new OutsideIn constraint solving algorithm in the typecheker, following our JFP paper "Modular type inference with local assumptions". Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
* Comments and type signatures onlysimonpj@microsoft.com2010-03-091-0/+23
|
* More sensible use of -fnew-codegen and less debugging outputdias@cs.tufts.edu2009-09-181-3/+6
|
* Minor refactoring and formattingdias@cs.tufts.edu2009-09-181-4/+24
| | | | | Wrote a generic function to extend dataflow results for safe foreign calls. Should be able to throw it away when we change the representation of safe foreign calls.
* * Refactor CLabel.RtsLabel to CLabel.CmmLabelBen.Lippmeier@anu.edu.au2009-11-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type of the CmmLabel ctor is now CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel - When you construct a CmmLabel you have to explicitly say what package it is in. Many of these will just use rtsPackageId, but I've left it this way to remind people not to pretend labels are in the RTS package when they're not. - When parsing a Cmm file, labels that are not defined in the current file are assumed to be in the RTS package. Labels imported like import label are assumed to be in a generic "foreign" package, which is different from the current one. Labels imported like import "package-name" label are marked as coming from the named package. This last one is needed for the integer-gmp library as we want to refer to labels that are not in the same compilation unit, but are in the same non-rts package. This should help remove the nasty #ifdef __PIC__ stuff from integer-gmp/cbits/gmp-wrappers.cmm
* Merge RtsLabelInfo.Rts* with RtsLabelInfo.Rts*FSBen.Lippmeier@anu.edu.au2009-10-181-2/+2
|
* Remove GHC's haskell98 dependencyIan Lynagh2009-07-241-2/+2
|
* Remove unused importsIan Lynagh2009-07-071-2/+0
|
* stack overflows and out of memory'sdias@eecs.tufts.edu2009-03-161-9/+9
| | | | | | | 1. Stack overflow fixed by making dataflow monad strict in the state. 2. Out of memory fixed by "forgetting" lastoutfacts in the dataflow monad where we should. We were creating an unnecessarily long list that grew exponentially...
* A few bug fixes; some improvements spurred by paper writingdias@eecs.harvard.edu2009-03-031-43/+23
| | | | | | | | | | | | Among others: - Fixed Stg->C-- translation of let-no-escapes -- it's important to use the right continuation... - Fixed infinite recursion in X86 backend (shortcutJump mishandled infinite loops) - Fixed yet another wrong calling convention -- primops take args only in vanilla regs, but they may return results on the stack! - Removed StackInfo from LGraph and Block -- now in LastCall and CmmZ - Updated avail-variable and liveness code
* Removed warnings, made Haddock happy, added examples in documentationdias@eecs.harvard.edu2008-10-171-26/+22
| | | | | The interesting examples talk about our story with heap checks in case alternatives and our story with the case scrutinee as a Boolean.
* Fixed linear regalloc bug, dropped some tracing codedias@eecs.harvard.edu2008-10-161-9/+5
| | | | | | | | | o The linear-scan register allocator sometimes allocated a block before allocating one of its predecessors, which could lead to inconsistent allocations. Now, we allocate a block only if a predecessor has set the "incoming" assignments for the block (or if it's the procedure's entry block). o Also commented out some tracing code on the new codegen path.
* Clarify the SRT building processdias@eecs.harvard.edu2008-10-141-16/+29
| | | | | | | | Before: building a closure that would build an SRT given the top-level SRT. It was somewhat difficult to understand the control flow, and it may have had held onto some data structures long after they should be dead. Now, I just bundle the info we need about CAFs along with the procedure and directly call a new top-level function to build the SRTs later.
* Floating infotables were reversed in C back enddias@eecs.harvard.edu2008-10-131-2/+3
|
* forgot a few filesdias@eecs.harvard.edu2008-10-131-0/+556