summaryrefslogtreecommitdiff
path: root/compiler/main
Commit message (Collapse)AuthorAgeFilesLines
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-013-3/+3
|
* Make lazy unlifted bindings an error by default.Austin Seipp2013-09-291-2/+2
| | | | | | | | | | This was supposed to happen a long time ago, but later is better than never. This makes `-fwarn-lazy-unlifted-bindings` into a no-op (with its own warning) to be removed in GHC 7.10. This fixes #8022. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Catch potential garbage after -msse.Geoffrey Mainland2013-09-231-1/+2
|
* Enable -msse to be specified by itself.Geoffrey Mainland2013-09-223-7/+13
| | | | This sets the SSE "version" to 1.0.
* By default, only pass 128-bit SIMD vectors in registers on X86-64.Geoffrey Mainland2013-09-221-0/+2
| | | | | | | LLVM's GHC calling convention only allows 128-bit SIMD vectors to be passed in machine registers on X86-64. This may change in LLVM 3.4; the hidden flag -fllvm-pass-vectors-in-regs causes all SIMD vector widths to be passed in registers on both X86-64 and on X86-32.
* Add support for -mavx512* flags.Geoffrey Mainland2013-09-222-6/+45
|
* Set LLVM option -stack-alignment=32 when compiling AVX instructions.Geoffrey Mainland2013-09-221-1/+7
|
* Add support for -mavx and -mavx2 flags.Geoffrey Mainland2013-09-222-3/+27
|
* Restructure compilation pipeline to allow hooksAustin Seipp2013-09-2211-170/+346
| | | | | | | | | | | | | | | | This commit exposes GHC's internal compiler pipeline through a `Hooks` module in the GHC API. It currently allows you to hook: * Foreign import/exports declarations * The frontend up to type checking * The one shot compilation mode * Core compilation, and the module iface * Linking and the phases in DriverPhases.hs * Quasiquotation Authored-by: Luite Stegeman <stegeman@gmail.com> Authored-by: Edsko de Vries <edsko@well-typed.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Restore old names of comparison primopsJan Stolarek2013-09-181-1/+1
| | | | | | | | | | | | In 6579a6c we removed existing comparison primops and introduced new ones returning Int# instead of Bool. This commit (and associated commits in array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and template-haskell) restores old names of primops. This allows us to keep our API cleaner at the price of not having backwards compatibility. This patch also temporalily disables fix for #8317 (optimization of tagToEnum# at Core level). We need to fix #8326 first, otherwise our primops code will be very slow.
* Trailing whitespacesJan Stolarek2013-09-181-14/+14
|
* Add flag to control loopificationJan Stolarek2013-09-181-1/+3
| | | | | It is off by default, which is meant to be a workaround for #8275. Once #8275 is fixed we will enable this option by default.
* Distinguish between hs-main cases when giving rtsopts advice.Edward Z. Yang2013-09-151-0/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Rename -ddump-cmm-rewrite to -ddump-cmm-sinkJan Stolarek2013-09-131-2/+2
| | | | This makes it consistent with the corresponding -cmm-sink flag
* Add support for evaluation of type-level natural numbers.Iavor S. Diatchki2013-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements some simple evaluation of type-level expressions featuring natural numbers. We can evaluate *concrete* expressions that use the built-in type families (+), (*), (^), and (<=?), declared in GHC.TypeLits. We can also do some type inference involving these functions. For example, if we encounter a constraint such as `(2 + x) ~ 5` we can infer that `x` must be 3. Note, however, this is used only to resolve unification variables (i.e., as a form of a constraint improvement) and not to generate new facts. This is similar to how functional dependencies work in GHC. The patch adds a new form of coercion, `AxiomRuleCo`, which makes use of a new form of axiom called `CoAxiomRule`. This is the form of evidence generate when we solve a constraint, such as `(1 + 2) ~ 3`. The patch also adds support for built-in type-families, by adding a new form of TyCon rhs: `BuiltInSynFamTyCon`. such built-in type-family constructors contain a record with functions that are used by the constraint solver to simplify and improve constraints involving the built-in function (see `TcInteract`). The record in defined in `FamInst`. The type constructors and rules for evaluating the type-level functions are in a new module called `TcTypeNats`.
* Implement the AMP warning (#8004)Austin Seipp2013-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a warning when definitions conflict with the Applicative-Monad Proposal (AMP), described in #8004. Namely, this will cause a warning iff: * You have an instance of Monad, but not Applicative * You have an instance of MonadPlus, but not Alternative * You locally defined a function named join, <*>, or pure. In GHC 7.10, these warnings will actually be enforced with superclass constraints through changes in base, so programs will fail to compile then. This warning is enabled by default. Unfortunately, not all of our upstream libraries have accepted the appropriate patches. So we temporarily fix ./validate by ignoring the AMP warning. Dan Rosén made an initial implementation of this change, and the remaining work was finished off by David Luposchainsky. I finally made some minor refactorings. Authored-by: Dan Rosén <danr@chalmers.se> Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix AMP warnings.Austin Seipp2013-09-114-3/+38
| | | | | Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix ./validate with GHC 7.6 as bootstrap compiler.Austin Seipp2013-09-091-0/+4
| | | | | | | | | 7.6 deprecated the Control.Concurrent.QSem module (to be removed later,) but according to Patrick it was actually un-deprecated. As a result, validate fails if your bootstrap compiler is 7.6, since it throws a DEPRECATED warning. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Merge branch 'ghc-parmake-gsoc' (#910)Patrick Palka2013-09-094-63/+526
|\
| * Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocghc-parmake-gsocPatrick Palka2013-09-082-10/+23
| |\
| * | Have `ghc --info` report support for parallel --makePatrick Palka2013-09-061-0/+1
| | |
| * | Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocPatrick Palka2013-09-062-2/+16
| |\ \
| * \ \ Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocPatrick Palka2013-09-042-30/+20
| |\ \ \
| * | | | Retain boot modules in getModLoopPatrick Palka2013-08-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parallel upsweep needs to know about _all_ the modules that make up a module loop in order to correctly determine a module's external loop dependencies. Otherwise, incorrect dependency information may be computed, resulting in an eventual deadlock during compilation. So don't filter boot modules in getModLoop, and instead have its callers filter them when needed. Following this change, GHC could compile itself via --make -O2 -j. Yay!
| * | | | Rename DynFlags.parUpsweepNum to parMakeCountPatrick Palka2013-08-302-5/+5
| | | | |
| * | | | Merge branch 'master' into ghc-parmake-gsocPatrick Palka2013-08-307-51/+119
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/main/DynFlags.hs compiler/utils/FastString.lhs
| * | | | | Pass a DynFlags argument explicitly to typecheckLoopPatrick Palka2013-08-271-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the parallel upsweep, typecheckLoop has to use a different DynFlags than the one in its HscEnv argument so that the debug message in typecheckLoop will be outputted in order.
| * | | | | Properly handle import loops in the parallel upsweepPatrick Palka2013-08-261-48/+132
| | | | | |
| * | | | | Implement the parallel upsweep (#910)Patrick Palka2013-08-262-3/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parallel upsweep is the parallel counterpart to the default sequential upsweep. It attempts to compile modules in parallel by subdividing the work of the upsweep into parts that can be executed concurrently by multiple Haskell threads. In order to enable the parallel upsweep, the user has to pass the -jN flag to GHC, where N is an optional number denoting the number of jobs, or modules, to compile in parallel, like with GNU make. In GHC this just sets the number of capabilities to N.
| * | | | | TcEnv: Make mkWrapperName deterministic and thread-safePatrick Palka2013-08-261-2/+2
| | | | | |
| * | | | | TidyPgm: Atomically update the NameCache in tidyTopNamePatrick Palka2013-08-261-7/+3
| | | | | |
| * | | | | SysTools: make various functions thread-safePatrick Palka2013-08-262-41/+68
| | | | | |
* | | | | | Remove -fwarn-typeable-instancesJose Pedro Magalhaes2013-09-091-4/+1
| |_|_|_|/ |/| | | |
* | | | | resurrected -fdicts-strict, off by defaultNicolas Frisby2013-09-082-9/+7
| | | | | | | | | | | | | | | | | | | | also added -fdmd-tx-dict-sel, on by default
* | | | | Add basic support for GHCJSAustin Seipp2013-09-061-1/+16
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch encompasses most of the basic infrastructure for GHCJS. It includes: * A new extension, -XJavaScriptFFI * A new architecture, ArchJavaScript * Parser and lexer support for 'foreign import javascript', only available under -XJavaScriptFFI, using ArchJavaScript. * As a knock-on, there is also a new 'WayCustom' constructor in DynFlags, so clients of the GHC API can add custom 'tags' to their built files. This should be useful for other users as well. The remaining changes are really just the resulting fallout, making sure all the cases are handled appropriately for DynFlags and Platform. Authored-by: Luite Stegeman <stegeman@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | | | Fix annoying iOS linker warnings (#8208)Austin Seipp2013-09-042-2/+16
| |_|/ |/| | | | | | | | | | | Authored-by: Luke Iannini <lukexi@me.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | | Improve Linting in GHCi (fixes Trac #8215)Simon Peyton Jones2013-09-032-30/+20
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original problem was that we weren't bringing varaibles bound in the interactive context into scope before Linting the result of a top-level declaration in GHCi. (We were doing this for expressions.) Moreover I found that we weren't Linting the result of desugaring a GHCi expression, which we really should be doing. It took me a bit of time to unravel all this, and I did some refactoring to make it easier next time. * CoreMonad contains the Lint wrappers that get the right environments into place. It always had endPass and lintPassResult (which Lints bindings), but now it has lintInteractiveExpr. * Both use a common function CoreMonad.interactiveInScope to find those in-scope variables. Quite a bit of knock-on effects from this, but nothing exciting.
* | Export languageExtensions as part of the API.Jan Stolarek2013-08-301-6/+7
| | | | | | | | Fixes #8200
* | simplified the .hi format and added the -flate-dmd-anal flag (fixes #7782)Nicolas Frisby2013-08-292-5/+5
| | | | | | | | cf http://ghc.haskell.org/trac/ghc/wiki/LateDmd
* | Display the full type environment when reporting type holesSimon Peyton Jones2013-08-291-0/+6
| | | | | | | | | | | | | | This fixes Trac #8191. The patch also adds and documents a new flag -fmax-relevant-bindings=N which lets you control how many bindings in the type environment are shown.
* | Fix validate failure.Austin Seipp2013-08-281-1/+1
| | | | | | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Implement -XNumDecimals (#7266)Austin Seipp2013-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under -XNumDecimals, it's possible to specify an integer literal using compact "floating point" syntax for any floating literal constant which also happens to be an integer. This lets us write 1.2e6 :: Integer instead of: 1200000 :: Integer This also makes some amendments to the users guide. Authored-by: Shachaf Ben-Kiki <shachaf@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Applicative instance for Ghc and GhcTDan Frumin2013-08-281-0/+8
| | | | | | | | | | | | Fixes #8175. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Rework how iOS does linking (#8127)Austin Seipp2013-08-285-42/+93
|/ | | | | | | | | | | | | | | | | | | | | | | | iOS has some particular constraints about how applications can be built: * We must generate a static library (.a) since XCode does the final link. * We need to carefully give the right set of arguments to libtool in the case we're generating an archive. * Dynamic linking isn't supported. * It can only be done on OS X. This patch cleans up all of the above. We add a new flag `-staticlib` (only supported on Darwin) that allows us to produce archive files using libtool, and a -pgmlibtool flag to control which 'libtool' executable to use. This fixes #8127. I believe this is the last piece missing from the iOS cross compiler. Authored-by: Luke Iannini <lukexi@me.com> Authored-by: Maxwell Swadling <maxwellswadling@gmail.com> Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Actually, split that last comment a bit.Austin Seipp2013-08-221-4/+6
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Add some more comments to UsageFile.Austin Seipp2013-08-221-1/+8
| | | | | | This brings them up to date with the changes in #8144. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Remove trailing whitespace from HscTypesAustin Seipp2013-08-221-7/+6
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix interface hashes including time stamp of dependent files.Niklas Hambüchen2013-08-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Fixes #8144. Before, the modification time of e.g. #included files (and everything that ends up as a UsageFile, e.g. via addDependentFile) was taken as input for the interface hash of a module. This lead to different hashes for identical inputs on every compilation. We now use file content hashes instead. This changes the interface file format. You will get "Binary.get(Usage): 50" when you try to do an incremental using .hi files that were created with a GHC 7.7 (only) older than this commit. To calculate the md5 hash (`Fingerprint`) of a file in constant space, there now is GHC.Fingerprint.getFileHash, and a fallback version for older GHCs that needs to load the file into memory completely (only used when compiling stage1 with an older GHC). Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Only add -O to C compilations if there was -O on the command lineSimon Marlow2013-08-221-3/+5
| | | | | | | | | | | | In 1e2b3780ebc40d28cd0f029b90df102df09e6827 I changed the option ordering for C compilations. A side effect was that -optc options came before the automatic -O we were adding, which made it so that the -debug RTS was getting optimised when it shouldn't have been. Perhaps we shouldn't have automatic -O options added to C compilations. But that might cause problems for build systems that are relying on the current behaviour, so I've made a minor change instead: now C optimisation level == Haskell optimisation level.
* iOS: generate archive files when compiling.Austin Seipp2013-08-141-5/+6
| | | | | | | | | | | When cross compiling to iOS, we generate archive files which are linked into the final executable. We already *did* generate archive files - just with the wrong suffix. Fixes #8125. Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>