summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the GHC package DLL-splittingIan Lynagh2013-05-141-2/+29
| | | | | | | There's now an internal -dll-split flag, which we use to tell GHC how the GHC package is split into 2 separate DLLs. This is used by Packages.isDllName to determine whether a call is within the same DLL, or whether it is a call to another DLL.
* Make -fno-flat-cache use a dynamic, rather than static, flagIan Lynagh2013-05-101-0/+3
|
* Enable -funbox-small-strict-fields by defaultJohan Tibell2013-04-301-0/+1
| | | | | | | | The flag shows no real impact on nofib benchmarks and GHC itself, which is expected given the small number of strict but not already unpacked fields in the source of these programs. However, the flag allows us to omit most of the UNPACK pragmas that are so common in source code today.
* Remove extCoreName from DynFlagsIan Lynagh2013-04-261-2/+0
| | | | We now just pass the filename as an argument
* Remove DynFlags's hscOutName fieldIan Lynagh2013-04-261-2/+0
| | | | We now just pass the output filename as an argument instead
* "ghc --info" now claims has "Support dynamic-too" as "YES"Ian Lynagh2013-04-261-2/+1
|
* Fix "-dynamic-too --make"; fixes #7864Ian Lynagh2013-04-261-1/+2
|
* Mark -dynamic-too as unsupported for nowIan Lynagh2013-04-261-1/+2
| | | | It doesn't work with --make yet. Trac #7864 filed.
* Add a "Support dynamic-too" field to the --info outputIan Lynagh2013-04-251-0/+1
| | | | This is always "YES".
* Fix the dynflags consistency codeIan Lynagh2013-04-151-1/+1
| | | | | | | | It was checking to see whether the hscTarget is HscC or HscLlvm, and changing it to HscC otherwise. But this meant that as well as rejecting HscAsm, it also rejected HscInterpreted and HscNothing. Now we just check whether it's HscAsm.
* ignore RealWorld in size_expr; flag to keep w/w from creating sharingNicolas Frisby2013-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | size_expr now ignores RealWorld lambdas, arguments, and applications. Worker-wrapper previously removed all lambdas from a function, if they were all unused. Removing *all* value lambdas is no longer allowed. Instead (\_ -> E) will become (\_void -> E), where it used to become E. The previous behavior can be recovered via the new -ffun-to-thunk flag. Nofib notables: ---------------------------------------------------------------- Program O2 O2 newly ignoring RealWorld and not turning function closures into thunks ---------------------------------------------------------------- Allocations comp_lab_zift 333090392% -5.0% reverse-complem 155188304% -3.2% rewrite 15380888% +4.0% boyer2 3901064% +7.5% rewrite previously benefited from fortunate LoopBreaker choice that is now disrupted. A function in boyer2 goes from $wonewayunify1 size 700 to size 650, thus gets inlined into rewritelemmas, thus exposing a parameter scrutinisation, thus allowing SpecConstr, which unfortunately involves reboxing. Run Time fannkuch-redux 7.89% -15.9% hpg 0.25% +5.6% wang 0.21% +5.8% /shrug
* ticky enhancementsNicolas Frisby2013-03-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * the new StgCmmArgRep module breaks a dependency cycle; I also untabified it, but made no real changes * updated the documentation in the wiki and change the user guide to point there * moved the allocation enters for ticky and CCS to after the heap check * I left LDV where it was, which was before the heap check at least once, since I have no idea what it is * standardized all (active?) ticky alloc totals to bytes * in order to avoid double counting StgCmmLayout.adjustHpBackwards no longer bumps ALLOC_HEAP_ctr * I resurrected the SLOW_CALL counters * the new module StgCmmArgRep breaks cyclic dependency between Layout and Ticky (which the SLOW_CALL counters cause) * renamed them SLOW_CALL_fast_<pattern> and VERY_SLOW_CALL * added ALLOC_RTS_ctr and _tot ticky counters * eg allocation by Storage.c:allocate or a BUILD_PAP in stg_ap_*_info * resurrected ticky counters for ALLOC_THK, ALLOC_PAP, and ALLOC_PRIM * added -ticky and -DTICKY_TICKY in ways.mk for debug ways * added a ticky counter for total LNE entries * new flags for ticky: -ticky-allocd -ticky-dyn-thunk -ticky-LNE * all off by default * -ticky-allocd: tracks allocation *of* closure in addition to allocation *by* that closure * -ticky-dyn-thunk tracks dynamic thunks as if they were functions * -ticky-LNE tracks LNEs as if they were functions * updated the ticky report format, including making the argument categories (more?) accurate again * the printed name for things in the report include the unique of their ticky parent as well as if they are not top-level
* Fix non-termination of SpecConstr (see #5550).Amos Robinson2013-03-281-0/+4
| | | | | ForceSpecConstr will now only specialise recursive types a finite number of times. There is a new option -fspec-constr-recursive, with a default value of 3.
* Fix the handling of ways, and in particular Opt_Static and Opt_SplitObjsIan Lynagh2013-03-221-15/+11
|
* Turn object splitting off when we use the dynamic wayIan Lynagh2013-03-221-1/+6
| | | | | There's no point splitting objects when we're going to be dynamically linking. Plus it breaks compilation on OSX x86.
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2013-03-191-0/+1
|\
| * Fix stage2 build on ARM.Austin Seipp2013-03-181-0/+1
| | | | | | | | | | | | LLVM supports PIC on ARM from what I can see. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Add support for OSX ld's -filelist flagIan Lynagh2013-03-181-0/+1
|/ | | | | Without it, when linking the split objects for Language.Haskell.TH.Syntax, the commandline was too long when listing all the files directly.
* Enable Opt_PIC for the dyn way regardless of OSes.PHO2013-03-171-14/+2
| | | | | | | We were previously enabling Opt_PIC on certain OSes namely Windows, Darwin and Linux, but it should always be enabled for the dyn way because it makes no sense to try to generate non-PIC dynamic libraries, which is usually impossible.
* Remove a bitrotted hack for OpenBSD and NetBSD regarding the dyn way.PHO2013-03-171-10/+2
| | | | | | | | | | | On OpenBSD and NetBSD, we were accidentally passing "-optl-pthread" to the gcc to build dynamic libraries because of a bitrotted hack for those OSes, which resulted in a weird situation where every dynamic library is named "ptl-pthread" and placed at "$(TOP)". The hack in question were to work around a linkage problem with libHSffi, but we no longer build it and just use libffi these days so the hack can safely be removed.
* Fix the handling of Opt_StaticIan Lynagh2013-03-161-15/+26
| | | | | There were some cases where we weren't unsetting it when turning the Dyn way on.
* A little polishingIan Lynagh2013-03-161-0/+6
|
* Set the way to 'dynamic' when running GHCi if GHCi is dynamically linkedIan Lynagh2013-03-151-4/+4
|
* By default, use the dynamic way for programs in the GHC treeIan Lynagh2013-03-151-0/+2
| | | | | In particular, this means that GHCi will use DLLs, rather than loading object files itself.
* Implement nullary type classes (#7642)Simon Peyton Jones2013-03-131-0/+2
| | | | | This is a slightly refined version of a patch by shachaf, done by Krzysztof Gogolewski <krz.gogolewski@gmail.com>.
* Re-enable a flag-consistency checkIan Lynagh2013-03-091-9/+6
| | | | I'm not sure why it caused problems before, but it's fine now.
* Remove a now-redundant hackIan Lynagh2013-03-091-11/+0
|
* Make AutoDeriveTypeable imply DeriveDataTypeableJose Pedro Magalhaes2013-03-081-0/+3
|
* Export dopt_set, dopt_unsetIan Lynagh2013-03-031-1/+5
| | | | We don't need them, but GHC API users might.
* Use unicode quote characters in error messages etc; fixes #2507Ian Lynagh2013-02-241-1/+14
| | | | We only use the unicode characters if the locale supports them.
* Add OverloadedLists, allowing list syntax to be overloadedSimon Peyton Jones2013-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This work was all done by Achim Krause <achim.t.krause@gmail.com> George Giorgidze <giorgidze@gmail.com> Weijers Jeroen <jeroen.weijers@uni-tuebingen.de> It allows list syntax, such as [a,b], [a..b] and so on, to be overloaded so that it works for a variety of types. The design is described here: http://hackage.haskell.org/trac/ghc/wiki/OverloadedLists Eg. you can use it for maps, so that [(1,"foo"), (4,"bar")] :: Map Int String The main changes * The ExplicitList constructor of HsExpr gets witness field * Ditto ArithSeq constructor * Ditto the ListPat constructor of HsPat Everything else flows from this.
* Implement poly-kinded TypeableJose Pedro Magalhaes2013-02-121-2/+8
| | | | | | | | | | | | | | This patch makes the Data.Typeable.Typeable class work with arguments of any kind. In particular, this removes the Typeable1..7 class hierarchy, greatly simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable language extension, which will automatically derive Typeable for all types and classes declared in that module. Since there is now no good reason to give handwritten instances of the Typeable class, those are ignored (for backwards compatibility), and a warning is emitted. The old, kind-* Typeable class is now called OldTypeable, and lives in the Data.OldTypeable module. It is deprecated, and should be removed in some future version of GHC.
* Split the PlatformConstants type off into its own moduleIan Lynagh2013-02-081-1/+1
|
* Add -fno-cse pragma in DynFlags.hs (fixes #7595)Jan Stolarek2013-02-081-0/+3
|
* Merge branch 'refs/heads/vect-avoid' into vect-avoid-mergeManuel M T Chakravarty2013-02-061-2/+3
|\ | | | | | | | | | | | | | | | | Conflicts: compiler/rename/RnSource.lhs compiler/simplCore/OccurAnal.lhs compiler/vectorise/Vectorise/Exp.hs NB: Merging instead of rebasing for a change. During rebase Git got confused due to the lack of the submodules in my quite old fork.
| * Remove '-favoid-vect' and add '-fvectorisation-avoidance'Manuel M T Chakravarty2013-02-051-4/+3
| | | | | | | | | | * By default '-fvectorisation-avoidance' is enabled at all optimisation levels (but it only matters in combination with '-fvectorise'). * The new vectoriser always uses vectorisation avoidance, but with '-fno-vectorisation-avoidance' it restricts it to simple scalar applications (and dictionary computations)
* | Use throwGhcExceptionIO rather than throwGhcException in main/DynFlags.hsIan Lynagh2013-01-301-5/+6
| |
* | StaticFlags code cleanup (fixes #7595)Jan Stolarek2013-01-281-3/+19
| | | | | | | | | | | | | | | | | | Function responsible for parsing the static flags, that were spread across two modules (StaticFlags and StaticFlagParser), are now in one file. This is analogous to dynamic flags parsing, which is also contained within a single module. Signed-off-by: David Terei <davidterei@gmail.com>
* | Allow -fllvm to be used when compiling unregisterised (#7622)Simon Marlow2013-01-251-1/+1
| |
* | If -msse is specified, pass it to the LLVM backendJohan Tibell2013-01-171-0/+4
| |
* | Clean up -msse flag handlingJohan Tibell2013-01-171-23/+20
| | | | | | | | | | We know have a single flag that takes a version number, instead of one flag per SSE version.
* | Add -f[no-]warn-unsupported-llvm-version. Closes Trac #7579.Austin Seipp2013-01-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This controls whether or not the compiler warns if we're using an LLVM version that's too old or too new. It's mostly useful when building the compiler knowingly with an unsupported version, so you don't get a lot of warnings in the build process. There's no documentation for this since it's a flag only a few developers would care about anyway. Signed-off-by: Austin Seipp <mad.one@gmail.com>
* | Merge branch 'master' of https://github.com/ghc/ghcJohan Tibell2013-01-111-4/+29
|\ \
| * | dynamic-too progressIan Lynagh2013-01-111-4/+29
| | |
* | | Add preprocessor defines when SSE is enabledJohan Tibell2013-01-101-0/+27
|/ / | | | | | | | | | | | | | | | | | | | | This will add the following preprocessor defines when Haskell source files are compiled: * __SSE__ - If any version of SSE is enabled * __SSE2__ - If SSE2 or greater is enabled * __SSE4_2_ - If SSE4.2 is enabled Note that SSE2 is enabled by default on x86-64.
* | Merge remote branch 'origin/master'Simon Peyton Jones2013-01-081-1/+3
|\ \
| * | Allow empty case expressions (and lambda-case) with -XEmptyCaseSimon Peyton Jones2013-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes are: * Parser accepts empty case alternatives * Renamer checks that -XEmptyCase is on in that case * (Typechecker is pretty much unchanged.) * Desugarer desugars empty case alternatives, esp: - Match.matchWrapper and Match.match now accept empty eqns - New function matchEmpty deals with the empty case - See Note [Empty case alternatives] in Match This patch contains most of the work, but it's a bit mixed up with a refactoring of MatchGroup that I did at the same time (next commit).
* | | Re-engineer the ambiguity test for user type signaturesSimon Peyton Jones2013-01-081-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two main changes. First, re-engineer the ambiguity test. Previously TcMType.checkAmbiguity used a rather syntactic test to detect some types that are certainly ambiguous. But a much easier test is available, and it is used for inferred types in TcBinds. Namely <type> is ambiguous iff <type> `TcUnify.isSubType` <type> fails to hold, where "isSubType" means "is provably more polymorphic than". Example: C a => Int is ambiguous, because isSubType instantiates the (C a => Int) to (C alpha => Int) and then tries to deduce (C alpha) from (C a). This is Martin Sulzmann's definition of ambiguity. (Defn 10 of "Understanding functional dependencies via constraint handling rules", JFP.) This change is neat, reduces code, and correctly rejects more programs. However is *is* just possible to have a useful program that would be rejected. For example class C a b f :: C Int b => Int -> Int Here 'f' would be rejected as having an ambiguous type. But it is just possible that, at a *call* site there might be an instance declaration instance C Int b, which does not constrain 'b' at all. This is pretty strange -- why is 'b' overloaded at all? -- but it's possible, so I also added a flag -XAllowAmbiguousTypes that simply removes the ambiguity check. Let's see if anyone cares. Meanwhile the earlier error report will be useful for everyone else. A handful of regression tests had to be adjusted as a result, because they used ambiguous types, somewhat accidentally. Second, split TcMType (already too large) into two * TcMType: a low-level module dealing with monadic operations like zonking, creating new evidence variables, etc * TcValidity: a brand-new higher-level module dealing with validity checking for types: checkValidType, checkValidInstance, checkFamInstPats etc Apart from the fact that TcMType was too big, this allows TcValidity to import TcUnify(tcSubType) without causing a loop.
* | Merge branch 'master' of darcs.haskell.org:/home/darcs/ghcSimon Peyton Jones2013-01-021-2/+5
|\ \
| * | Add flag -fwarn-duplicate-constraintsSimon Peyton Jones2013-01-021-1/+4
| | | | | | | | | | | | | | | This fixes Trac #7541, and is on by default. Use -fno-warn-duplicate-constraints to switch it off.