- 30 Jul, 2008 1 commit
-
-
Simon Marlow authored
-
- 22 Jul, 2008 1 commit
-
-
Simon Marlow authored
-
- 29 May, 2008 2 commits
-
-
dias@eecs.harvard.edu authored
o Moved BlockId stuff to a new file to avoid module recursion o Defined stack areas for parameter-passing locations and spill slots o Part way through replacing copy in and copy out nodes - added movement instructions for stack pointer - added movement instructions for call and return parameters (but not with the proper calling conventions) o Inserting spills and reloads for proc points is now procpoint-aware (it was relying on the presence of a CopyIn node as a proxy for procpoint knowledge) o Changed ZipDataflow to expect AGraphs (instead of being polymorphic in the type of graph)
-
dias@eecs.harvard.edu authored
Several changes in this patch, partially bug fixes, partially new code: o bug fixes in ZipDataflow - added some checks to verify that facts converge - removed some erroneous checks of convergence on entry nodes - added some missing applications of transfer functions o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow) o started stack layout changes - no longer generating CopyIn and CopyOut nodes (not yet fully expunged though) - still not using proper calling conventions o simple new optimizations: - common block elimination -- have not yet tried to move the Adams opt out of CmmProcPointZ - block concatenation o piped optimization fuel up to the HscEnv - can be limited by a command-line flag - not tested, and probably not yet properly used by clients o added unique supply to FuelMonad, also lifted unique supply to DFMonad
-
- 03 May, 2008 2 commits
-
-
Ian Lynagh authored
If the value is > 2^63 then we need to work out its value mod 2pi, and apply the operation to that instead.
-
nr@eecs.harvard.edu authored
C-- no longer has 'hints'; to guide parameter passing, it has 'kinds'. Renamed type constructor, data constructor, and record fields accordingly
-
- 12 Apr, 2008 1 commit
-
-
Ian Lynagh authored
-
- 29 Mar, 2008 1 commit
-
-
Ian Lynagh authored
-
- 07 Feb, 2008 2 commits
-
-
Duncan Coutts authored
So when the next person compiles the Sparc NCG it should fail more obviously at compile time rather than panicing at runtime. Plus one obvious fix for LocalReg gaining an extra param Missing bits of Sparc NCG: * genSwitch for generating jump tables. This is the most tricky one. * ALLOCATABLE_REGS_INTEGER and ALLOCATABLE_REGS_DOUBLE just requires finding and verifying the values. The nearby comment describes how. * isRegRegMove and mkRegRegMoveInstr. Sparc uses Or for int move, check what this is supposed to do for single and double float types. * regDotColor. Probably just copy the ppc impl.
-
Simon Marlow authored
-
- 13 Jan, 2008 1 commit
-
-
Ian Lynagh authored
Split off a FastBool module, to avoid a circular import with Panic
-
- 04 Jan, 2008 1 commit
-
-
Isaac Dupree authored
This allows the instance of UserOfLocalRegs to be within Haskell98, and IMHO makes the code a little cleaner generally. This is one small (though tedious) step towards making GHC's code more portable...
-
- 03 Dec, 2007 1 commit
-
-
Ian Lynagh authored
The old ones caused lots of unknown scattered relocation type 4 errors. Patch from Chris Kuklewicz.
-
- 21 Sep, 2007 1 commit
-
-
Ian Lynagh authored
Fixes building with -Werror (i.e. validate) and GHC < 6.6
-
- 12 Sep, 2007 1 commit
-
-
Clemens Fruhwirth authored
binutils <2.17 can't generate PC64 relocations for x86_64. Hence we emit only 32 bit PC relative offsets, and artifically stick a zero in front of them to make them 64 bit (see PprMach.sh ppr_item in pprDataItem). This works as long as the offset is <32bit AND it's positive. This is not the case for offsets in jump tables, they are all negative. This hack sign extends them with a MOVSXL instruction into the dead index register, then adding the properly sign extended offset to the jump table base label giving the correct target address for the following jump.
-
- 07 Sep, 2007 1 commit
-
-
nr@eecs.harvard.edu authored
I've renamed a number of type and data constructors within Cmm so that the names used in the compiler may more closely reflect the C-- specification 2.1. I've done a bit of other renaming as well. Highlights: CmmFormal and CmmActual now bear a CmmKind (which for now is a MachHint as before) CmmFormals = [CmmFormal] and CmmActuals = [CmmActual] suitable changes have been made to both code and nonterminals in the Cmm parser (which is as yet untested) For reasons I don't understand, parts of the code generator use a sequence of 'formal parameters' with no C-- kinds. For these we now have the types type CmmFormalWithoutKind = LocalReg type CmmFormalsWithoutKinds = [CmmFormalWithoutKind] A great many appearances of (Tau, MachHint) have been simplified to the appropriate CmmFormal or CmmActual, though I'm sure there are more opportunities. Kind and its data constructors are now renamed to data GCKind = GCKindPtr | GCKindNonPtr to avoid confusion with the Kind used in the type checker and with CmmKind. Finally, in a somewhat unrelated bit (and in honor of Simon PJ, who thought of the name), the Whalley/Davidson 'transaction limit' is now called 'OptimizationFuel' with the net effect that there are no longer two unrelated uses of the abbreviation 'tx'.
-
- 05 Sep, 2007 1 commit
-
-
nr@eecs.harvard.edu authored
The type parameter to a C-- procedure now represents a control-flow graph, not a single instruction. The newtype ListGraph preserves the current representation while enabling other representations and a sensible way of prettyprinting. Except for a few changes in the prettyprinter the new compiler binary should be bit-for-bit identical to the old.
-
- 04 Sep, 2007 1 commit
-
-
Ian Lynagh authored
-
- 03 Sep, 2007 1 commit
-
-
Ian Lynagh authored
Older GHCs can't parse OPTIONS_GHC. This also changes the URL referenced for the -w options from WorkingConventions#Warnings to CodingStyle#Warnings for the compiler modules.
-
- 01 Sep, 2007 1 commit
-
-
Ian Lynagh authored
-
- 20 Aug, 2007 1 commit
-
-
nr@eecs.harvard.edu authored
-
- 09 Aug, 2007 1 commit
-
-
simonpj@microsoft.com authored
This patch should have no effect; it's mainly comments, layout, plus this contructor name change.
-
- 31 Jul, 2007 1 commit
-
-
Clemens Fruhwirth authored
Instead of attaching the information whether a Label is going to be accessed dynamically or not (distinction between IdLabel/DynLabel and additional flags in ModuleInitLabel and PlainModuleInitLabel), we hand dflags through the CmmOpt monad and the NatM monad. Before calling labelDynamic in PositionIndependentCode, we extract thisPackage from dflags and supply the current package to labelDynamic, so it can take this information into account instead of extracting it from the labels itself. This simplifies a lot of code in codeGen that just hands through this_pkg.
-
- 27 Jul, 2007 1 commit
-
-
Simon Marlow authored
This patch implements pointer tagging as per our ICFP'07 paper "Faster laziness using dynamic pointer tagging". It improves performance by 10-15% for most workloads, including GHC itself. The original patches were by Alexey Rodriguez Yakushev <mrchebas@gmail.com>, with additions and improvements by me. I've re-recorded the development as a single patch. The basic idea is this: we use the low 2 bits of a pointer to a heap object (3 bits on a 64-bit architecture) to encode some information about the object pointed to. For a constructor, we encode the "tag" of the constructor (e.g. True vs. False), for a function closure its arity. This enables some decisions to be made without dereferencing the pointer, which speeds up some common operations. In particular it enables us to avoid costly indirect jumps in many cases. More information in the commentary: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
-
- 10 Jul, 2007 1 commit
-
-
andy@galois.com authored
The rts was failing with ../compiler/ghc-inplace -H64m -Onot -fasm -optc-O2 -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -hisuf thr_p_hi -hcsuf thr_p_hc -osuf thr_p_o -optc-DTHREADED_RTS -prof -#include posix/Itimer.h -c PrimOps.cmm -o PrimOps.thr_p_o ghc-6.7.20070709: panic! (the 'impossible' happened) (GHC version 6.7.20070709 for powerpc-apple-darwin): iselExpr64(powerpc) %MO_U_Conv_I32_I64(16 / 4 - 2) There was a special case for x86; so it has been transliterated to the PPC, and the output code looks plausable.
-
- 08 Jul, 2007 1 commit
-
-
andy@galois.com authored
-
- 05 Jul, 2007 1 commit
-
-
Michael D. Adams authored
-
- 28 Jun, 2007 1 commit
-
-
Simon Marlow authored
-
- 27 Jun, 2007 4 commits
-
-
Michael D. Adams authored
-
Michael D. Adams authored
This is a fairly complete implementation, however two 'panic's have been placed in the critical path where the implementation is still a bit lacking so do not expect it to run quite yet. One call to panic is because we still need to create a GC block for procedures that don't have them yet. (cmm/CmmCPS.hs:continuationToProc) The other is due to the need to convert from a ContinuationInfo to a CmmInfo. (codeGen/CgInfoTbls.hs:emitClosureCodeAndInfoTable) (codeGen/CgInfoTbls.hs:emitReturnTarget)
-
Michael D. Adams authored
-
Michael D. Adams authored
This version should compile but is still incomplete as it introduces potential bugs at the places marked 'TODO FIXME NOW'. It is being recorded to help keep track of changes.
-
- 25 May, 2007 1 commit
-
-
Michael D. Adams authored
This frees the Cmm data type from keeping a list of live global registers in CmmCall which helps prepare for the CPS conversion phase. CPS conversion does its own liveness analysis and takes input that should not directly refer to parameter registers (e.g. R1, F5, D3, L2). Since these are the only things which could occur in the live global register list, CPS conversion makes that field of the CmmCall constructor obsolite. Once the CPS conversion pass is fully implemented, global register saving will move from codeGen into the CPS pass. Until then, this patch is worth scrutinizing and testing to ensure it doesn't cause any performance or correctness problems as the code passed to the backends by the CPS converting will look very similar to the code that this patch makes codeGen pass to the backend.
-
- 26 Jun, 2007 1 commit
-
-
Simon Marlow authored
-
- 13 Jun, 2007 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
I guess we have a missing test... I'll add one
-
- 18 May, 2007 1 commit
-
-
Simon Marlow authored
See comments with shift_code
-
- 03 May, 2007 1 commit
-
-
Ian Lynagh authored
cvts[sd]2siq? -> cvtts[sd]2siq?
-
- 01 Mar, 2007 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
We had a pattern that matched (base+(index<<N)), but not (base+(index<<N)+M).
-