summaryrefslogtreecommitdiff
path: root/compiler/utils/GraphColor.hs
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Utils and Data (#13009)Sylvain Henry2020-04-261-375/+0
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Modules: Types (#13009)Sylvain Henry2020-03-291-3/+3
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Use concatMap(M) instead of `concat . map` and the monadic variantÖmer Sinan Ağacan2020-02-201-1/+1
|
* Disable two warnings for files that trigger themTom Ellis2020-01-271-0/+2
| | | | | | incomplete-uni-patterns and incomplete-record-updates will be in -Wall at a future date, so prepare for that by disabling those warnings on files that trigger them.
* Fix typos, via a Levenshtein-style correctorBrian Wignall2020-01-041-1/+1
|
* Cosmetics in GraphColorKrzysztof Gogolewski2018-08-151-1/+1
| | | | | This allows to run ghc-in-ghci when :set -XTypeApplications is in .ghciconfig.
* Fix typosKrzysztof Gogolewski2018-08-051-1/+1
|
* compiler: introduce custom "GhcPrelude" PreludeHerbert Valerio Riedel2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
* Typos in manual and commentsGabor Greif2017-03-141-1/+1
|
* Upgrade UniqSet to a newtypeDavid Feuer2017-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | The fundamental problem with `type UniqSet = UniqFM` is that `UniqSet` has a key invariant `UniqFM` does not. For example, `fmap` over `UniqSet` will generally produce nonsense. * Upgrade `UniqSet` from a type synonym to a newtype. * Remove unused and shady `extendVarSet_C` and `addOneToUniqSet_C`. * Use cached unique in `tyConsOfType` by replacing `unitNameEnv (tyConName tc) tc` with `unitUniqSet tc`. Reviewers: austin, hvr, goldfire, simonmar, niteria, bgamari Reviewed By: niteria Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3146
* Typo in commentGabor Greif2016-08-011-1/+1
|
* Remove uniqSetToListBartosz Nitka2016-07-011-2/+4
| | | | | | | This documents nondeterminism in code generation and removes the nondeterministic ufmToList function. In the future someone will have to use nonDetEltsUFM (with proper explanation) or pprUFM.
* Remove redundant constraints in the compiler itself, found by ↵Simon Peyton Jones2015-01-061-3/+3
| | | | -fwarn-redundant-constraints
* Fix warnings in utils/GraphColor.hsIan Lynagh2012-02-261-4/+26
|
* Whitespace only in utils/GraphColor.hsIan Lynagh2012-02-261-286/+281
|
* Use -fwarn-tabs when validatingIan Lynagh2011-11-041-0/+7
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* Split Reg into vreg/hreg and add register pairsBen.Lippmeier@anu.edu.au2009-05-181-8/+13
| | | | | | | | | | | | | * The old Reg type is now split into VirtualReg and RealReg. * For the graph coloring allocator, the type of the register graph is now (Graph VirtualReg RegClass RealReg), which shows that it colors in nodes representing virtual regs with colors representing real regs. (as was intended) * RealReg contains two contructors, RealRegSingle and RealRegPair, where RealRegPair is used to represent a SPARC double reg constructed from two single precision FP regs. * On SPARC we can now allocate double regs into an arbitrary register pair, instead of reserving some reg ranges to only hold float/double values.
* Make some more modules use LazyUniqFM instead of UniqFMIan Lynagh2008-02-071-1/+1
| | | | | If these modules use UniqFM then we get a stack overflow when compiling modules that use fundeps. I haven't tracked down the actual cause.
* Make some more modules use LazyUniqFM instead of UniqFMIan Lynagh2008-02-071-1/+1
| | | | | If these modules use UniqFM then we get a stack overflow when compiling modules that use fundeps. I haven't tracked down the actual cause.
* Move OPTIONS pragmas above commentsIan Lynagh2007-09-211-1/+1
| | | | Fixes building with -Werror (i.e. validate) and GHC < 6.6
* Tune coalescing in non-iterative register allocatorBen.Lippmeier@anu.edu.au2007-09-171-6/+15
| | | | | | | | | | | If iterative coalescing isn't turned on, then do a single aggressive coalescing pass for the first build/color cycle and then back off to conservative coalescing for subseqent passes. Aggressive coalescing is a cheap way to eliminate lots of the reg-reg moves, but it can make the graph less colorable - if we turn it on for every pass then allocation for code with a large amount of register pressure (ie SHA1) doesn't converge in a sensible number of cycles.
* Bugfix to iterative coalescerBen.Lippmeier@anu.edu.au2007-09-171-2/+2
| | | | | | Coalescences must be applied to the unsimplified graph in the same order they were found by the iterative coalescing algorithm - otherwise the vreg rewrite mapping will be wrong and badness will ensue.
* Change spill cost function back to inverse length of live range.Ben.Lippmeier@anu.edu.au2007-09-141-1/+1
| | | | | | | | | | On further testing it turns out that using Chaitin's spill cost formula of counting the number of uses of a var and then dividing by the degree of the node isn't actually a win. Perhaps because this isn't counting the number of actual spills inserted in the output code. This would be worth revisiting if other work manages to increase the register pressure in the native code.
* warning policeBen.Lippmeier@anu.edu.au2007-09-131-2/+1
|
* comment wibblesBen.Lippmeier@anu.edu.au2007-09-121-8/+8
|
* move generic graph-colouring code into utilSimon Marlow2007-09-121-0/+332
It is needed by cmm/StackColor, and hence is needed even when there is no native code generator.