| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Except for CgUtils.fixStgRegisters that is used in the NCG and LLVM
backends, and should probably be moved somewhere else.
|
|
|
|
|
| |
Mostly d -> g (matching DynFlag -> GeneralFlag).
Also renamed if* to when*, matching the Haskell if/when names
|
| |
|
| |
|
|
|
|
| |
This frees wORD_SIZE up to be moved out of HaskellConstants
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
I've switched to passing DynFlags rather than Platform, as (a) it's
simpler to not have to extract targetPlatform in so many places, and
(b) it may be useful to have DynFlags around in future.
|
| |
|
|
|
|
| |
We don't actually use it yet
|
|
|
|
|
|
|
| |
Fixes cgrun071 on recent Mac OS X versions.
This is the right fix at least until we have proper types for Word8#,
Word16# etc.
|
| |
|
| |
|
|
|
|
| |
All the flags that 'ways' imply are now dynamic
|
|
|
|
| |
Essentially, this is a wrapper around memset
|
|
|
|
|
|
|
|
| |
It allows you to do
(high, low) `quotRem` d
provided high < d.
Currently only has an inefficient fallback implementation.
|
| |
|
| |
|
|
|
|
| |
Currently no NCGs support it
|
|
|
|
| |
No special-casing in any NCGs yet
|
|
|
|
| |
Only amd64 has an efficient implementation currently.
|
|
|
|
|
| |
This means we no longer do a division twice when we are using quotRem
(on platforms on which the op is supported; currently only amd64).
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Otherwise the LLVM backend gets confused over whether its type should be
"void (i8*, i8*)" or "i64 (i8*, i8*)".
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
|
|
|
|
|
| |
- add getCCSOf# :: a -> State# s -> (# State# s, Addr# #)
(returns the CCS attached to the supplied object)
- remove traceCcs# (obsoleted by getCCSOf#)
- rename getCCCS# to getCurrentCCS#
|
|
|
|
|
| |
Returns a pointer to the current cost-centre stack when profiling,
NULL otherwise.
|
| |
|
|
|
|
|
| |
We only use it for "compiler" sources, i.e. not for libraries.
Many modules have a -fno-warn-tabs kludge for now.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
seq# :: a -> State# s -> (# State# s, a #)
spark# :: a -> State# s -> (# State# s, a #)
seq# is a version of seq that can be used in a State#-passing
context. We will use it to implement Control.Exception.evaluate and
thus fix #5129. Also we have plans to use it to fix #5262.
spark# is to seq# as par is to pseq. That is, it creates a spark in a
State#-passing context. We will use spark# and seq# to implement rpar
and rseq respectively in an improved implementation of the Eval monad.
|
|
|
|
|
|
|
|
| |
Assigning the arguments to temporaries was only needed in the case of
emitCopyArray, where the arguments are alive across the call. That is
not the case in emitCopyByteArray.
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
|
| |
The following patches were ported:
d0faaa6 Fix segfault in array copy primops on 32-bit
18691d4 Make assignTemp_ less pessimistic
9c23f06 Make array copy primops inline
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
| |
The second argument to C's memset was passed as a W8 while memset
expects an int.
Signed-off-by: David Terei <davidterei@gmail.com>
|
| |
|
|
|
|
| |
so it worked before anyway). Makes us more future-proof, at least
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The card table is an array of bytes, placed directly following the
actual array data. This means that array reading is unaffected, but
array writing needs to read the array size from the header in order to
find the card table.
We use a bytemap rather than a bitmap, because updating the card table
must be multi-thread safe. Each byte refers to 128 entries of the
array, but this is tunable by changing the constant
MUT_ARR_PTRS_CARD_BITS in includes/Constants.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The type of the CmmLabel ctor is now
CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel
- When you construct a CmmLabel you have to explicitly say what
package it is in. Many of these will just use rtsPackageId, but
I've left it this way to remind people not to pretend labels are
in the RTS package when they're not.
- When parsing a Cmm file, labels that are not defined in the
current file are assumed to be in the RTS package.
Labels imported like
import label
are assumed to be in a generic "foreign" package, which is different
from the current one.
Labels imported like
import "package-name" label
are marked as coming from the named package.
This last one is needed for the integer-gmp library as we want to
refer to labels that are not in the same compilation unit, but
are in the same non-rts package.
This should help remove the nasty #ifdef __PIC__ stuff from
integer-gmp/cbits/gmp-wrappers.cmm
|
| |
|
| |
|