summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Ignore names introduced "implicitly" in unused-variable warnings (Fix #4404)wip/T4404Max Bolingbroke2011-04-023-3/+88
| | | | | We collect variables introduced by the {...} part of a let-like record wildcard pattern and do not warn if the user then doesn't actually use them.
* Pop OS X stack padding even if the foreign call is stdcall (#5052)Max Bolingbroke2011-04-021-4/+16
| | | | | | | | | | | The problem was that the codegen for foreign calls makes sure the stack is 16-byte aligned on OS X by pushing some padding. In the case where the foreign call is cdecl, that padding gets popped after the call, but if the convention is stdcall then it doesn't generate any popping code at all. However, this is incorrect because the stdcall only promises to pop the arguments, not the padding. The fix is to generate code to pop the padding (if any) on OS X.
* Really zap case-binder occurrence info: solves #5028Ian Lynagh2011-04-011-3/+2
| | | | | | Converted from a darcs patch from Max Bolingbroke: Fri Apr 1 11:39:49 BST 2011 Max Bolingbroke <batterseapower@hotmail.com> * Really zap case-binder occurrence info: solves #5028
* Introducing a datatype for WorkLists that properly prioritizes equalities.ghc-darcs-git-switchoverdimitris@microsoft.com2011-03-313-80/+137
| | | | | | | | | We were not prioritizing the interaction of equalities in the worklist, because pre-canonicalization solved the constraints one by one, in their arrival order. This patch fixes this, so it's a generally useful improvement, mainly for efficiency. It makes #4981 go away, although it's not a definite answer to the cause of the problem. See discussion on Trac.
* Fix Trac #5048: location on AbsBindssimonpj@microsoft.com2011-03-312-17/+17
| | | | | This patch just puts a better SrcSpan on the AbsBinds produced by the type checker
* Comments and variable naming onlysimonpj@microsoft.com2011-03-311-3/+5
|
* Re-enable assertion now the new type checker is insimonpj@microsoft.com2011-03-311-2/+2
| | | | (See Trac #3011.)
* Add a new static flag -fno-opt-coercionsimonpj@microsoft.com2011-03-313-3/+10
| | | | This just disables the coercion optimiser, mainly for measurements in the paper
* New statistics flags -ddump-core-statssimonpj@microsoft.com2011-03-314-1/+94
| | | | | This dumps a (one-line) listing of the size of the Core program, just after tidying
* implement double-to-float narrowing in the x86 NCG (#4441)Simon Marlow2011-03-303-7/+20
|
* Turn -vfia-C into a no-opIan Lynagh2011-03-291-16/+8
|
* Renumber TH uniquesIan Lynagh2011-03-292-145/+145
| | | | | | This fixes a couple of duplicates that had crept in, and also renumbers everything so that they are monotonically increasing through the file.
* Whitespace onlyIan Lynagh2011-03-281-17/+17
|
* Fix #4914 (I hope)Simon Marlow2011-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Here's a bit of erroneous code: 00000c5c <s1ad_info>: c5c: 8b 45 08 mov 0x8(%ebp),%eax c5f: d9 46 03 flds 0x3(%esi) c62: dd d9 fstp %st(1) c64: d9 55 08 fsts 0x8(%ebp) c67: 89 c6 mov %eax,%esi c69: c7 45 00 24 0c 00 00 movl $0xc24,0x0(%ebp) c70: f7 c6 03 00 00 00 test $0x3,%esi c76: 75 ac jne c24 <s1ac_info> So we should be doing some ffrees before the jne. The code that inserts the ffrees wasn't expecting to do it for a conditional jump, because they are usually local, but we have a late optimisation that shortcuts jumps-to-jumps, and that can result in a non-local conditional jump. This at least fixes an instance of the bug that I was able to reproduce, let's hope there aren't any more.
* Ignore comments when inlining.Edward Z. Yang2011-03-251-0/+1
|
* Split out "Raw Cmm" dump to its own flag -ddump-raw-cmmEdward Z. Yang2011-03-222-1/+3
| | | | | | | | | | | | | | Previously, -ddump-cmmz was used to dump out the "Raw Cmm" right before it gets passed to the backends, as well as all of the intermediate phases in the new code generator. Unfortunately, there are a lot of intermediate phases, which means -ddump-cmmz takes a very long time with -fnew-codegen for large programs, even if you're only interested in the final result. Here we split up -ddump-cmmz into -ddump-cmmz (now exclusively for the new code generator) and -ddump-raw-cmm (for both code generation paths.) The old flag was not documented in the manual, so hopefully not too many people will be surprised by this change.
* RednCounts can contain CAFs, so support them in cvtToClosureLbl.Edward Z. Yang2011-03-221-0/+1
|
* Immediately tag initialization code to prevent untagged spills.Edward Z. Yang2011-03-233-6/+14
| | | | | | | | | | | | | | | | | | | | When allocating new objects on the heap, we previously returned a CmmExpr containing the heap pointer as well as the tag expression, which would be added to the code graph upon first usage. Unfortunately, this meant that untagged heap pointers living in registers might be spilled to the stack, where they interacted poorly with garbage collection (we saw this bug specifically with the compacting garbage collector.) This fix immediately tags the register containing the heap pointer, so that unless we have extremely unfriendly spill code, the new pointer will never be spilled to the stack untagged. An alternate solution might have been to modify allocDynClosure to tag the pointer upon the initial register allocation, but not all invocations of allocDynClosure tag the resulting pointer, and threading the consequent CgIdInfo for the cases that did would have been annoying.
* Fix Trac #5028: zap occ info when doing the binder swapsimonpj@microsoft.com2011-03-211-5/+20
| | | | | | This fixes the Lint error, but still risks leaving stupid let { x=y } bindings in the code. But no time to fix that today. (Leave the ticket open for that reason.)
* Don't use read_only_relocs on darwin x86-64; fixes #4984William Knop2011-03-091-1/+4
|
* FunctionalDependencies should imply MultiParamTypeClassesMax Bolingbroke2011-03-201-0/+1
|
* Add unboxedTupleTName to templateHaskellNamesIan Lynagh2011-03-171-1/+1
|
* Drop dead core that was kept alive by RULES in CorePrep (#4962)Max Bolingbroke2011-02-192-2/+69
|
* Optimise comparisons against min/maxBound (ticket #3744).Michal Terepeta2010-10-271-13/+61
| | | | | This optimises away comparisons with minBound or maxBound that are always false or always true.
* LLVM: Fix #4995, llvm mangler broken for large compilesDavid Terei2011-03-091-5/+8
|
* Document -fwarn-missing-import-listssimonpj@microsoft.com2011-03-061-1/+3
| | | | | Also change the behaviour slightly, to warn only for *unqualified* imports. See Trac #4977.
* Completed the implementation of VECTORISE SCALARManuel M T Chakravarty2011-03-053-154/+174
| | | | | | | | | - The pragma {-# VECTORISE SCALAR foo #-} marks 'foo' as a scalar function for for vectorisation and generates a vectorised version by applying 'scalar_map' and friends. - The set of scalar functions is not yet emitted into interface files. This will be added in a subsequent patch via 'VectInfo'.
* Make -fno-enable-rewrite-rules work properlysimonpj@microsoft.com2011-03-024-13/+17
| | | | | | I'd failed to propagate the Opt_EnableRewriteRules flag properly, which meant that -fno-enable-rewrite-rules didn't disable all rewrites. This patch fixes it.
* Comments onlysimonpj@microsoft.com2011-03-021-5/+18
|
* Restore SPECIALISE INSTANCE pragmassimonpj@microsoft.com2011-02-221-2/+2
| | | | | | | For some reason I'd commented out this code, which meant that we weren't getting the the goodness of the SPECIALISE INSTANCE pragamas in GHC.Real. And that in turn killed performance in nofib 'power'
* GHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKEDSimon Marlow2011-03-011-1/+1
|
* :script file scripts in GHCi #1363Vivian McPhail2011-02-263-11/+39
| | | | | | | | | This patch adds the script command in GHCi A file is read and executed as a series of GHCi commands. Execution terminates on the first error. The filename and line number are included in the error.
* Use -h rather than -soname; fixes dynlibs on Solaris 10; trac #4973Ian Lynagh2011-02-221-1/+3
|
* Fix another fundep error (fixes Trac #4969)simonpj@microsoft.com2011-02-216-183/+213
| | | | | | | | | If I had a pound for every hour Dimitrios and I have spent making functional dependencies work right, we'd be rich! We had stupidly caused a 'wanted' to be rewritten by a 'derived', with resulting abject failure. As well as fixing the bug, this patch refactors some more, adds useful assert and comments.
* New codegen: GC calling convention must use registers.Edward Z. Yang2011-02-181-1/+3
| | | | | | | | | | | | | | Previously, on register-deficient architectures like x86-32, the new code generator would emit code for calls to stg_gc_l1, stg_gc_d1 and stg_gc_f1 that pushed their single argument on to the stack, while the functions themselves expected the argument to live in L1, D1 and F1 (respectively). This was because cmmCall with the GC calling convention allocated real registers, not virtual registers. This patch modifies the code for assigning registers/stack slots to use the right calling convention for GC and adds an assertion to ensure it did it properly.
* Added a VECTORISE pragmaManuel M T Chakravarty2011-02-2039-518/+912
| | | | | | | | | | | | | | | - 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
* Clarify the "object splitting" variable namesIan Lynagh2011-02-192-4/+4
|
* Change typechecker-trace output slightlysimonpj@microsoft.com2011-02-171-3/+4
|
* Comments onlysimonpj@microsoft.com2011-02-171-0/+16
|
* Fix Trac #4966simonpj@microsoft.com2011-02-171-5/+30
| | | | | | | | This is just a program that exploits overlapping instances in a delicate way. The fix makes GHC a bit more friendly towards such programs. See Note [Overlap and deriving] in TcSimplify
* Use "on the spot" solving for fundepssimonpj@microsoft.com2011-02-176-337/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we spot an equality arising from a functional dependency, we now use that equality (a "wanted") to rewrite the work-item constraint right away. This avoids two dangers Danger 1: If we send the original constraint on down the pipeline it may react with an instance declaration, and in delicate situations (when a Given overlaps with an instance) that may produce new insoluble goals: see Trac #4952 Danger 2: If we don't rewrite the constraint, it may re-react with the same thing later, and produce the same equality again --> termination worries. To achieve this required some refactoring of FunDeps.lhs (nicer now!). This patch also contains a couple of unrelated improvements * A bad bug in TcSMonad.nestImplicTcS whereby the Tcs tyvars of an outer implication were not untouchable inside * Improved logging machinery for the type constraint solver; use -ddump-cs-trace (probably with a wider default line width -dppr-cols=200 or something)
* Increase exprIsDupable threshold a bitsimonpj@microsoft.com2011-02-151-1/+4
| | | | | | Now that exprIsDupable is less aggressive, test MethSharing wasn't doing enough inlining. Increasing the threshold fixes the problem but the real fix is in Trac #4960.
* Ensure exprIsCheap/exprIsExpandable deal with Cast properlysimonpj@microsoft.com2011-02-151-0/+1
| | | | | | | | This bug was causing a Lint error on the stable branch. For some reason it doesn't show up in HEAD, but it's still worth fixing. The point is that ((f `cast` co) a) is cheap if f has arity>1. This was being gratuitously missed before.
* Do not treat absentError speciallysimonpj@microsoft.com2011-02-152-9/+3
| | | | (This was part of an experiment I abandoned.)
* Fix exprIsDupablesimonpj@microsoft.com2011-02-141-13/+15
| | | | | | | | | It turns out that exprIsDupable would return True for an expression of *arbitrary* size, provide it was a nested bunch of applications in which no function had more than three arguments. That was never the intention, and could give rise to massive code duplication. This patch makes it much less aggressive.
* Better case-of-case transformationsimonpj@microsoft.com2011-02-142-10/+53
| | | | | | | The ThunkSplitting idea in WorkWrap wasn't working at all, leading to Trac #4957. The culprit is really the simplifier which was combining the wrong case continuations. See Note [Fusing case continuations] in Simplify.
* Cleaned up Expr and Vectorisekeller@.cse.unsw.edu.au2011-02-152-31/+13
|
* Fixed two syntax errorskeller@.cse.unsw.edu.au2011-02-141-2/+2
|
* Handling of recursive scalar functions in isScalarLamkeller@cse.unsw.edu.au2011-02-143-33/+57
|
* Added handling of non-recursive module global functions to isScalar checkkeller@cse.unsw.edu.au2011-02-093-22/+40
|