summaryrefslogtreecommitdiff
path: root/rts/PrimOps.cmm
diff options
context:
space:
mode:
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>2018-01-29 18:25:00 -0500
committerBen Gamari <ben@smart-cactus.org>2018-01-29 18:25:00 -0500
commit1205629228064537545a0be9c2e9a995aa2dcd03 (patch)
tree58b17898f7ac63f140bc6fb25ef68e94681ff763 /rts/PrimOps.cmm
parent96d2eb27eb86540796944253ce47b2bcd6a2df1c (diff)
downloadhaskell-1205629228064537545a0be9c2e9a995aa2dcd03.tar.gz
Add likely annotation to cmm files in a few obvious places.
Provide information about paths more likely to be taken in the cmm files used by the rts. This leads to slightly better assembly being generated. Reviewers: bgamari, erikd, simonmar Subscribers: alexbiehl, rwbarton, thomie, carter GHC Trac Issues: #14672 Differential Revision: https://phabricator.haskell.org/D4324
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r--rts/PrimOps.cmm6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 2b3a304d06..fb9db0aa45 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -263,7 +263,7 @@ stg_newArrayzh ( W_ n /* words */, gcptr init )
// Initialise all elements of the array with the value in R2
p = arr + SIZEOF_StgMutArrPtrs;
for:
- if (p < arr + SIZEOF_StgMutArrPtrs + WDS(n)) {
+ if (p < arr + SIZEOF_StgMutArrPtrs + WDS(n)) (likely: True) {
W_[p] = init;
p = p + WDS(1);
goto for;
@@ -392,7 +392,7 @@ stg_newArrayArrayzh ( W_ n /* words */ )
// Initialise all elements of the array with a pointer to the new array
p = arr + SIZEOF_StgMutArrPtrs;
for:
- if (p < arr + SIZEOF_StgMutArrPtrs + WDS(n)) {
+ if (p < arr + SIZEOF_StgMutArrPtrs + WDS(n)) (likely: True) {
W_[p] = arr;
p = p + WDS(1);
goto for;
@@ -426,7 +426,7 @@ stg_newSmallArrayzh ( W_ n /* words */, gcptr init )
// Initialise all elements of the array with the value in R2
p = arr + SIZEOF_StgSmallMutArrPtrs;
for:
- if (p < arr + SIZEOF_StgSmallMutArrPtrs + WDS(n)) {
+ if (p < arr + SIZEOF_StgSmallMutArrPtrs + WDS(n)) (likely: True) {
W_[p] = init;
p = p + WDS(1);
goto for;