Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Kaznacheev
GHC
Commits
f62d4d4d
Commit
f62d4d4d
authored
4 years ago
by
Tamar Christina
Committed by
Zubin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rts: move xxxHash out of the user namespace
(cherry picked from commit
74c87414
)
parent
ba78f87b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
hadrian/src/Settings/Packages.hs
+2
-4
2 additions, 4 deletions
hadrian/src/Settings/Packages.hs
rts/Hash.c
+13
-0
13 additions, 0 deletions
rts/Hash.c
rts/ghc.mk
+5
-2
5 additions, 2 deletions
rts/ghc.mk
rts/rts.cabal.in
+5
-1
5 additions, 1 deletion
rts/rts.cabal.in
with
25 additions
and
7 deletions
hadrian/src/Settings/Packages.hs
+
2
−
4
View file @
f62d4d4d
...
@@ -309,10 +309,8 @@ rtsPackageArgs = package rts ? do
...
@@ -309,10 +309,8 @@ rtsPackageArgs = package rts ? do
-- We're after pur performance here. So make sure fast math and
-- We're after pur performance here. So make sure fast math and
-- vectorization is enabled.
-- vectorization is enabled.
,
input
"**/xxhash.c"
?
pure
,
input
"**/Hash.c"
?
pure
[
"-O3"
[
"-O3"
]
,
"-ffast-math"
,
"-ftree-vectorize"
]
,
inputs
[
"**/Evac.c"
,
"**/Evac_thr.c"
]
?
arg
"-funroll-loops"
,
inputs
[
"**/Evac.c"
,
"**/Evac_thr.c"
]
?
arg
"-funroll-loops"
...
...
This diff is collapsed.
Click to expand it.
rts/Hash.c
+
13
−
0
View file @
f62d4d4d
...
@@ -13,6 +13,19 @@
...
@@ -13,6 +13,19 @@
#include
"Hash.h"
#include
"Hash.h"
#include
"RtsUtils.h"
#include
"RtsUtils.h"
/* This file needs to be compiled with vectorization enabled. Unfortunately
since we compile these things these days with cabal we can no longer
specify optimization per file. So we have to resort to pragmas. */
#if defined(__GNUC__) || defined(__GNUG__)
#pragma GCC push_options
#pragma GCC optimize ("O3")
#endif
#define XXH_NAMESPACE __rts_
#define XXH_STATIC_LINKING_ONLY
/* access advanced declarations */
#define XXH_PRIVATE_API
#include
"xxhash.h"
#include
"xxhash.h"
#include
<string.h>
#include
<string.h>
...
...
This diff is collapsed.
Click to expand it.
rts/ghc.mk
+
5
−
2
View file @
f62d4d4d
...
@@ -45,7 +45,10 @@ else
...
@@ -45,7 +45,10 @@ else
ALL_DIRS
+=
posix
ALL_DIRS
+=
posix
endif
endif
rts_C_SRCS
:=
$(
wildcard rts/
*
.c
$(
foreach
dir
,
$(
ALL_DIRS
)
,rts/
$(
dir
)
/
*
.c
))
tmp_rts_C_SRCS
:=
$(
wildcard rts/
*
.c
$(
foreach
dir
,
$(
ALL_DIRS
)
,rts/
$(
dir
)
/
*
.c
))
# We shouldn't include this file in the binary, it's a common function so
# it will likely clash with something later. See #19948
rts_C_SRCS
=
$(
filter-out rts/xxhash.c,
$(
tmp_rts_C_SRCS
))
rts_C_HOOK_SRCS
:=
$(
wildcard rts/hooks/
*
.c
)
rts_C_HOOK_SRCS
:=
$(
wildcard rts/hooks/
*
.c
)
rts_CMM_SRCS
:=
$(
wildcard rts/
*
.cmm
)
rts_CMM_SRCS
:=
$(
wildcard rts/
*
.cmm
)
...
@@ -428,7 +431,7 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\"
...
@@ -428,7 +431,7 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\"
rts/
RtsUtils_CC_OPTS
+=
-DGhcUnregisterised
=
\"
$(
GhcUnregisterised
)
\"
rts/
RtsUtils_CC_OPTS
+=
-DGhcUnregisterised
=
\"
$(
GhcUnregisterised
)
\"
rts/
RtsUtils_CC_OPTS
+=
-DTablesNextToCode
=
\"
$(
TablesNextToCode
)
\"
rts/
RtsUtils_CC_OPTS
+=
-DTablesNextToCode
=
\"
$(
TablesNextToCode
)
\"
#
#
rts/
xxh
ash_CC_OPTS
+=
-O3
-ffast-math
-ftree-vectorize
rts/
H
ash_CC_OPTS
+=
-O3
# Compile various performance-critical pieces *without* -fPIC -dynamic
# Compile various performance-critical pieces *without* -fPIC -dynamic
# even when building a shared library. If we don't do this, then the
# even when building a shared library. If we don't do this, then the
...
...
This diff is collapsed.
Click to expand it.
rts/rts.cabal.in
+
5
−
1
View file @
f62d4d4d
...
@@ -497,10 +497,14 @@ library
...
@@ -497,10 +497,14 @@ library
sm/Scav_thr.c
sm/Scav_thr.c
sm/Storage.c
sm/Storage.c
sm/Sweep.c
sm/Sweep.c
xxhash.c
fs.c
fs.c
-- I wish we had wildcards..., this would be:
-- I wish we had wildcards..., this would be:
-- *.c hooks/**/*.c sm/**/*.c eventlog/**/*.c linker/**/*.c
-- *.c hooks/**/*.c sm/**/*.c eventlog/**/*.c linker/**/*.c
extra-source-files:
-- This file needs to be in the package but shouldn't be compiled on its own.
xxhash.c
if os(windows)
if os(windows)
c-sources: win32/AsyncIO.c
c-sources: win32/AsyncIO.c
win32/AwaitEvent.c
win32/AwaitEvent.c
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment