summaryrefslogtreecommitdiff
path: root/compiler/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* rewrite branchChainElim; other refactoring in CmmContFlowOptSimon Marlow2011-08-251-1/+7
|
* Snapshot of codegen refactoring to share with simonpjSimon Marlow2011-08-251-0/+1
|
* enhance ArchARM with ISA and ISA extensionsKarel Gardas2011-08-211-2/+41
| | | | | | | This patch enhances ArchARM with ARM ISA and ISA extensions details as is suggested in the comment in Platform.hs file. The patch is needed by future patch which will use ARM ISA information in order to pass appropriate command-line option to the LLVM llc tool.
* Add a case for kfreebsdgnu in Platforms.hsIan Lynagh2011-08-071-0/+2
|
* Add ListSetOps.removeRedundantSimon Peyton Jones2011-08-021-1/+20
| | | | It's needed in ghc/InteractiveUI, although not in the compiler itself
* Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-291-7/+3
|\
| * Add CoreMonad.reinitializeGlobals so plugins can work around linker issuesMax Bolingbroke2011-07-291-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a plugin is loaded, it currently gets linked against a *newly loaded* copy of the GHC package. This would not be a problem, except that the new copy has its own mutable state that is not shared with that state that has already been initialized by the original GHC package. This leads to loaded plugins calling GHC code which pokes the static flags, and then dying with a panic because the static flags *it* sees are uninitialized. There are two possible solutions: 1. Export the symbols from the GHC executable from the GHC library and link against this existing copy rather than a new copy of the GHC library 2. Carefully ensure that the global state in the two copies of the GHC library matches I tried 1. and it *almost* works (and speeds up plugin load times!) except on Windows. On Windows the GHC library tends to export more than 65536 symbols (see #5292) which overflows the limit of what we can export from the EXE and causes breakage. (Note that if the GHC exeecutable was dynamically linked this wouldn't be a problem, because we could share the GHC library it links to.) We are going to try 2. instead. Unfortunately, this means that every plugin will have to say `reinitializeGlobals` before it does anything, but never mind. I've threaded the cr_globals through CoreM rather than giving them as an argument to the plugin function so that we can turn this function into (return ()) without breaking any plugins when we eventually get 1. working.
* | Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-281-1/+4
|\ \ | |/
| * Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2011-07-279-35/+179
| |\ | | | | | | | | | | | | | | | Conflicts: compiler/coreSyn/CoreSubst.lhs compiler/rename/RnNames.lhs
| * | White space and commentsSimon Peyton Jones2011-07-271-1/+4
| | |
* | | Add "alter" functions to UniqFM, VarEnv, NameEnvSimon Peyton Jones2011-07-281-2/+9
| |/ |/| | | | | I need these for a trie data structure I'm working on
* | Sync the typeable fingerprinting with baseIan Lynagh2011-07-221-2/+18
| |
* | Comments onlySimon Peyton Jones2011-07-221-0/+1
| |
* | Implement a findCycle function in Digraph,Simon Peyton Jones2011-07-222-9/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and use it to report module loops nicely This fixes Trac #5307. Now we get Module imports form a cycle: module `M8' (.\M8.hs) imports `M1' (M1.hs) which imports `M9' (.\M9.hs-boot) which imports `M8' (.\M8.hs) And the algorithm is linear time.
* | More work towards cross-compilationIan Lynagh2011-07-152-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | There's now a variant of the Outputable class that knows what platform we're targetting: class PlatformOutputable a where pprPlatform :: Platform -> a -> SDoc pprPlatformPrec :: Platform -> Rational -> a -> SDoc and various instances have had to be converted to use that class, and we pass Platform around accordingly.
* | omit the local MD5 implementation if we can get it fromSimon Marlow2011-07-122-15/+27
| | | | | | | | GHC.Fingerprint in base instead.
* | derive Typeable (eliminate deprecation warnings for mkTyCon)Simon Marlow2011-07-122-9/+4
| |
* | fix Binary instance for TyCon following Typeable implementationSimon Marlow2011-07-121-0/+12
| | | | | | | | changes
* | move computeFingerprint from MkIface to BinarySimon Marlow2011-07-121-0/+14
|/
* New functionality required for the supercompiler pluginMax Bolingbroke2011-06-292-1/+34
|
* Fix to use %note instead of @note as an ELF section note on ARM architectureKarel Gardas2011-06-271-0/+4
| | | | | | | | It looks like where x86 assembly is using '@' character, ARM assembly requires '%' character. This makes a problem in the patch 814edf44433801e37318ce79082ac6991dbc87dd 'Force re-linking if the options have changed (#4451)' which makes linking assembly file uncompilable on ARM. This patch fixes this.
* SafeHaskell: Make base GHC.* modules untrustedDavid Terei2011-06-177-44/+6
|
* SafeHaskell: Fix imports of base when base unsafeDavid Terei2011-06-172-4/+9
|
* SafeHaskell: Fix validation errors when unsafe base usedDavid Terei2011-06-172-2/+4
|
* SafeHaskell: Fix validation errors when Safe base used.David Terei2011-06-173-4/+16
|
* SafeHaskell: Even more fixing to work with safe baseDavid Terei2011-06-172-1/+2
|
* SafeHaskell: More fixing to work with safe baseDavid Terei2011-06-172-7/+8
|
* SafeHaskell: Update to work with safe baseDavid Terei2011-06-176-4/+30
|
* SafeHaskell: Fix recompilation avoidance to take Safe into account.David Terei2011-06-171-0/+9
|
* Fill out the osElfTarget definitionIan Lynagh2011-06-081-4/+7
| | | | | For now we panic in the OSUnknown case. It would probably be better to make the enumerations complete instead, though.
* Add a target32Bit function to PlatformIan Lynagh2011-06-081-0/+13
|
* Remove out-of-date commentIan Lynagh2011-06-081-1/+0
|
* Whitespace only in utils/Platform.hsIan Lynagh2011-06-081-46/+46
|
* Add an ArchUnknown constructor to the arch typeIan Lynagh2011-05-311-2/+3
| | | | | Fixes build problems on platforms for which we did not have and Arch constructor.
* Unix line endings for Pair.lhsSimon Peyton Jones2011-05-121-46/+46
|
* Merge ghc-new-co into master branchSimon Peyton Jones2011-05-091-0/+47
|\
| * Merge remote branch 'origin/master' into ghc-new-coSimon Peyton Jones2011-04-305-11/+49
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcErrors.lhs compiler/typecheck/TcSMonad.lhs compiler/typecheck/TcType.lhs compiler/types/TypeRep.lhs
| * | This BIG PATCH contains most of the work for the New Coercion RepresentationSimon Peyton Jones2011-04-191-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms
* | | Merge branch 'coloured-core' of https://github.com/nominolo/ghc into ↵coloured-coreIan Lynagh2011-05-082-99/+189
|\ \ \ | | | | | | | | | | | | coloured-core
| * | | Make SDoc an abstract type.Thomas Schilling2011-04-101-110/+118
| | | |
| * | | Start support for coloured SDoc output.Thomas Schilling2011-04-071-36/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SDoc type now passes around an abstract SDocContext rather than just a PprStyle which required touching a few more files. This should also make it easier to integrate DynFlags passing, so that we can get rid of global variables.
| * | | Add zeroWidthText to Pretty.Thomas Schilling2011-04-031-1/+6
| | | |
* | | | Move Platform from compiler/nativeGen to compiler/utilsIan Lynagh2011-05-071-0/+104
| |_|/ |/| | | | | | | | We want to use it across the whole compiler now
* | | Derive some Typeable instancesIan Lynagh2011-04-241-2/+1
| | | | | | | | | | | | | | | We were using the Typeable.hs macros, but for no good reason as far as I can tell.
* | | Rename "extra-gcc-opts" to "settings", and start generalising itIan Lynagh2011-04-211-0/+14
| | |
* | | Add pprDefiniteTrace and use itSimon Peyton Jones2011-04-201-1/+4
| | | | | | | | | | | | | | | | | | The point here is that a very few uses of pprTrace are controlled by a flag like -ddump-inlinings or -ddump-rule-firings, and we want to see that output even with -dno-debug-output
* | | Add adjustUFM, adjustUFM_Directly and joinUFM to UniqFM.Edward Z. Yang2011-04-132-8/+30
| |/ |/| | | | | | | | | | | Renamed adjustUFM in GraphOps to adjustUFM_C, to account for alternate argument order. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* | Implement mapUFM_Directly.Edward Z. Yang2011-04-111-1/+3
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* | Force re-linking if the options have changed (#4451)Simon Marlow2011-04-081-2/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common sequence of commands (at least for me) is this: $ ghc hello 1 of 1] Compiling Main ( hello.hs, hello.o ) Linking hello ... $ ./hello +RTS -s hello: Most RTS options are disabled. Link with -rtsopts to enable them. $ ghc hello -rtsopts $ grr, nothing happened. I could use -fforce-recomp, but if this was a large program I probably don't want to recompile it all again, so: $ rm hello removed `hello' $ ghc hello -rtsopts Linking hello ... $ ./hello +RTS -s ./hello +RTS -s Hello World! 51,264 bytes allocated in the heap 2,904 bytes copied during GC 43,808 bytes maximum residency (1 sample(s)) 17,632 bytes maximum slop etc. With this patch, GHC notices when the options have changed and forces a relink, so you don't need to rm the binary or use -fforce-recomp. This is done by adding the pertinent stuff to the binary in a special section called ".debug-ghc-link-info": $ readelf -p .debug-ghc-link-info ./hello String dump of section 'ghc-linker-opts': [ 0] (["-lHSbase-4.3.1.0","-lHSinteger-gmp-0.2.0.2","-lgmp","-lHSghc-prim-0.2.0.0","-lHSrts","-lm","-lrt","-ldl","-u","ghczmprim_GHCziTypes_Izh_static_info","-u","ghczmprim_GHCziTypes_Czh_static_info","-u","ghczmprim_GHCziTypes_Fzh_static_info","-u","ghczmprim_GHCziTypes_Dzh_static_info","-u","base_GHCziPtr_Ptr_static_info","-u","base_GHCziWord_Wzh_static_info","-u","base_GHCziInt_I8zh_static_info","-u","base_GHCziInt_I16zh_static_info","-u","base_GHCziInt_I32zh_static_info","-u","base_GHCziInt_I64zh_static_info","-u","base_GHCziWord_W8zh_static_info","-u","base_GHCziWord_W16zh_static_info","-u","base_GHCziWord_W32zh_static_info","-u","base_GHCziWord_W64zh_static_info","-u","base_GHCziStable_StablePtr_static_info","-u","ghczmprim_GHCziTypes_Izh_con_info","-u","ghczmprim_GHCziTypes_Czh_con_info","-u","ghczmprim_GHCziTypes_Fzh_con_info","-u","ghczmprim_GHCziTypes_Dzh_con_info","-u","base_GHCziPtr_Ptr_con_info","-u","base_GHCziPtr_FunPtr_con_info","-u","base_GHCziStable_StablePtr_con_info","-u","ghczmprim_GHCziTypes_False_closure","-u","ghczmprim_GHCziTypes_True_closure","-u","base_GHCziPack_unpackCString_closure","-u","base_GHCziIOziException_stackOverflow_closure","-u","base_GHCziIOziException_heapOverflow_closure","-u","base_ControlziExceptionziBase_nonTermination_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnMVar_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnSTM_closure","-u","base_ControlziExceptionziBase_nestedAtomically_closure","-u","base_GHCziWeak_runFinalizzerBatch_closure","-u","base_GHCziTopHandler_runIO_closure","-u","base_GHCziTopHandler_runNonIO_closure","-u","base_GHCziConcziIO_ensureIOManagerIsRunning_closure","-u","base_GHCziConcziSync_runSparks_closure","-u","base_GHCziConcziSignal_runHandlers_closure","-lHSffi"],Nothing,RtsOptsAll,False,[],[]) And GHC itself uses the readelf command to extract it when deciding whether to relink. The reason for the name ".debug-ghc-link-info" is that sections beginning with ".debug" are removed automatically by strip. This currently only works on Linux; Windows and OS X still have the old behaviour.
* Added a VECTORISE pragmaManuel M T Chakravarty2011-02-201-1/+7
| | | | | | | | | | | | | | | - Added a pragma {-# VECTORISE var = exp #-} that prevents the vectoriser from vectorising the definition of 'var'. Instead it uses the binding '$v_var = exp' to vectorise 'var'. The vectoriser checks that the Core type of 'exp' matches the vectorised Core type of 'var'. (It would be quite complicated to perform that check in the type checker as the vectorisation of a type needs the state of the VM monad.) - Added parts of a related VECTORISE SCALAR pragma - Documented -ddump-vect - Added -ddump-vt-trace - Some clean up