- Sep 15, 2016
-
-
Simon Marlow authored
Summary: * getNonClobberedReg instead of getSomeReg, because the reg needs to survive across t_code * Use a new reg for the table offset calculation instead of clobbering the reg returned by expr (this was the bug affecting #12433) Test Plan: New unit test; validate Reviewers: rwbarton, bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2529 GHC Trac Issues: #12433
-
- Sep 13, 2016
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
- Sep 12, 2016
-
-
Simon Peyton Jones authored
Sigh. I added some comments to the source files, and failed to revalidate. But the comments change the line number in the error messages. Doh.
-
Simon Peyton Jones authored
I must have failed to validate properly, sorry. These testsuite wibbles belong with commit 03541cba Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Fri Sep 9 17:42:42 2016 +0100 Be less picky about reporing inaccessible code
-
Biographical profiling is not thread-safe as documented in #12019. Throw an error when it is used in this way. Test Plan: Validate Reviewers: simonmar, austin, erikd Reviewed By: erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2516 GHC Trac Issues: #12019
-
Ben Gamari authored
As requested in #10267. However we still lack support in typed splices. See #10945 and #10946.
-
Ben Gamari authored
Remove a leftover note in the users guide claiming that TH doesn't support pattern synonyms.
-
Ben Gamari authored
Not sure how this snuck through but it seems to be the only one.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Triggered by the discussion on Trac #12466, this patch makes GHC less aggressive about reporting an error when there are insoluble Givens. Being so agressive was making some libraries fail to compile, and is arguably wrong in at least some cases. See the discussion on the ticket. Several test now pass when they failed before; see the files-modified list for this patch.
-
Simon Marlow authored
Summary: This is a fast, non-blocking, asynchronous, interface to tryPutMVar that can be called from C/C++. It's useful for callback-based C/C++ APIs: the idea is that the callback invokes hs_try_putmvar(), and the Haskell code waits for the callback to run by blocking in takeMVar. The callback doesn't block - this is often a requirement of callback-based APIs. The callback wakes up the Haskell thread with minimal overhead and no unnecessary context-switches. There are a couple of benchmarks in testsuite/tests/concurrent/should_run. Some example results comparing hs_try_putmvar() with using a standard foreign export: ./hs_try_putmvar003 1 64 16 100 +RTS -s -N4 0.49s ./hs_try_putmvar003 2 64 16 100 +RTS -s -N4 2.30s hs_try_putmvar() is 4x faster for this workload (see the source for hs_try_putmvar003.hs for details of the workload). An alternative solution is to use the IO Manager for this. We've tried it, but there are problems with that approach: * Need to create a new file descriptor for each callback * The IO Manger thread(s) become a bottleneck * More potential for things to go wrong, e.g. throwing an exception in an IO Manager callback kills the IO Manager thread. Test Plan: validate; new unit tests Reviewers: niteria, erikd, ezyang, bgamari, austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2501
-
- Sep 11, 2016
-
-
Ryan Scott authored
A folow-up to D2521 (which addressed #12583), where the `Outputable` `ppr` output was tweaked to display a list comprehension with only one `Stmt` as `[Foo]` instead of `[Foo|]` (which isn't valid Haskell). I forgot to update the corresponding code in `Language.Haskell.TH.Ppr` which pretty-prints `CompE`, however, so this commit takes care of that.
-
Ryan Scott authored
Summary: Standalone-derived `Ix` instances would panic on GADTs with exactly one constructor, since the list of fields was being passed to a function that uses `foldl1` in order to generate an implementation for `inRange`. This adds a simple check that makes `inRange` be `True` whenever a product type has no fields. Fixes #12583. Test Plan: make test TEST=12583 Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2521 GHC Trac Issues: #12583
-
Matthew Pickering authored
You can now just use `mkMatchGroup`.
-
Matthew Pickering authored
-
- Sep 10, 2016
-
-
Tamar Christina authored
Summary: The generated documentation for thhe Foreign.C.Types module is generated based on the platform which ran Haddock. This is generating incorrect types for e.g. Windows. Add a disclaimer to the top of the page to ask people to keep this in mind. Test Plan: make documentation and inspect Haddock Reviewers: erikd, austin, hvr, bgamari Reviewed By: erikd Subscribers: RyanGlScott, #ghc_windows_task_force, thomie Differential Revision: https://phabricator.haskell.org/D2523 GHC Trac Issues: #12586
-
Ryan Scott authored
Summary: D2461 seemed to (inadvertently, I think) add the `-flocal-ghci-history` flag to the list of `defaultFlags` that are enabled automatically. As a result, every invocation of `ghci` caused a local GHCi history to be saved to the current directory, which probably shouldn't be the default. Test Plan: Run `ghci`, observe the lack of a `.ghci_history` file in your working directory Reviewers: austin, thomie, bgamari Reviewed By: bgamari Subscribers: ak3n Differential Revision: https://phabricator.haskell.org/D2520 GHC Trac Issues: #9089
-
- Sep 09, 2016
-
-
Summary: We stumbled upon a case where an external library (OpenCL) does not work if a specific address (0x200000000) is taken. It so happens that `osReserveHeapMemory` starts trying to mmap at 0x200000000: ``` void *hint = (void*)((W_)8 * (1 << 30) + attempt * BLOCK_SIZE); at = osTryReserveHeapMemory(*len, hint); ``` This makes it impossible to use Haskell programs compiled with GHC 8 with C functions that use OpenCL. See this example https://github.com/chpatrick/oclwtf for a repro. This patch allows the user to work around this kind of behavior outside our control by letting the user override the starting address through an RTS command line flag. Reviewers: bgamari, Phyx, simonmar, erikd, austin Reviewed By: Phyx, simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D2513
-
Alan Zimmerman authored
Summary: The external interpreter is launched by calling 'System.Process.createProcess' with a 'CreateProcess' parameter. The current value for this has the 'std_in', 'std_out' and 'std_err' fields use the default of 'Inherit', meaning that the remote interpreter shares the stdio with the original ghc/ghci process. This patch introduces a new hook to the DynFlags, which has an opportunity to override the 'CreateProcess' fields, launch the process, and retrieve the stdio handles actually used. So if a ghci external interpreter session is launched from the GHC API the stdio can be redirected if required, which is useful for tooling/IDE integration. Test Plan: ./validate Reviewers: austin, hvr, simonmar, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2518
-
- Sep 08, 2016
-
-
Edward Z. Yang authored
Fixes readdir validation error (fixes #12572). Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Test Plan: none Reviewers: austin, niteria, bgamari Reviewed By: niteria Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2514 GHC Trac Issues: #12485
-
Test Plan: Read it Reviewers: dfeuer, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2515 GHC Trac Issues: #11691
-
Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2517 GHC Trac Issues: #11433
-
- Sep 05, 2016
-
-
This change should close #11108 by fixing the test case. This commit fixes two issues: * Make sure that each weak pointer we allocate has a constructor as the key, not a thunk. A failure to do so meant these weak pointers died prematurely on the 'ghci' WAY. * Don't print anything in the finalizer, because they are not guaranteed to run. Test Plan: validate Reviewers: austin, simonmar, erikd, bgamari Reviewed By: erikd, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2512 GHC Trac Issues: #11108
-
As reported in #12555 this code was terribly broken. Sadly, Autoconf was none-the-wiser. Thanks to @rwbarton for pointing this out. Test Plan: Test with libdw version newer and older and 0.158 Reviewers: hvr, austin, rwbarton Reviewed By: rwbarton Subscribers: thomie, rwbarton, erikd Differential Revision: https://phabricator.haskell.org/D2510 GHC Trac Issues: #12555
-
Ryan Scott authored
Summary: For some inexplicable reason, the `Generic` instance in `perf/compiler/T5642` is written out entirely by hand. This is not only strange, since Trac #5642 is about derived `Generic` instances, but it also annoying to maintain, since it requires manually changing a bunch of code whenever the algorithm behind `deriving Generic` changes. (See D2304 for a recent example of this.) It seems more sensible to just derive the `Generic` instance. It shifts the goalposts of what allocations we're measuring a bit, since we no longer have to parse a large amount of code (and as a knock-on effect, the allocations go down a bit). But I think this program is morally equivalent to what we were benchmarking before, so it's not too unreasonable to change. Test Plan: make test TEST=T5642 Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D2511 GHC Trac Issues: #5642
-
Reviewers: simonpj, bgamari, RyanGlScott, austin Reviewed By: simonpj Subscribers: nomeata, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2502 GHC Trac Issues: #10858
-
mniip authored
Test Plan: Corrected a few tests to include the new message. Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2484 GHC Trac Issues: #12546
-
This implements #5615 for divInt# and modInt#. I also included rules to do constant-folding when the both arguments are known. Test Plan: validate Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: hvr, thomie Differential Revision: https://phabricator.haskell.org/D2486 GHC Trac Issues: #5615
-
Facundo Domínguez authored
Summary: Module finalizer could call addTopDecls, however, the declarations added in this fashion were ignored. This patch makes sure to rename, type check and incorporate this declarations. Because a declaration may include a splice which calls addModFinalizer, the list of finalizers is repeteadly checked after adding declarations until no more finalizers remain. Test Plan: ./validate Reviewers: bgamari, goldfire, simonpj, austin Reviewed By: bgamari, simonpj Subscribers: simonmar, mboes, thomie Differential Revision: https://phabricator.haskell.org/D2505 GHC Trac Issues: #12559
-
- Sep 04, 2016
-
-
Sergei Trofimovich authored
The 'return () >>' hack was added in commit commit ac88f113 Date: Tue Jul 26 12:14:03 2005 +0000 Nowadays it has no effect on generated Core on -O1/-O2 and slightly bloats Core on -O0. Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Gabor Greif authored
-
Gabor Greif authored
-
- Sep 03, 2016
-
-
Gabor Greif authored
-
Gabor Greif authored
-
- Sep 02, 2016
-
-
Sergei Trofimovich authored
It's a complementary change to a48de37d restore -fmax-worker-args handling (Trac #11565) I don't have a small example but I've noticed another discrepancy when was profiling GHC for performance cmmExprNative :: ReferenceKind -> CmmExpr -> CmmOptM CmmExpr was specialised by 'spec_one' down to a function with arity 159. As a result 'perf record' pointed at it as at slowest function in whole ghc library. I've extended -fmax-worker-args effect to 'spec_one' as it does the same worker/wrapper split to push arguments to the heap. The change decreases heap usage on a synth.bash benchmark (Trac #9221) from 67G down to 64G (-4%). Benchmark runtime decreased from 14.5 s down to 14.s (-7%). Signed-off-by:
Sergei Trofimovich <siarheit@google.com> Reviewers: ezyang, simonpj, austin, goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2507 GHC Trac Issues: #11565
-
Sergei Trofimovich authored
Signed-off-by:
Sergei Trofimovich <siarheit@google.com>
-
Facundo Domínguez authored
Summary: Also comment on the need to use stgMallocBytes in StaticPtrTable.c. Test Plan: ./validate Reviewers: erikd, austin, bgamari, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2506
-