summaryrefslogtreecommitdiff
path: root/utils/genprimopcode/Main.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Add `{-# LANGUAGE MagicHash #-}` in output of `genprimopcode`Herbert Valerio Riedel2013-10-271-1/+1
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* SIMD primops are now generated using schemas that are polymorphic inGeoffrey Mainland2013-09-221-83/+290
| | | | | | | | | | | | | width and element type. SIMD primops are now polymorphic in vector size and element type, but only internally to the compiler. More specifically, utils/genprimopcode has been extended so that it "knows" about SIMD vectors. This allows us to, for example, write a single definition for the "add two vectors" primop in primops.txt.pp and have it instantiated at many vector types. This generates a primop in GHC.Prim for each vector type at which "add two vectors" is instantiated, but only one data constructor for the PrimOp data type, so the code generator is much, much simpler.
* Do not expose LLVM-only primops in GHC.PrimopWrappers.Geoffrey Mainland2013-09-221-20/+7
| | | | | GHC.PrimopWrappers is only used by GHCi, which cannot evaluate LLVM-only primops in any case.
* Allow primclass and class constraints in primopsJoachim Breitner2013-09-131-9/+32
| | | | In preparation for the primitive class Coercible
* Update email addressesGabor Greif2013-08-221-1/+1
|
* Comparison primops return Int# (Fixes #6135)Jan Stolarek2013-08-141-3/+0
| | | | | | | | | | | | This patch modifies all comparison primops for Char#, Int#, Word#, Double#, Float# and Addr# to return Int# instead of Bool. A value of 1# represents True and 0# represents False. For a more detailed description of motivation for this change, discussion of implementation details and benchmarking results please visit the wiki page: http://hackage.haskell.org/trac/ghc/wiki/PrimBool There's also some cleanup: whitespace fixes in files that were extensively edited in this patch and constant folding rules for Integer div and mod operators (which for some reason have been left out up till now).
* Add a primop attribute llvm_only.Geoffrey Mainland2013-02-011-6/+6
| | | | | The llvm_only attribute indicates that a primop is only available when using the LLVM back-end.
* Add the Int64X2# primitive type and associated primops.Geoffrey Mainland2013-02-011-0/+2
|
* Add the DoubleX2# primitive type and associated primops.Geoffrey Mainland2013-02-011-4/+6
|
* Add the Int32X4# primitive type and associated primops.Paul Monday2013-02-011-2/+5
|
* Add the Float32X4# primitive type and associated primops.Geoffrey Mainland2013-02-011-5/+23
| | | | | | | | | | | | | This patch lays the groundwork needed for primop support for SIMD vectors. In addition to the groundwork, we add support for the FloatX4# primitive type and associated primops. * Add the FloatX4# primitive type and associated primops. * Add CodeGen support for Float vectors. * Compile vector operations to LLVM vector operations in the LLVM code generator. * Make the x86 native backend fail gracefully when encountering vector primops. * Only generate primop wrappers for vector primops when using LLVM.
* Add fixity information to primops (ticket #6026)Michal Terepeta2012-11-231-3/+26
|
* Tabs -> SpacesDavid Terei2012-03-231-220/+213
|
* Add new primtypes 'ArrayArray#' and 'MutableArrayArray#'Manuel M T Chakravarty2011-12-071-15/+16
| | | | | | | | The primitive array types, such as 'ByteArray#', have kind #, but are represented by pointers. They are boxed, but unpointed types (i.e., they cannot be 'undefined'). The two categories of array types —[Mutable]Array# and [Mutable]ByteArray#— are containers for unboxed (and unpointed) as well as for boxed and pointed types. So far, we lacked support for containers for boxed, unpointed types (i.e., containers for the primitive arrays themselves). This is what the new primtypes provide. Containers for boxed, unpointed types are crucial for the efficient implementation of scattered nested arrays, which are central to the new DPH backend library dph-lifted-vseg. Without such containers, we cannot eliminate all unboxing from the inner loops of traversals processing scattered nested arrays.
* 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.
* Handle HValues slightly nicerIan Lynagh2011-10-031-0/+1
| | | | | | We now have addrToAny# rather than addrToHValue#, and both addrToAny# and mkApUpd0# return "Any" rather than "a". This makes it a little easier to see what's going on, and fixes a warning in ByteCodeLink.
* Implement -XConstraintKindMax Bolingbroke2011-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact, this patch adds a new kind Constraint such that: Show :: * -> Constraint (?x::Int) :: Constraint (Int ~ a) :: Constraint And you can write *any* type with kind Constraint to the left of (=>): even if that type is a type synonym, type variable, indexed type or so on. The following (somewhat related) changes are also made: 1. We now box equality evidence. This is required because we want to give (Int ~ a) the *lifted* kind Constraint 2. For similar reasons, implicit parameters can now only be of a lifted kind. (?x::Int#) => ty is now ruled out 3. Implicit parameter constraints are now allowed in superclasses and instance contexts (this just falls out as OK with the new constraint solver) Internally the following major changes were made: 1. There is now no PredTy in the Type data type. Instead GHC checks the kind of a type to figure out if it is a predicate 2. There is now no AClass TyThing: we represent classes as TyThings just as a ATyCon (classes had TyCons anyway) 3. What used to be (~) is now pretty-printed as (~#). The box constructor EqBox :: (a ~# b) -> (a ~ b) 4. The type LCoercion is used internally in the constraint solver and type checker to represent coercions with free variables of type (a ~ b) rather than (a ~# b)
* Follow ghc-prim changesIan Lynagh2011-08-261-1/+1
|
* fix warningsSimon Marlow2011-05-241-1/+3
|
* Assign more accurate code sizes to primops, so that the inliningSimon Marlow2011-05-241-6/+7
| | | | | heuristics work better. Also removed the old unused "needs_wrapper" predicate for primops. This helps with #4978.
* Fix building genprimopcode with GHC 7.0, and remove haskell98 importsIan Lynagh2010-11-021-4/+4
|
* Follow GHC.Bool/GHC.Types mergeIan Lynagh2010-10-231-2/+2
|
* Remove a redundant parameter for mkTupleTy (the arity)simonpj@microsoft.com2009-10-281-2/+1
|
* Include a pointer to GHC.Exts in the generated GHC.Prim docsIan Lynagh2009-08-111-0/+2
|
* Fix warnings when building with the HEADIan Lynagh2009-07-301-1/+0
|
* Fix warnings in genprimopcodeIan Lynagh2009-05-231-9/+10
|
* Move the "This is a generated file" to the top of GHC.PrimIan Lynagh2008-09-051-7/+7
|
* Make genprimopcode generate code that haddock 2 understandsIan Lynagh2008-09-051-10/+26
| | | | | | | Mainly this means adding a binding for all the exports, e.g. as well as gtAddr# :: Addr# -> Addr# -> Bool we also generate gtAddr# = let x = x in x
* () is now in ghc-prim:GHC.UnitIan Lynagh2008-06-241-0/+1
|
* Generate a warning-free GHC.PrimopWrappers. ghc-prim is now -Wall clean.Ian Lynagh2008-06-241-18/+35
|
* Fix some inconsistencies in the code and docs of primitivesIan Lynagh2008-06-231-8/+4
| | | | | | We were inconsistent about whether to use the name "MutArr#" or "MutableArray#". Likewise ByteArr#/ByteArray# and MutByteArr#/MutableByteArray#.
* More commandline flag improvementsIan Lynagh2008-06-161-2/+2
| | | | | | | * Allow -ffoo flags to be deprecated * Mark some -ffoo flags as deprecated * Avoid using deprecated flags in error messages, in the build system, etc * Add a flag to en/disable the deprecated flag warning
* Cabalize ext-core toolsTim Chevalier2008-05-141-2/+3
| | | | | | | | I cabalized the ext-core tools, so now they can be built as a library. The driver program has to be built separately. Also updated genprimopcode to reflect the new module hierarchy for the Core tools.
* Generate fsLit not FSLIT in genprimopcodeIan Lynagh2008-04-121-1/+1
|
* Extra info in genprimopcode --make-ext-core-sourceTim Chevalier2008-04-141-10/+43
| | | | | | | The ext-core typechecker needs to know what types are valid for various kinds of literals, so I changed genprimopcode to dump out that information as well with --make-ext-core-source.
* Extend genprimopcode to print primop types for ext-coreTim Chevalier2008-04-101-2/+94
| | | | | | | I added a new flag, --make-ext-core-source, to genprimopcode. It prints out the type information for primops that the External Core typechecker needs. This replaces the old mechanism where the ext-core tools had a hard-wired Prims module that could get out of sync with the old primops.txt. Now, that won't happen.
* prelude/PrimOp is now mostly warning-freeIan Lynagh2008-03-291-5/+7
| | | | commutableOp seems to be unused, so we're no 100% there yet.
* Use _ rather than "other" in generated codeIan Lynagh2008-03-291-1/+1
|
* remove now-unused usage information (#1003)Simon Marlow2007-05-101-13/+0
|
* Replace genprimopcode's parsec parser with an alex+happy parserIan Lynagh2007-04-101-363/+4
| | | | | This use was the only thing keeping parsec in core-packages, and we already have a dependency on alex+happy anyway.
* Warning police: Avoid name shadowingsven.panne@aedion.de2007-03-141-61/+61
|
* Handle primitive types and pseudo ops when generating LaTeXsven.panne@aedion.de2007-03-141-0/+15
|
* Warning police: Replace patter matching failures by something more informativesven.panne@aedion.de2007-03-141-1/+13
|
* Warning police: Don't rely on defaultingsven.panne@aedion.de2007-03-141-1/+1
|
* Warning police: Removed "Defined but not used" warningssven.panne@aedion.de2007-03-141-25/+25
|
* Warning police: Added type signaturessven.panne@aedion.de2007-03-141-13/+64
|
* Fix #839 (Generate documentation for built-in types and primitve operations)Simon Marlow2007-02-281-25/+67
| | | | | | | | | This patch was originally by dinko.tenev@gmail.com, but I re-recorded it in order to add a better log message. The effect of this patch is to add entries for primitive types in the documentation: Int#, Char#, etc. and to document the built-in identifiers (seq, lazy, inline, unsafeCoerce#).
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+787
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.