| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Running the test suite with asserts enabled is somewhat tricky at the
moment as running it with a GHC compiled the DEBUG way has some hundred
failures from the start. These seem to be unrelated to assertions
though. So this provides a toggle to make it easier to debug failing
assertions using the test suite.
|
| |
|
|
|
|
|
|
|
|
| |
Before this patch the compiler depended on the RTS way (threaded or not)
to use atomic incrementation or not. This is wrong because the RTS is
supposed to be switchable at link time, without recompilation.
Now we always use atomic incrementation of the unique counter.
|
| |
|
|
|
|
|
|
|
|
| |
- Remove unneeded ones
- Use <..> for inter-package.
Besides general clean up, helps distinguish between the RTS we link
against vs the RTS we compile for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The #13491 manifests best when we try to crosscompile
from 32-bit (i386-linux) to 64-bit (powerpc64-linux)
system:
./configure --target=powerpc64-unknown-linux-gnu
The build fails at assembly time:
"inplace/bin/ghc-stage1" ... -c rts/StgStartup.cmm
/tmp/ghc19687_0/ghc_4.s: Assembler messages:
/tmp/ghc19687_0/ghc_4.s:11:0: error:
Error: unknown pseudo-op: `.l'
|
11 | .L<\x00>4:
| ^
That happens because UNIQUE_BITS is defined in terms
of WORD_SIZE_IN_BITS macro:
#define UNIQUE_BITS (WORD_SIZE_IN_BITS - 8)
WORD_SIZE_IN_BITS is 64 bits (equals to target value)
while ghc-stage1 is still running on i386-linux
The fix is to stop relying on target macros and use
host's 'sizeof (HsInt)' and 'finiteBitSize' way to
determine unique layout.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: build i386-to-powerpc64 crosscompiler
Reviewers: rwbarton, austin, bgamari
Reviewed By: bgamari
Subscribers: RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D3397
|
|
|
|
| |
It looks like this was likely a cut-and-paste error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently uniques are 32-bits wide. 8 of these bits are for the unique
class, leaving only 24 for the unique number itself. This seems
dangerously small for a large project. Let's use the full range of the
native machine word.
We also add (now largely unnecessary) overflow check to ensure that the
unique number doesn't overflow.
Test Plan: Validate
Reviewers: simonmar, austin, niteria
Reviewed By: niteria
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D2844
GHC Trac Issues: #12944
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To get reproducible/deterministic builds, the way that the Uniques are
assigned shouldn't matter. This allows to test for that.
It add 2 new flags:
* `-dinitial-unique`
* `-dunique-increment`
And by varying these you can get interesting effects:
* `-dinitial-unique=0 -dunique-increment 1` - current sequential
UniqSupply
* `-dinitial-unique=16777215 -dunique-increment -1` - UniqSupply that
generates in decreasing order
* `-dinitial-unique=1 -dunique-increment PRIME` - where PRIME big enough
to overflow often - nonsequential order
I haven't proven the usefullness of the last one yet and it's the reason
why we have to mask the bits with `0xFFFFFF` in `genSym`, so I can
remove it if it becomes contentious.
Test Plan: validate on harbormaster
Reviewers: simonmar, austin, ezyang, bgamari
Reviewed By: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1360
GHC Trac Issues: #4012
|
|
|
|
|
|
|
|
| |
We can no longer use atomic_inc() in the stage1 compiler because its
prototype was recently changed.
Since the stage1 compiler is always single-threaded, only use
atomic_inc() when THREADED_RTS is defined.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unsafeInterleaveIO is used instead of unsafeDupableInterleaveIO because
a mk_supply thunk that is simultaneously entered by two threads should
evaluate to the same UniqSupply.
The UniqSupply counter is now incremented atomically using the RTS's
atomic_inc().
To mitigate the extra overhead of unsafeInterleaveIO in the
single-threaded compiler, noDuplicate# is changed to exit early when
n_capabilities == 1.
|
|
It's no longer used by Data.Unique, so there's no need to have it
in rts any more.
|