summaryrefslogtreecommitdiff
path: root/compiler/codeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use opt_PIC not #defined __PIC__ in compiler source.Ben.Lippmeier@anu.edu.au2009-11-172-5/+14
|
* Don't share low valued Int and Char closures with Windows DLLsBen.Lippmeier@anu.edu.au2009-11-142-1/+15
|
* Loop problems in native back ends, update to T3286 fixdias@cs.tufts.edu2009-11-051-1/+1
| | | | | | | | | | | The native back ends had difficulties with loops; in particular the code for branch-chain elimination could run in infinite loops or drop basic blocks. The old codeGen didn't expose these problems. Also, my fix for T3286 in the new codegen was getting applied to too many (some wrong) cases; a better pattern match fixed that.
* Keep Touch'd variables live through the back enddias@cs.tufts.edu2009-09-182-6/+6
| | | | | | | When we used derived pointers into the middle of an object, we need to keep the pointer to the start of the object live. We use a "fat machine instruction" with the primitive MO_Touch to propagate this information through the back end.
* Fixed calling convention for unboxed tuplesdias@cs.tufts.edu2009-09-183-7/+9
| | | | | | Apparently, the arguments should be sorted by pointerhood. While we're at it, I rewrote the code that assigns registers and stack space to function call and return parameters.
* Fix for T3286 in new codegen (related to T3132); plus formattingdias@cs.tufts.edu2009-09-181-15/+38
| | | | | | | | | If the scrutinee is bottom, the generated Cmm code could have a type error when the case arm expected an unboxed floating-point value (even though the arm should never be reached). Now, we detect this case and avoid producing the type-incorrect assignment.
* validate fixesBen.Lippmeier@anu.edu.au2009-11-061-1/+1
|
* * Refactor CLabel.RtsLabel to CLabel.CmmLabelBen.Lippmeier@anu.edu.au2009-11-0618-73/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1817-147/+150
|
* Replace a checking `is_elem` with a plain `elem`Simon Marlow2009-09-301-2/+1
| | | | This one complains sometimes, but there's no good way to improve it.
* RTS tidyup sweep, first phaseSimon Marlow2009-08-027-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* fix warningSimon Marlow2009-07-281-1/+0
|
* Remove old 'foreign import dotnet' codeSimon Marlow2009-07-273-7/+0
| | | | It still lives in darcs, if anyone wants to revive it sometime.
* Remove GHC's haskell98 dependencyIan Lynagh2009-07-245-5/+5
|
* Remove unused importsIan Lynagh2009-07-0713-15/+0
|
* Trim unused imports detected by new unused-import codesimonpj@microsoft.com2009-07-061-1/+0
|
* Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263Max Bolingbroke2009-07-018-16/+19
|
* Add missing StgPrimCallOp case to isSimpleOpIan Lynagh2009-06-111-0/+1
|
* Add PrimCall to the STG layer and update Core -> STG translationDuncan Coutts2009-06-093-2/+19
| | | | | | | | | | It adds a third case to StgOp which already hold StgPrimOp and StgFCallOp. The code generation for the new StgPrimCallOp case is almost exactly the same as for out-of-line primops. They now share the tailCallPrim function. In the Core -> STG translation we map foreign calls using the "prim" calling convention to the StgPrimCallOp case. This is because in Core we represent prim calls using the ForeignCall stuff. At the STG level however the prim calls are really much more like primops than foreign calls.
* Fix #3132: a case of bogus code generationSimon Marlow2009-06-181-2/+28
|
* Remove old GUM/GranSim codeSimon Marlow2009-06-021-5/+1
|
* Make some showSDoc's use OneLineMode rather than PageModeIan Lynagh2009-03-311-2/+2
|
* Debugging by Sesame Street:dias@eecs.tufts.edu2009-04-031-1/+1
| | | | | | | | | | | | | | | | One of these things is not like the others: stdPattern :: [LRep] -> Maybe StgHalfWord stdPattern reps = case reps of [] -> Just ARG_NONE -- just void args, probably [N] -> Just ARG_N [P] -> Just ARG_N [F] -> Just ARG_F [D] -> Just ARG_D [L] -> Just ARG_L Today's debugging session was brought to you by the letter P.
* Better handling of node parameter in calling conventionsdias@eecs.tufts.edu2009-03-251-3/+7
| | | | | | - Previously, the node was taken as a parameter, then ignored, for static closures. Goofy. Now, the vestigial node parameters are gone.
* When calling gc, avoid saving node in static closuresdias@eecs.tufts.edu2009-03-232-4/+5
|
* Code simplifications due to call/return separation; some improvements to how ↵dias@eecs.tufts.edu2009-03-232-22/+22
| | | | node argument is managed
* Calls with and without passing node arguments more clearly separateddias@eecs.tufts.edu2009-03-233-6/+6
|
* Another small step: call and return conventions specified separately when ↵dias@eecs.tufts.edu2009-03-235-13/+14
| | | | making calls
* Small step toward call-conv improvement: separate out calls and returnsdias@eecs.tufts.edu2009-03-235-6/+6
|
* Removed a tracedias@eecs.tufts.edu2009-03-181-1/+1
|
* Calling convention bug and cleanupdias@eecs.tufts.edu2009-03-174-5/+3
| | | | | - yet another wrong calling convention; this one was a special case for returning one value.
* Inconsistent type and arguments in safe foreign calls...dias@eecs.tufts.edu2009-03-161-15/+15
| | | | | - The function argument was stripped from the argument list but not from the type. Now they're both stripped.
* Fixes to "Retract Hp *before* checking for HpLim==0"Simon Marlow2009-03-181-2/+7
|
* FIX biographical profiling (#3039, probably #2297)Simon Marlow2009-03-173-4/+21
| | | | | | | | | Since we introduced pointer tagging, we no longer always enter a closure to evaluate it. However, the biographical profiler relies on closures being entered in order to mark them as "used", so we were getting spurious amounts of data attributed to VOID. It turns out there are various places that need to be fixed, and I think at least one of them was also wrong before pointer tagging (CgCon.cgReturnDataCon).
* A few bug fixes; some improvements spurred by paper writingdias@eecs.harvard.edu2009-03-036-35/+47
| | | | | | | | | | | | 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
* Fix the build on amd64/LinuxIan Lynagh2009-02-063-2/+2
|
* When generating C, don't pretend functions are dataIan Lynagh2009-02-066-6/+10
| | | | | | | | | | | | | | | We used to generated things like: extern StgWordArray (newCAF) __attribute__((aligned (8))); ((void (*)(void *))(W_)&newCAF)((void *)R1.w); (which is to say, pretend that newCAF is some data, then cast it to a function and call it). This goes wrong on at least IA64, where: A function pointer on the ia64 does not point to the first byte of code. Intsead, it points to a structure that describes the function. The first quadword in the structure is the address of the first byte of code so we end up dereferencing function pointers one time too many, and segfaulting.
* Remove a redundant importIan Lynagh2009-01-141-1/+0
|
* Make the ASSERT more informativesimonpj@microsoft.com2009-01-131-1/+1
|
* Fix warnings in StgCmmForeignIan Lynagh2008-12-291-10/+11
|
* Fix warnings in CgCallConvIan Lynagh2008-12-291-10/+11
|
* Fix warnings in SMRepIan Lynagh2008-12-291-17/+15
|
* Fix warnings in ClosureInfoIan Lynagh2008-12-291-34/+43
|
* Fix warnings in CgTickyIan Lynagh2008-12-291-15/+18
|
* Fix warnings in CgConIan Lynagh2008-12-291-11/+4
|
* Use DynFlags to work out if we are doing ticky ticky profilingIan Lynagh2008-12-188-44/+55
| | | | We used to use StaticFlags
* Fix warnings in CgExprIan Lynagh2008-12-171-16/+24
|
* Fix warnings in CgBinderyIan Lynagh2008-12-171-13/+28
|
* Fix warnings in CgStackeryIan Lynagh2008-12-171-9/+1
|
* Fix warnings in CgCaseIan Lynagh2008-12-171-24/+24
|