summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/compiler/all.T
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Save performance metrics in git notes.David Eichmann2018-11-071-995/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the following improvement: - Automatically records test metrics (per test environment) so that the programmer need not supply nor update expected values in *.T files. - On expected metric changes, the programmer need only indicate the direction of change in the git commit message. - Provides a simple python tool "perf_notes.py" to compare metrics over time. Issues: - Using just the previous commit allows performance to drift with each commit. - Currently we allow drift as we have a preference for minimizing false positives. - Some possible alternatives include: - Use metrics from a fixed commit per test: the last commit that allowed a change in performance (else the oldest metric) - Or use some sort of aggregate since the last commit that allowed a change in performance (else all available metrics) - These alternatives may result in a performance issue (with the test driver) having to heavily search git commits/notes. - Run locally, performance tests will trivially pass unless the tests were run locally on the previous commit. This is often not the case e.g. after pulling recent changes. Previously, *.T files contain statements such as: ``` stats_num_field('peak_megabytes_allocated', (2, 1)) compiler_stats_num_field('bytes allocated', [(wordsize(64), 165890392, 10)]) ``` This required the programmer to give the expected values and a tolerance deviation (percentage). With this patch, the above statements are replaced with: ``` collect_stats('peak_megabytes_allocated', 5) collect_compiler_stats('bytes allocated', 10) ``` So that programmer must only enter which metrics to test and a tolerance deviation. No expected value is required. CircleCI will then run the tests per test environment and record the metrics to a git note for that commit and push them to the git.haskell.org ghc repo. Metrics will be compared to the previous commit. If they are different by the tolerance deviation from the *.T file, then the corresponding test will fail. By adding to the git commit message e.g. ``` # Metric (In|De)crease <metric(s)> <options>: <tests> Metric Increase ['bytes allocated', 'peak_megabytes_allocated'] \ (test_env='linux_x86', way='default'): Test012, Test345 Metric Decrease 'bytes allocated': Test678 Metric Increase: Test711 ``` This will allow the noted changes (letting the test pass). Note that by omitting metrics or options, the change will apply to all possible metrics/options (i.e. in the above, an increase for all metrics in all test environments is allowed for Test711) phabricator will use the message in the description Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #12758 Differential Revision: https://phabricator.haskell.org/D5059
* Update performance numbers on WindowsTamar Christina2018-10-041-3/+4
| | | | | | | | | | | | Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5176
* testsuite: Bump T9630 expected allocationsBen Gamari2018-09-221-1/+2
| | | | This failed on Darwin.
* testsuite: Bump expected allocations for T12707Ben Gamari2018-09-211-1/+2
|
* testsuite: Bump expected allocations of T9675Ben Gamari2018-09-211-2/+4
| | | | | | This inexplicably started with 989dca6cbd93, which appears to be a bump of the `text` submodule. This is very fishy so I've opened #15663 to ensure we investigate.
* tests: increase (compile) timeout multiplier for T13701 and MultiLayerModulesAlp Mestanogullari2018-09-141-4/+4
| | | | | | | | | | | | | | | | | | | Summary: Those tests are currently making our i386 validation fail on CircleCI: https://circleci.com/gh/ghc/ghc/8827 Test Plan: Using my Phab<->CircleCI bridge to run i386 validation for this diff. Reviewers: bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter GHC Trac Issues: #15484, #15383 Differential Revision: https://phabricator.haskell.org/D5103
* fix timeout related i686 validation issuesAlp Mestanogullari2018-08-061-0/+15
| | | | | | | | | | | | | | | | | As can be seen on https://circleci.com/gh/ghc/ghc/7578, some tests are failing on i686 due to too restrictive timeouts. This patch tweaks those in the hope of solving the 4 failures from that URL due to timeouts. Test Plan: ./validate on i686 Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D5031
* testsuite: Bump T3064 expected allocationsBen Gamari2018-08-041-1/+2
|
* Refactor (~) to reduce the suerpclass stackSimon Peyton Jones2018-07-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | The constraint (~) used to be (effectively): class a ~~ b => (a :: k) ~ (b :: k) but, with this patch, it is now defined uniformly with (~~) and Coercible like this: class a ~# b => (a :: k) ~ (b :: k) Result: * One less superclass selection when goinng from (~) to (~#) Better for compile time and better for debugging with -ddump-simpl * The code for (~), (~~), and Coercible looks uniform, and appears together, e.g. in TysWiredIn and ClsInst.matchGlobalInst. Previously the code for (~) was different, and unique. Not only is this simpler, but it also makes the compiler a bit faster; T12227: 9% less allocation T12545: 7% less allocation This patch fixes Trac #15421
* Fix space leaksSimon Marlow2018-07-161-3/+6
| | | | | | | | | | | | | | | | | | | | | Summary: All these were detected by -fghci-leak-check when GHC was compiled *without* optimisation (e.g. using the "quick" build flavour). Unfortunately I don't know of a good way to keep this working. I'd like to just disable the -fghci-leak-check flag when the compiler is built without optimisation, but it doesn't look like we have an easy way to do that. And even if we could, it would be fragile anyway, Test Plan: `cd testsuite/tests/ghci; make` Reviewers: bgamari, hvr, erikd, tdammers Subscribers: tdammers, rwbarton, thomie, carter GHC Trac Issues: #15246 Differential Revision: https://phabricator.haskell.org/D4872
* Refactor coercion ruleningning2018-07-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch is an attempt on #15192. It defines a new coercion rule ``` | GRefl Role Type MCoercion ``` which correspondes to the typing rule ``` t1 : k1 ------------------------------------ GRefl r t1 MRefl: t1 ~r t1 t1 : k1 co :: k1 ~ k2 ------------------------------------ GRefl r t1 (MCo co) : t1 ~r t1 |> co ``` MCoercion wraps a coercion, which might be reflexive (MRefl) or not (MCo co). To know more about MCoercion see #14975. We keep Refl ty as a special case for nominal reflexive coercions, naemly, Refl ty :: ty ~n ty. This commit is meant to be a general performance improvement, but there are a few regressions. See #15192, comment:13 for more information. Test Plan: ./validate Reviewers: bgamari, goldfire, simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15192 Differential Revision: https://phabricator.haskell.org/D4747
* testsuite: Bump metrics for T5631 and T6048Ben Gamari2018-06-191-5/+7
| | | | | It's unclear what these are due to but they are causing the Darwin builds to fail.
* testsuite: Bump performance metrics of T9233 and T13035Ben Gamari2018-06-101-2/+4
| | | | | Unfortunately it's very unclear which commit caused these two to regress; they only fail on Darwin and not even deterministically it sesems.
* Clean up Windows testsuite failuresTamar Christina2018-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Another round and attempt at getting these down to 0. We really should re-enable the CI and not wait for those cloud based ones. I've disabled the backpack tests on windows as they are too broad, they test as much the shell as they do the compiler. The perf tests have been too long to track down. but the numbers are horrible but I don't see them getting fixed so just have to accept them. T9293 has new windows specific output because a Dyn way only flag was added. This will of course not work on non-Dyn way builds. Test Plan: ./validate Reviewers: bgamari, hvr, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15107 Differential Revision: https://phabricator.haskell.org/D4668
* testsuite: Bump OS X performance numbersBen Gamari2018-05-241-2/+3
| | | | | Sadly I can't easily determine the cause of T13701's regression since the tree was broken.
* Improve performance of CallArityJoachim Breitner2018-05-221-1/+3
| | | | | | | | | | | | | | | | the hot path contained a call to v `elemUnVarSet` (neighbors g v) and creating the set of neighbors just to check if `v` is inside accounted for half the allocations of the test case of #15164. By introducing a non-allocating function `hasLoopAt` for this we shave off half the allocations. This brings the total cost of Call Arity down to 20% of time and 23% of allocations, according to a profiled run. Not amazing, but still much better. Differential Revision: https://phabricator.haskell.org/D4718
* Fix perf numbers for #15164Simon Peyton Jones2018-05-211-3/+1
|
* Do better sharing in the short-cut solverSimon Peyton Jones2018-05-211-0/+10
| | | | | | | | | | | Trac #15164 showed that it sometimes really matters to share sub-proofs when solving constraints. Without it, we can get exponentialy bad behaviour. Fortunately, it's easily solved. Note [Shortcut try_solve_from_instance] explains. I did some minor assocaited refactoring.
* Fix GHCi space leaks (#15111)Simon Marlow2018-05-171-1/+4
| | | | | | | | | | | | | | | | | Summary: There were a number of leaks causing previously loaded modules to be retained after a new `:load`. This fixes enough leaks to get the tests to pass from D4658. Test Plan: See new tests in D4658 Reviewers: niteria, bgamari, simonpj, erikd Subscribers: thomie, carter GHC Trac Issues: #15111 Differential Revision: https://phabricator.haskell.org/D4659
* testsuite: Disable T14697 on WindowsBen Gamari2018-05-151-0/+2
| | | | | | | | | | Test Plan: Validate on Windows Subscribers: thomie, carter GHC Trac Issues: #14697, #15072 Differential Revision: https://phabricator.haskell.org/D4619
* Revert "Simplify callSiteInline a little"Ben Gamari2018-05-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | This lead to some rather significant performance regressions. Specifically, bytes allocated value is too high: Expected T5631(normal) bytes allocated: 1106015512 +/-5% Lower bound T5631(normal) bytes allocated: 1050714736 Upper bound T5631(normal) bytes allocated: 1161316288 Actual T5631(normal) bytes allocated: 1164953208 Deviation T5631(normal) bytes allocated: 5.3 % *** unexpected stat test failure for T5631(normal) max_bytes_used value is too high: Expected T9630(normal) max_bytes_used: 35324712 +/-15% Lower bound T9630(normal) max_bytes_used: 30026005 Upper bound T9630(normal) max_bytes_used: 40623419 Actual T9630(normal) max_bytes_used: 43490984 Deviation T9630(normal) max_bytes_used: 23.1 % *** unexpected stat test failure for T9630(normal) This reverts commit 7271db46c332f15c302b9a55f4ed005cdd0fb898. This reverts commit b750dcc5d9e1df8505788a41d0cf0d92acd17f0d. This reverts commit 33de71fa06d03e6da396a7c0a314fea3b492ab91.
* testsuite: Fix expected allocations of T9020 and T12425Ben Gamari2018-05-151-3/+4
| | | | | These were both improved by d92c7556501a4cdeb7d269c4624992c94d9b3b8b but the changes were lost due to merge silliness.
* Fix performance regressions from #14737Tobias Dammers2018-05-141-1/+3
| | | | | | | | | | | | | | | | | | See #15019. When removing an unnecessary type equality check in #14737, several regression tests failed. The cause was that some coercions that are actually Refl coercions weren't passed in as such, which made the equality check needlessly complex (Refl coercions can be discarded in this particular check immediately, without inspecting the types at all). We fix that, and get additional performance improvements for free. Reviewers: goldfire, bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, thomie, carter Differential Revision: https://phabricator.haskell.org/D4635
* Refactor LitStringSylvain Henry2018-05-131-1/+2
| | | | | | | | | | | | | | | | | | Refactor LitString so that the string length is computed at most once and then stored. Also remove strlen and memcmp wrappers (it seems like they were a workaround for a very old GCC when using -fvia-C). Bumps haddock submodule. Reviewers: bgamari, dfeuer, nickkuk Reviewed By: bgamari, nickkuk Subscribers: nickkuk, dfeuer, thomie, carter Differential Revision: https://phabricator.haskell.org/D4630
* testsuite: Bump T5631 expected allocationsBen Gamari2018-05-051-3/+4
| | | | This was failing on Darwin; I believe this is due to 33de71fa06d0.
* testsuite: Bump T9630 allocations as a result of 33de71fa06d0Ben Gamari2018-05-051-1/+2
| | | | | | This patch made the simplifier inline nested function bindings less aggressively and, while it didn't seem to affect nofib, appears to have regressed T9630 rather considerably.
* testsuite: Bump performance meterics due to 3d38e8284b73Ben Gamari2018-05-011-3/+6
| | | | | This commit bumped T12425, T12234 and T12150 over their expected metrics on OS X.
* Remove unnecessary check in simplCastTobias Dammers2018-04-201-4/+8
| | | | | | | | | | | | | The coercion optimizer will take care of it anyway, and the check is prohibitively expensive. See Trac #14737. Reviewers: bgamari Subscribers: simonpj, thomie, carter Differential Revision: https://phabricator.haskell.org/D4568
* Caching coercion roles in NthCo and coercionKindsRole refactoringTobias Dammers2018-04-201-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While addressing nonlinear behavior related to coercion roles, particularly `NthCo`, we noticed that coercion roles are recalculated often even though they should be readily at hand already in most cases. This patch adds a `Role` to the `NthCo` constructor so that we can cache them rather than having to recalculate them on the fly. https://ghc.haskell.org/trac/ghc/ticket/11735#comment:23 explains the approach. Performance improvement over GHC HEAD, when compiling Grammar.hs (see below): GHC 8.2.1: ``` ghc Grammar.hs 176.27s user 0.23s system 99% cpu 2:56.81 total ``` before patch (but with other optimizations applied): ``` ghc Grammar.hs -fforce-recomp 175.77s user 0.19s system 100% cpu 2:55.78 total ``` after: ``` ../../ghc/inplace/bin/ghc-stage2 Grammar.hs 10.32s user 0.17s system 98% cpu 10.678 total ``` Introduces the following regressions: - perf/compiler/parsing001 (possibly false positive) - perf/compiler/T9872 - perf/compiler/haddock.base Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #11735 Differential Revision: https://phabricator.haskell.org/D4394
* Fix performance of flattener patch (#12919)Alexander Vieth2018-03-261-3/+6
| | | | | | | | | | | This patch, authored by alexvieth and reviewed at D4451, makes performance improvements by critically optimizing parts of the flattener. Summary: T3064, T5321FD, T5321Fun, T9872a, T9872b, T9872c all pass. T9872a and T9872c show improvements beyond the -5% threshold. T9872d fails at 10.9% increased allocations.
* Cache the fingerprint of sOpt_PBartosz Nitka2018-03-021-0/+13
| | | | | | | | | | | | | | | | | | | | | Before this change we would compute a hash of all the command line -optP flags once per file. With a lot of files and many -optP flags, that's a lot of repeated work. I added a new Note that explains the approach and rationale. Test Plan: new test Reviewers: simonmar, simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14697 Differential Revision: https://phabricator.haskell.org/D4445
* Revert "Better stats for T5837"Ben Gamari2018-03-011-2/+1
| | | | This reverts commit d675a354e8db67d87d1f257c3d1d2bf2d58c2b3f.
* Better stats for T5837Simon Peyton Jones2018-02-271-1/+2
| | | | | | | I'm not sure why. It's an odd test, mind you; a weird type-function recursion thing. So I'm not inclined to investigate. Anyway, good!
* testsuite: Bump allocations for T9630Ben Gamari2018-02-251-1/+2
|
* testsuite: Bump allocations for T1969 and T5837Ben Gamari2018-02-191-2/+4
| | | | | | | | Sadly it's not immediately obvious where this regression came from: * T5837 started failing on OS X with 0c2350c293b82e4cb24a66e00b904933bdb1c8f3 * It's not clear when T1969 started failing due to the recent out of memory issues on Harbormaster
* Re-center improved perf for T3064Simon Peyton Jones2018-02-011-1/+2
| | | | | | | | | | | | There's a 6% reduction in allocation on T3064. I think it's due to commit e4ab65bd57b2c39f4af52879654514bb6d5b42a0 Author: Tobias Dammers <tdammers@gmail.com> Date: Wed Jan 31 21:39:45 2018 -0500 Optimize coercionKind (Trac #11735) I'm not certain -- but, hey, it's good news
* Implement BlockArguments (#10843)Takano Akio2018-01-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch implements the BlockArguments extension, as proposed at https://github.com/ghc-proposals/ghc-proposals/pull/90. It also fixes #10855 as a side-effect. This patch adds a large number of shift-reduce conflicts to the parser. All of them concern the ambiguity as to where constructs like `if` and `let` end. Fortunately they are resolved correctly by preferring shift. The patch is based on @gibiansky's ArgumentDo implementation (D1219). Test Plan: ./validate Reviewers: goldfire, bgamari, alanz, mpickering Reviewed By: bgamari, mpickering Subscribers: Wizek, dfeuer, gibiansky, rwbarton, thomie, mpickering, carter GHC Trac Issues: #10843, #10855 Differential Revision: https://phabricator.haskell.org/D4260
* Turn EvTerm (almost) into CoreExpr (#14691)Joachim Breitner2018-01-261-2/+4
| | | | | | | | | | | | | | | | | Ideally, I'd like to do type EvTerm = CoreExpr and the type checker builds the evidence terms as it goes. This failed, becuase the evidence for `Typeable` refers to local identifiers that are added *after* the typechecker solves constraints. Therefore, `EvTerm` stays a data type with two constructors: `EvExpr` for `CoreExpr` evidence, and `EvTypeable` for the others. Delted `Note [Memoising typeOf]`, its reference (and presumably relevance) was removed in 8fa4bf9. Differential Revision: https://phabricator.haskell.org/D4341
* Allocate less in plus_mod_depBartosz Nitka2018-01-231-1/+2
| | | | | | | | | | | | | | | | This gives a 10% allocation improvement on MultiLayerModules. The idea is to reuse existing tuples, instead of constantly constructing new ones. Test Plan: ./validate Reviewers: simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: rwbarton, thomie, simonmar, carter Differential Revision: https://phabricator.haskell.org/D4332
* Use IntSet in DataflowBartosz Nitka2018-01-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, a list was used as a substitute for a heap. This led to quadratic behavior on a simple program (see new test case). This change replaces it with IntSet in effect reverting 5a1a2633553. @simonmar said it's fine to revert as long as nofib results are good. Test Plan: new test case: 20% improvement 3x improvement when N=10000 nofib: I run it twice for before and after because the compile time results are noisy. - Compile Allocations: ``` before before re-run after after re-run -1 s.d. ----- -0.0% -0.1% -0.1% +1 s.d. ----- +0.0% +0.1% +0.1% Average ----- +0.0% -0.0% -0.0% ``` - Compile Time: ``` before before re-run after after re-run -1 s.d. ----- -0.1% -2.3% -2.6% +1 s.d. ----- +5.2% +3.7% +4.4% Average ----- +2.5% +0.7% +0.8% ``` I checked each case and couldn't find consistent slow-down/speed-up on compile time. Full results here: P173 Reviewers: simonpj, simonmar, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter, simonmar GHC Trac Issues: #14667 Differential Revision: https://phabricator.haskell.org/D4329
* Lift constructor tag allocation out of a loopBartosz Nitka2018-01-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, for each constructor that we want to allocate a tag for we would traverse a list of all the constructors in a datatype to determine which tag a constructor should get. This is obviously quadratic and for datatypes with 10k constructors it actually makes a big difference. This change implements the plan outlined by @simonpj in https://mail.haskell.org/pipermail/ghc-devs/2017-October/014974.html which is basically about using a map and constructing it outside the loop. One place where things got a bit awkward was TysWiredIn.hs, it would have been possible to just assign the tags by hand, but that seemed error-prone to me, so I decided to go through a map there as well. Test Plan: ./validate On a file with 10k constructors Before: 8,130,522,344 bytes allocated in the heap Total time 3.682s ( 3.920s elapsed) After: 4,133,478,744 bytes allocated in the heap Total time 2.509s ( 2.750s elapsed) Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: goldfire, rwbarton, thomie, simonmar, carter, simonpj GHC Trac Issues: #14657 Differential Revision: https://phabricator.haskell.org/D4289
* Drop dead Given bindings in setImplicationStatusSimon Peyton Jones2018-01-041-1/+2
| | | | | | | | | | | | | | | | | | Trac #13032 pointed out that we sometimes generate unused bindings for Givens, and (worse still) we can't always discard them later (we don't drop a case binding unless we can prove that the scrutinee is non-bottom. It looks as if this may be a major reason for the performace problems in #14338 (see comment:29). This patch fixes the problem at source, by pruning away all the dead Givens. See Note [Delete dead Given evidence bindings] Remarkably, compiler allocation falls by 23% in perf/compiler/T12227! I have not confirmed whether this change actualy helps with
* Windows: fix all failing tests.Tamar Christina2018-01-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | This makes the testsuite pass clean on Windows again. It also fixes the `libstdc++-6.dll` error harbormaster was showing. I'm marking some tests as isolated tests to reduce their flakiness (mostly concurrency tests) when the test system is under heavy load. Updates process submodule. Test Plan: ./validate Reviewers: hvr, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4277
* Re-centre perf for T5321FunSimon Peyton Jones2017-12-131-1/+2
| | | | | | | | Bytes allocated has fallen by around 5%. I think this due to some of my recent refactoring of the typechecker, but I'm not certain about exactly which change did it. Good though!
* Factor out readField (#14364)Tobias Dammers2017-10-251-1/+2
| | | | | | | | | | | | | | | | | | | Improves compiler performance of deriving Read instances, as suggested in the issue. Additionally, we introduce `readSymField`, a companion to `readField` that parses symbol-type fields (where the field name is a symbol, e.g. `(#)`, rather than an alphanumeric identifier. The decision between these two functions is made a compile time, because we already know which one we need based on the field name. Reviewers: austin, hvr, bgamari, RyanGlScott Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4108
* Fix space leak in BinIface.getSymbolTableDouglas Wilson2017-10-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Replace a call to mapAccumR, which uses linear stack space, with a gadget that uses constant space. Remove an unused parameter from fromOnDiskName. The tests T1292_imports and T4239 are now reporting imported names in a different order. I don't completely understand why, but I presume it is because the symbol tables are now read more strictly. The new order seems better in T1792_imports, and equally random in T4239. There are several performance test improvements. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: alexbiehl, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4124
* testsuite: Bump allocations of T12150Ben Gamari2017-09-211-1/+2
| | | | It looks like this is probably just drift.
* Bump T783 expected allocationsBen Gamari2017-09-081-1/+2
|
* Make Semigroup a superclass of Monoid (re #14191)Herbert Valerio Riedel2017-09-071-1/+2
| | | | | | | | | | | | | | | | | | | Unfortunately, this requires introducing a couple of .hs-boot files to break up import cycles (mostly to provide class & typenames in order to be able to write type signatures). This does not yet re-export `(<>)` from Prelude (while the class-name `Semigroup` is reexported); that will happen in a future commit. Test Plan: local ./validate passed Reviewers: ekmett, austin, bgamari, erikd, RyanGlScott Reviewed By: ekmett, RyanGlScott GHC Trac Issues: #14191 Differential Revision: https://phabricator.haskell.org/D3927
* Clean up opt and llcMoritz Angermann2017-09-061-2/+4
| | | | | | | | | | | | | | | | | | | | | The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean up introduces a shared data structure to carry the arguments we pass to each tool so that corresponding flags are next to each other. It drops the hard coded data layouts in favor of using `-mtriple` and have LLVM infer them. Furthermore we add `clang` as a proper tool, so we don't rely on assuming that `clang` is called `clang` on the `PATH` when using `clang` as the assembler. Finally this diff also changes the type of `optLevel` from `Int` to `Word`, as we do not have negative optimization levels. Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon Reviewed By: kavon Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj, kavon, simonmar, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3352