summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Graph
Commit message (Collapse)AuthorAgeFilesLines
* Stop exporting, and stop using, functions marked as deprecatedThomas Miedema2014-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Don't export `getUs` and `getUniqueUs`. `UniqSM` has a `MonadUnique` instance: instance MonadUnique UniqSM where getUniqueSupplyM = getUs getUniqueM = getUniqueUs getUniquesM = getUniquesUs Commandline-fu used: git grep -l 'getUs\>' | grep -v compiler/basicTypes/UniqSupply.lhs | xargs sed -i 's/getUs/getUniqueSupplyM/g git grep -l 'getUniqueUs\>' | grep -v combiler/basicTypes/UniqSupply.lhs | xargs sed -i 's/getUniqueUs/getUniqueM/g' Follow up on b522d3a3f970a043397a0d6556ca555648e7a9c3 Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D220
* Delete hack that was once needed to fix the buildThomas Miedema2014-09-251-0/+1
| | | | | | | | | | | | | | | | | Summary: Introduced in 6c7b41cc2b24f533697a62bf1843507ae043fc97. I checked the rest of that commit, and this is all that was left to revert. Test Plan: x Reviewers: ezyang, austin Reviewed By: ezyang, austin Subscribers: simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D241
* Add LANGUAGE pragmas to compiler/ source filesHerbert Valerio Riedel2014-05-153-1/+4
| | | | | | | | | | | | | | | | | | In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been reorganized, while following the convention, to - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before any `{-# OPTIONS_GHC #-}`-lines. - Moreover, if the list of language extensions fit into a single `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each individual language extension. In both cases, try to keep the enumeration alphabetically ordered. (The latter layout is preferable as it's more diff-friendly) While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
* ghc: initial AArch64 patchesColin Watson2014-04-211-0/+4
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix a popular typo in commentsGabor Greif2014-02-011-1/+1
|
* TyposKrzysztof Gogolewski2013-10-121-1/+1
|
* Add basic support for GHCJSAustin Seipp2013-09-061-0/+4
| | | | | | | | | | | | | | | | | | | This patch encompasses most of the basic infrastructure for GHCJS. It includes: * A new extension, -XJavaScriptFFI * A new architecture, ArchJavaScript * Parser and lexer support for 'foreign import javascript', only available under -XJavaScriptFFI, using ArchJavaScript. * As a knock-on, there is also a new 'WayCustom' constructor in DynFlags, so clients of the GHC API can add custom 'tags' to their built files. This should be useful for other users as well. The remaining changes are really just the resulting fallout, making sure all the cases are handled appropriately for DynFlags and Platform. Authored-by: Luite Stegeman <stegeman@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Haddoc fixBen Lippmeier2012-11-141-9/+9
|
* Comments and formatting to register allocator statsBen Lippmeier2012-11-141-38/+87
|
* Comments and formatting to spill cost codeBen Lippmeier2012-11-141-52/+62
|
* Comments and formatting to spill cleanerBen Lippmeier2012-11-141-147/+166
| | | | No functional changes.
* Comments and formatting to register allocatorsBen Lippmeier2012-11-145-252/+326
| | | | No functional changes.
* De-tabify register allocator codeBen Lippmeier2012-11-145-729/+692
|
* Tell the compiler about alpha, mipseb and mipsel again; fixes #7339Ian Lynagh2012-11-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the compiler parts of commit 7b594a5d7ac29972db39228e9c8b7f384313f39b Author: David Terei <davidterei@gmail.com> Date: Mon Nov 21 12:05:18 2011 -0800 Remove registerised code for dead architectures: mips, ia64, alpha, hppa1, m68k In particular, we want to know whether bewareLoadStoreAlignment should return True or False for them. It also reverts commit 3fc68b5c356b39b2b52a86d953367d0021c13262 Author: Simon Marlow <marlowsd@gmail.com> Date: Wed Jan 4 11:44:02 2012 +0000 Remove missing archs (mipseb, mipsel, alpha) (#5734) It doesn't hurt to map these to ArchUnknown since we don't need to know anything specific about them, and adding them would be a pain (there are a bunch of places where we have to case-match on all the arches to avoid warnings).
* Remove OldCmm, convert backends to consume new CmmSimon Marlow2012-11-125-6/+5
| | | | | | | | | | | | | | | | | | This removes the OldCmm data type and the CmmCvt pass that converts new Cmm to OldCmm. The backends (NCGs, LLVM and C) have all been converted to consume new Cmm. The main difference between the two data types is that conditional branches in new Cmm have both true/false successors, whereas in OldCmm the false case was a fallthrough. To generate slightly better code we occasionally need to invert a conditional to ensure that the branch-not-taken becomes a fallthrough; this was previously done in CmmCvt, and it is now done in CmmContFlowOpt. We could go further and use the Hoopl Block representation for native code, which would mean that we could use Hoopl's postorderDfs and analyses for native code, but for now I've left it as is, using the old ListGraph representation for native code.
* Attach global register liveness info to Cmm procedures.Geoffrey Mainland2012-10-304-6/+6
| | | | | | | All Cmm procedures now include the set of global registers that are live on procedure entry, i.e., the global registers used to pass arguments to the procedure. Only global registers that are use to pass arguments are included in this list.
* Refactor the way dump flags are handledIan Lynagh2012-10-181-3/+3
| | | | | | | | | | | | | We were being inconsistent about how we tested whether dump flags were enabled; in particular, sometimes we also checked the verbosity, and sometimes we didn't. This lead to oddities such as "ghc -v4" printing an "Asm code" section which didn't contain any code, and "-v4" enabled some parts of "-ddump-deriv" but not others. Now all the tests use dopt, which also takes the verbosity into account as appropriate.
* Some alpha renamingIan Lynagh2012-10-161-6/+6
| | | | | Mostly d -> g (matching DynFlag -> GeneralFlag). Also renamed if* to when*, matching the Haskell if/when names
* Make addSRM to strict additionsIan Lynagh2012-09-201-1/+4
| | | | I assume that this is what is intended, as it is used with foldl'
* Fix warnings in RegAlloc.Graph.StatsIan Lynagh2012-09-201-1/+6
|
* Whitespace only in nativeGen/RegAlloc/Graph/Stats.hsIan Lynagh2012-09-201-198/+192
|
* Move some more constants into platformConstantsIan Lynagh2012-09-141-1/+1
|
* Pass platform down to lastxmmIan Lynagh2012-08-214-20/+27
|
* Fix a warningIan Lynagh2012-07-161-1/+7
|
* Remove redundant warning suppressionIan Lynagh2012-07-161-1/+0
|
* Remove more unused Platform argumentsIan Lynagh2012-06-132-6/+4
|
* Remove PlatformOutputableIan Lynagh2012-06-133-23/+23
| | | | | We can now get the Platform from the DynFlags inside an SDoc, so we no longer need to pass the Platform in.
* Whitespace only in nativeGen/RegAlloc/Graph/Main.hsIan Lynagh2012-06-131-306/+299
|
* add support for ARM hard-float ABI (fixes #5914)Karel Gardas2012-04-271-28/+28
| | | | | | | This patch enhances Platform's ArchARM to include ARM ABI value. It also tweaks configure machinery to detect hard-float ABI and to set it wherever needed. Finally when hard-float ABI is in use, pass appropriate compiler option to the LLVM's llc. Fixes #5914.
* Remove registerised code for dead architectures: mips, ia64, alpha,David Terei2011-11-221-12/+0
| | | | hppa1, m68k
* Use -fwarn-tabs when validatingIan Lynagh2011-11-047-0/+49
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* A little more CPP removalIan Lynagh2011-10-191-0/+12
|
* Revert "Remove ArchUnknown"Ian Lynagh2011-10-191-4/+8
| | | | | | | This reverts commit 2dea11a442e1d14d86fa661804de06a721943bf0. On second thoughts, this does make sense, for unregisterised via-C arches at least.
* Remove ArchUnknownIan Lynagh2011-10-181-8/+4
| | | | | | | It doesn't make sense. If platformArch is ArchUnknown then we don't know the answer to any questions about the arch. So now if we don't recognise the arch we just fail, and the new arch will need to be added to the datatype.
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-022-11/+17
| | | | And some knock-on changes
* Add type sigs to functions in RegAlloc.Graph.SpillIan Lynagh2011-08-311-201/+220
|
* Renaming onlySimon Peyton Jones2011-08-256-26/+26
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* enhance ArchARM with ISA and ISA extensionsKarel Gardas2011-08-211-4/+4
| | | | | | | This patch enhances ArchARM with ARM ISA and ISA extensions details as is suggested in the comment in Platform.hs file. The patch is needed by future patch which will use ARM ISA information in order to pass appropriate command-line option to the LLVM llc tool.
* Fix build with older bootstrapping compilersIan Lynagh2011-07-161-3/+3
|
* Remove more defaultTargetPlatform usesIan Lynagh2011-07-153-53/+58
|
* Remove some more defaultTargetPlatform usesIan Lynagh2011-07-152-9/+10
|
* Remove some defaultTargetPlatform'sIan Lynagh2011-07-153-17/+14
| | | | We now pass the correct platform in instead
* More work towards cross-compilationIan Lynagh2011-07-153-27/+30
| | | | | | | | | | | | There's now a variant of the Outputable class that knows what platform we're targetting: class PlatformOutputable a where pprPlatform :: Platform -> a -> SDoc pprPlatformPrec :: Platform -> Rational -> a -> SDoc and various instances have had to be converted to use that class, and we pass Platform around accordingly.
* Refactoring: use a structured CmmStatics type rather than [CmmStatic]Max Bolingbroke2011-07-056-37/+37
| | | | | | | | | | | | | | | | | | I observed that the [CmmStatics] within CmmData uses the list in a very stylised way. The first item in the list is almost invariably a CmmDataLabel. Many parts of the compiler pattern match on this list and fail if this is not true. This patch makes the invariant explicit by introducing a structured type CmmStatics that holds the label and the list of remaining [CmmStatic]. There is one wrinkle: the x86 backend sometimes wants to output an alignment directive just before the label. However, this can be easily fixed up by parameterising the native codegen over the type of CmmStatics (though the GenCmmTop parameterisation) and using a pair (Alignment, CmmStatics) there instead. As a result, I think we will be able to remove CmmAlign and CmmDataLabel from the CmmStatic data type, thus nuking a lot of code and failing pattern matches. This change will come as part of my next patch.
* add missing cases for ArchARMSimon Marlow2011-06-271-0/+4
|
* Fix the build with GHC 6.12.3Ian Lynagh2011-06-011-28/+28
|
* Remove CPP from nativeGen/RegAlloc/Graph/TrivColorable.hsIan Lynagh2011-05-311-52/+61
| | | | This fixes build problems on arches without an NCG.
* Whitespace only in nativeGen/RegAlloc/Graph/TrivColorable.hsIan Lynagh2011-05-311-93/+93
|
* Merge in new code generator branch.Simon Marlow2011-01-245-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the new code generator to make use of the Hoopl package for dataflow analysis. Hoopl is a new boot package, and is maintained in a separate upstream git repository (as usual, GHC has its own lagging darcs mirror in http://darcs.haskell.org/packages/hoopl). During this merge I squashed recent history into one patch. I tried to rebase, but the history had some internal conflicts of its own which made rebase extremely confusing, so I gave up. The history I squashed was: - Update new codegen to work with latest Hoopl - Add some notes on new code gen to cmm-notes - Enable Hoopl lag package. - Add SPJ note to cmm-notes - Improve GC calls on new code generator. Work in this branch was done by: - Milan Straka <fox@ucw.cz> - John Dias <dias@cs.tufts.edu> - David Terei <davidterei@gmail.com> Edward Z. Yang <ezyang@mit.edu> merged in further changes from GHC HEAD and fixed a few bugs.
* Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupplyIan Lynagh2010-10-211-4/+3
|