- 30 Nov, 2016 5 commits
-
-
Tamar Christina authored
-
Tamar Christina authored
This updates the binary dists for windows to GCC 6.2.0 and binutils 2.27.2 which has fixes required for LLVM. Test Plan: ./validate Reviewers: simonmar, erikd, austin, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2749 GHC Trac Issues: #12871, #8974
-
Ben Gamari authored
Summary: It turns out that Phyx's fix for #12554 (D2684) still fails with mingw-w64 python 2.7. However, Python 3 (both msys2 and mingw-w64) work fine. Given that supporting Python 2 has already become rather tiresome (as @thomie warned it would), let's just move to python3 by default. Test Plan: Validate Reviewers: austin, Phyx Reviewed By: Phyx Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2766 GHC Trac Issues: #12554
-
Tamar Christina authored
Following D2684 these two tests need to be updated: * T7037: timeout.exe now waits until all processes are finished. this makes T7037 reliable. So enabled. * T876: Unknown reason, allocations are much lower than before. Test Plan: ./validate Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2759 GHC Trac Issues: #12725, #12004
-
Tamar Christina authored
In a land far far away, a project called Cygwin was born. Cygwin used newlib as it's standard C library implementation. But Cygwin wanted to emulate POSIX systems as closely as possible. So it implemented `execv` using the Windows function `spawnve`. Specifically ``` spawnve (_P_OVERLAY, path, argv, cur_environ ()) ``` `_P_OVERLAY` is crucial, as it makes the function behave *sort of* like execv on linux. the child process replaces the original process. With one major difference because of the difference in process models on Windows: the original process signals the caller that it's done. this is why the file is still locked. because it's still running, control was returned because the parent process was destroyed, but the child is still running. I think it's just pure dumb luck, that the older runtimes are slow enough to give the process time to terminate before we tried deleting the file. Which explains why you do have sporadic failures even on older runtimes like 2.5.0, of a test or two (like T7307). So this patch fixes a couple of things. I leverage the existing `timeout.exe` to implement a workaround for this issue. a) The old timeout used to start the process then assign it to the job. This is slightly faulty since child processes are only assigned to a job is their parent were assigned at the time they started. So this was a race condition. I now create the process suspended, assign it to the job and then resume it. Which means all child processes are not running under the same job. b) First things, Is to prevent dangling child processes. I mark the job with `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` so when the last process in the job is done, it insures all processes under the job are killed. c) Secondly, I change the way we wait for results. Instead of waiting for the parent process to terminate, I wait for the job itself to terminate. There's a slight subtlety there, we can't wait on the job itself. Instead we have to create an I/O Completion port and wait for signals on it. See https://blogs.msdn.microsoft.com/oldnewthing/20130405-00/?p=4743 This fixes the issues on all runtimes for me and makes T7307 pass consistenly. The threading was also simplified by hiding all the locking in a single semaphore and a completion class. Futhermore some additional error reporting was added. For encoding the testsuite now no longer passes a file handle to the subprocess since on windows, sh.exe seems to acquire a lock on the file that is not released in a timely fashion. I suspect this because cygwin seems to emulate console handles by creating file handles and using those for std handles. So when we give it an existing file handle it just locks the file. I what's happening is that it's not releasing the handle until all shared cygwin processes are dead. Which explains why it worked in single threaded mode. So now instead we pass a pipe and do not interpret the resulting data. Any bytes written to stdin or read out of stdout/stderr are done so in binary mode and we do not interpret the data. The reason for this is that we have encoding tests in GHC which pass invalid utf-8. If we try to handle the data as text then python will throw an exception instead of a test comparison failing. Also I have fixed the ability to override `PYTHON` when calling `make tests`. This now works the same as with `.\validate`. Finally, after cleaning up the locks I was able to make the abort behavior work correctly as I believe it was intended: when you press Ctrl+C and send an interrupt signal, the testsuite finishes the active tests and then gracefully exits showing you a report of the progress it did make. So using Ctrl+C will not just *die* as it did before. These changes lift the restriction on which python version you use (msys/mingw) or which runtime or python 3 or python 2. All combinations should now be supported. Test Plan: PATH=/usr/local/bin:/mingw64/bin:$APPDATA/cabal/bin:$PATH && PYTHON=/usr/bin/python THREADS=9 make test THREADS=9 make test PATH=/usr/local/bin:/mingw64/bin:$APPDATA/cabal/bin:$PATH && PYTHON=/usr/bin/python ./validate --quiet --testsuite-only Reviewers: erikd, RyanGlScott, bgamari, austin Subscribers: jrtc27, mpickering, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2684 GHC Trac Issues: #12725, #12554, #12661, #12004
-
- 29 Nov, 2016 26 commits
-
-
Michal Terepeta authored
This introduces the new interface for dataflow analysis, where transfer functions operate on a whole basic block. The main changes are: - Hoopl.Dataflow: implement the new interface and remove the old code; expose a utility function to do a strict fold over the nodes of a basic block (for analyses that do want to look at all the nodes) - Refactor all the analyses to use the new interface. One of the nice effects is that we can remove the `analyzeFwdBlocks` hack that ignored the middle nodes (that existed for analyses that didn't need to go over all the nodes). Now this is no longer a special case and fits well with the new interface. Signed-off-by:
Michal Terepeta <michal.terepeta@gmail.com> Test Plan: validate, earlier version of the patch had assertions comparing the results with the old implementation Reviewers: erikd, austin, simonmar, hvr, goldfire, bgamari Reviewed By: bgamari Subscribers: goldfire, erikd, thomie Differential Revision: https://phabricator.haskell.org/D2754
-
duairc authored
Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2755
-
Michal Terepeta authored
It seems that `BlockId` module could simply go away in favor of Hoopl's `Label`. This is the first step to do that. In a few places I had to add some type signatures, but most of them seem to help with code readability. Signed-off-by:
Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2765
-
Ben Gamari authored
-
Ben Gamari authored
Test Plan: Validate on lots of platforms Reviewers: erikd, simonmar, austin Reviewed By: erikd, simonmar Subscribers: michalt, thomie Differential Revision: https://phabricator.haskell.org/D2699
-
Ben Gamari authored
Test Plan: Validate Reviewers: simonmar, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2764
-
Moritz Angermann authored
The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2575
-
Ben Gamari authored
Consider the case of building a stage1 compiler. `hschooks.c` will be built by stage0 `ghc` and linked against the `stage0` RTS. Despite this it was #including the stage1 `Rts.h`. There is, of course, no guarantee that this is ABI-compatible with the stage0 RTS and when they diverge Bad Things happen (e.g. bells ringing at inappropriate times in D2699). Test Plan: Validate Reviewers: simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2763
-
Ben Gamari authored
Unfortunately it's quite unclear what caused this.
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2740
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2737
-
Ben Gamari authored
Test Plan: Validate Reviewers: austin, simonmar, michalt Reviewed By: simonmar, michalt Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2736
-
Ben Gamari authored
This seems like a clearer name and the fewer functions that one needs to remember, the better. Test Plan: validate Reviewers: austin, simonmar, michalt Reviewed By: simonmar, michalt Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2735
-
dobenour authored
Test Plan: GHC CI Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: snowleopard, thomie Maniphest Tasks: T74 Differential Revision: https://phabricator.haskell.org/D2732
-
Matthew Pickering authored
Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2725
-
Sylvain Henry authored
This patch reverts the change introduced with 587dcccf and restores the previous default output of GHC (i.e., show source path and object path for each compiled module). The -fhide-source-paths flag can be used to hide these paths and reduce the line noise. Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2728 GHC Trac Issues: #12851
-
Ben Gamari authored
Test Plan: Read it Reviewers: austin Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2747
-
Michal Terepeta authored
This makes the two functions strict in the accumulator - it seems that there are only two users of those functions: `CmmLive` and `CmmSink` and in both cases the strict fold fits better. The commit also removes a few unused functions (`filterRegsUsed`), instances (for `Maybe` and `RegSet`) and gets rid of unnecessary inculde of `HsVersions.h`. The performance effect of avoiding unnecessary thunks is mostly negligible, although we do allocate a tiny bit less (nofib's section on compile allocations): ``` -1 s.d. ----- -0.2% +1 s.d. ----- -0.1% Average ----- -0.2% ``` Signed-off-by:
Michal Terepeta <michal.terepeta@gmail.com> Test Plan: validate Reviewers: simonmar, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2723
-
Rufflewind authored
Test Plan: validate Reviewers: erikd, Phyx, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2717 GHC Trac Issues: #8809
-
Rufflewind authored
This is a preliminary commit to add colors to diagnostics (warning and error messages). The aesthetic changes are: - 'warning', 'error', and 'fatal' are all colored magenta, red, and red respectively. - The warning annotation [-Wsomething] shares the same color. - Warnings and errors are also bolded (this is consistent with what other compilers do). A new flag has been added to control the behavior: -fdiagnostics-color=(always|auto|never) This flag is 'auto' by default. However, auto-detection is not implemented yet, so it effectively it defaults to off. Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2716 GHC Trac Issues: #8809
-
Ben Gamari authored
I've been editing the release notes on the `ghc-8.0` branch; fold those changes into `master`.
-
shlevy authored
On iOS, we use the pthread-based implementation of Itimer.c even for a non-threaded RTS. Since 999c464d, this relies on synchronization primitives like Mutex, so ensure those primitives are defined whenever they are supported, even if !THREADED_RTS. Fixes #12799. Reviewers: erikd, austin, simonmar, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2712 GHC Trac Issues: #12799
-
Alan Zimmerman authored
-
Gabor Greif authored
-
Simon Peyton Jones authored
Previously we were making them into skolem TcTyVars, which is wrong for the output of the type checker, which no TcTyVars should surive. See Note [Zonking the LHS of a RULE] in TcHsSyn This was flushed out by the new IfaceTcTyVar thing; I found some more TcTyVars that were being serialised into an interface file, which is wrong wrong wrong.
-
Ryan Scott authored
Summary: Resolves #12881. Test Plan: Read it, commit it, merge it, ship it Reviewers: hvr, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2760 GHC Trac Issues: #12881
-
- 28 Nov, 2016 5 commits
-
-
Simon Peyton Jones authored
It took me some time to find the right Note for the fix to #12789. This comment patch tries to add pointers from relevant places.
-
Simon Peyton Jones authored
...which is fixed by commit 0476a64e Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Tue Oct 25 15:22:17 2016 +0100 Fix a bug in mk_superclasses_of
-
Simon Peyton Jones authored
-
Gabor Greif authored
-
Simon Peyton Jones authored
This bug was beautifully characterised in Trac #12776, which showed a small program for which the inliner went into an infinite loop. Eeek. It turned out to be a genuine and long-standing bug in the occurrence analyer, specifically in the bit that identifies loop breakers. In this line pairs | isEmptyVarSet weak_fvs = reOrderNodes 0 bndr_set weak_fvs tagged_nodes [] | otherwise = loopBreakNodes 0 bndr_set weak_fvs loop_breaker_edges [] the 'tagged_nodes' should be 'loop_breaker_edges'. That's it! The diff looks a lot bigger because I did some work on comments and variable naming, but that's all it is. We were using the wrong set of dependencies! I'm astonished that this bug has not caused more trouble. It dates back to at least 2011 and maybe further.
-
- 25 Nov, 2016 4 commits
-
-
Simon Peyton Jones authored
This patch makes [W] constraints not participate in improvement. See Note [Do not do improvement for WOnly] in TcSMonad. Removes some senseless work duplication in some cases (notably Trac #12860); should not change behaviour.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
When we had f :: ( _ ) => blah we were failing to call growThetaTyVars, as we do in the no-type-signature case, and that meant that we weren't generalising over the right type variables. I'm quite surprised this didn't cause problems earlier. Anyway Trac #12844 showed it up and this patch fixes it
-
Simon Peyton Jones authored
* Rename CoAxiom.Eqn = Pair Type to TypeEqn, and use it for fundeps * Use the FunDepEqn for injectivity, which lets us share a bit more code, and (more important) brain cells * When generating fundeps, take the max depth of the two constraints. This aimed at tackling the strange loop in Trac #12860, but there is more to come for that. * Improve pretty-printing with -ddump-tc-trace
-