summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToLlvm
Commit message (Collapse)AuthorAgeFilesLines
...
* LLVM: support R9 and R10 registersSylvain Henry2020-07-031-0/+2
| | | | | | d535ef006d85dbdb7cda2b09c5bc35cb80108909 allowed the use of up to 10 vanilla registers but didn't update LLVM backend to support them. This patch fixes it.
* LLVM: refactor and comment register padding code (#17920)Sylvain Henry2020-06-232-97/+97
|
* winio: Add Atomic Exchange PrimOp and implement Atomic Ptr exchanges.Tamar Christina2020-06-141-2/+13
| | | | | | | The initial version was rewritten by Tamar Christina. It was rewritten in large parts by Andreas Klebinger. Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
* DynFlags refactoring VIII (#17957)Sylvain Henry2020-06-134-40/+42
| | | | | | | | | | | * Remove several uses of `sdocWithDynFlags`, especially in GHC.Llvm.* * Add LlvmOpts datatype to store Llvm backend options * Remove Outputable instances (for LlvmVar, LlvmLit, LlvmStatic and Llvm.MetaExpr) which require LlvmOpts. * Rename ppMetaExpr into ppMetaAnnotExpr (pprMetaExpr is now used in place of `ppr :: MetaExpr -> SDoc`)
* Clarify leaf module names for new module hierarchyTakenobu Tani2020-06-102-2/+2
| | | | | | | | | | | | | | | | | | | | | This updates comments only. This patch replaces leaf module names according to new module hierarchy [1][2] as followings: * Expand leaf names to easily find the module path: for instance, `Id.hs` to `GHC.Types.Id`. * Modify leaf names according to new module hierarchy: for instance, `Convert.hs` to `GHC.ThToHs`. * Fix typo: for instance, `GHC.Core.TyCo.Rep.hs` to `GHC.Core.TyCo.Rep` See also !3375 [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular [2]: https://gitlab.haskell.org/ghc/ghc/issues/13009
* llvmGen: Consider Relocatable read-only data as not constantReferences: #18137Tuan Le2020-05-211-1/+2
|
* Remove further dead code found by a simple Python script.Brian Foley2020-05-081-27/+1
| | | | | Avoid removing some functions that are part of an API even though they're not used in-tree at the moment.
* Refactor PprDebug handlingSylvain Henry2020-05-011-2/+2
| | | | | | | | | | | If `-dppr-debug` is set, then PprUser and PprDump styles are silently replaced with PprDebug style. This was done in `mkUserStyle` and `mkDumpStyle` smart constructors. As a consequence they needed a DynFlags parameter. Now we keep the original PprUser and PprDump styles until they are used to create an `SDocContext`. I.e. the substitution is only performed in `initSDocContext`.
* Modules: Utils and Data (#13009)Sylvain Henry2020-04-266-24/+24
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Avoid DynFlags in Ppr code (#17957)Sylvain Henry2020-04-211-2/+2
| | | | | | | | | | * replace `DynFlags` parameters with `SDocContext` parameters for a few Ppr related functions: `bufLeftRenderSDoc`, `printSDoc`, `printSDocLn`, `showSDocOneLine`. * remove the use of `pprCols :: DynFlags -> Int` in Outputable. We already have the information via `sdocLineLength :: SDocContext -> Int`
* Refactor CmmStaticsSylvain Henry2020-04-032-4/+4
| | | | | | | | | | In !2959 we noticed that there was some redundant code (in GHC.Cmm.Utils and GHC.Cmm.StgToCmm.Utils) used to deal with `CmmStatics` datatype (before SRT generation) and `RawCmmStatics` datatype (after SRT generation). This patch removes this redundant code by using a single GADT for (Raw)CmmStatics.
* Move blob handling into StgToCmmSylvain Henry2020-04-031-0/+1
| | | | | | | Move handling of big literal strings from CmmToAsm to StgToCmm. It avoids the use of `sdocWithDynFlags` (cf #10143). We might need to move this handling even higher in the pipeline in the future (cf #17960): this patch will make it easier.
* Modules: Types (#13009)Sylvain Henry2020-03-294-9/+9
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Refactoring: use Platform instead of DynFlags when possibleSylvain Henry2020-03-195-110/+128
| | | | | | | | Metric Decrease: ManyConstructors T12707 T13035 T1969
* PmCheck: Implement Long-distance information with Covered setsSebastian Graf2020-02-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider ```hs data T = A | B | C f :: T -> Int f A = 1 f x = case x of A -> 2 B -> 3 C -> 4 ``` Clearly, the RHS returning 2 is redundant. But we don't currently see that, because our approximation to the covered set of the inner case expression just picks up the positive information from surrounding pattern matches. It lacks the context sensivity that `x` can't be `A` anymore! Therefore, we adopt the conceptually and practically superior approach of reusing the covered set of a particular GRHS from an outer pattern match. In this case, we begin checking the `case` expression with the covered set of `f`s second clause, which encodes the information that `x` can't be `A` anymore. After this MR, we will successfully warn about the RHS returning 2 being redundant. Perhaps surprisingly, this was a great simplification to the code of both the coverage checker and the desugarer. Found a redundant case alternative in `unix` submodule, so we have to bump it with a fix. Metric Decrease: T12227
* Modules: Driver (#13009)Sylvain Henry2020-02-215-5/+5
| | | | submodule updates: nofib, haddock
* Disentangle DynFlags and SDocSylvain Henry2020-02-202-4/+6
| | | | | | | | | | | | | Remove several uses of `sdocWithDynFlags`. The remaining ones are mostly CodeGen related (e.g. depend on target platform constants) and will be fixed separately. Metric Decrease: T12425 T9961 WWRec T1969 T14683
* Modules: Llvm (#13009)Sylvain Henry2020-02-186-0/+3241