Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc
  • bgamari/ghc
  • syd/ghc
  • ggreif/ghc
  • watashi/ghc
  • RolandSenn/ghc
  • mpickering/ghc
  • DavidEichmann/ghc
  • carter/ghc
  • harpocrates/ghc
  • ethercrow/ghc
  • mijicd/ghc
  • adamse/ghc
  • alexbiehl/ghc
  • gridaphobe/ghc
  • trofi/ghc
  • supersven/ghc
  • ppk/ghc
  • ulysses4ever/ghc
  • AndreasK/ghc
  • ghuntley/ghc
  • shayne-fletcher-da/ghc
  • fgaz/ghc
  • yav/ghc
  • osa1/ghc
  • mbbx6spp/ghc
  • JulianLeviston/ghc
  • reactormonk/ghc
  • rae/ghc
  • takenobu-hs/ghc
  • michalt/ghc
  • andrewthad/ghc
  • hsyl20/ghc
  • scottgw/ghc
  • sjakobi/ghc
  • angerman/ghc
  • RyanGlScott/ghc
  • hvr/ghc
  • howtonotwin/ghc
  • chessai/ghc
  • m-renaud/ghc
  • brprice/ghc
  • stevehartdata/ghc
  • sighingnow/ghc
  • kgardas/ghc
  • ckoparkar/ghc
  • alp/ghc
  • smaeul/ghc
  • kakkun61/ghc
  • sykloid/ghc
  • newhoggy/ghc
  • toonn/ghc
  • nineonine/ghc
  • Phyx/ghc
  • ezyang/ghc
  • tweag/ghc
  • langston/ghc
  • ndmitchell/ghc
  • rockbmb/ghc
  • artempyanykh/ghc
  • mniip/ghc
  • mynguyenbmc/ghc
  • alexfmpe/ghc
  • crockeea/ghc
  • nh2/ghc
  • vaibhavsagar/ghc
  • phadej/ghc
  • Haskell-mouse/ghc
  • lolotp/ghc
  • spacekitteh/ghc
  • michaelpj/ghc
  • mgsloan/ghc
  • HPCohen/ghc
  • tmobile/ghc
  • radrow/ghc
  • simonmar/ghc
  • _deepfire/ghc
  • Ericson2314/ghc
  • leitao/ghc
  • fumieval/ghc
  • trac-isovector/ghc
  • cblp/ghc
  • xich/ghc
  • ciil/ghc
  • erthalion/ghc
  • xldenis/ghc
  • autotaker/ghc
  • haskell-wasm/ghc
  • kcsongor/ghc
  • agander/ghc
  • Baranowski/ghc
  • trac-dredozubov/ghc
  • 23Skidoo/ghc
  • iustin/ghc
  • ningning/ghc
  • josefs/ghc
  • kabuhr/ghc
  • gallais/ghc
  • dten/ghc
  • expipiplus1/ghc
  • Pluralia/ghc
  • rohanjr/ghc
  • intricate/ghc
  • kirelagin/ghc
  • Javran/ghc
  • DanielG/ghc
  • trac-mizunashi_mana/ghc
  • pparkkin/ghc
  • bollu/ghc
  • ntc2/ghc
  • jaspervdj/ghc
  • JoshMeredith/ghc
  • wz1000/ghc
  • zkourouma/ghc
  • code5hot/ghc
  • jdprice/ghc
  • tdammers/ghc
  • J-mie6/ghc
  • trac-lantti/ghc
  • ch1bo/ghc
  • cgohla/ghc
  • lucamolteni/ghc
  • acairncross/ghc
  • amerocu/ghc
  • chreekat/ghc
  • txsmith/ghc
  • trupill/ghc
  • typetetris/ghc
  • sergv/ghc
  • fryguybob/ghc
  • erikd/ghc
  • trac-roland/ghc
  • setupminimal/ghc
  • Friede80/ghc
  • SkyWriter/ghc
  • xplorld/ghc
  • abrar/ghc
  • obsidiansystems/ghc
  • Icelandjack/ghc
  • adinapoli/ghc
  • trac-matthewbauer/ghc
  • heatsink/ghc
  • dwijnand/ghc
  • Cmdv/ghc
  • alinab/ghc
  • pepeiborra/ghc
  • fommil/ghc
  • luochen1990/ghc
  • rlupton20/ghc
  • applePrincess/ghc
  • lehins/ghc
  • ronmrdechai/ghc
  • leeadam/ghc
  • harendra/ghc
  • mightymosquito1991/ghc
  • trac-gershomb/ghc
  • lucajulian/ghc
  • Rizary/ghc
  • VictorCMiraldo/ghc
  • jamesbrock/ghc
  • andrewdmeier/ghc
  • luke/ghc
  • pranaysashank/ghc
  • cocreature/ghc
  • hithroc/ghc
  • obreitwi/ghc
  • slrtbtfs/ghc
  • kaol/ghc
  • yairchu/ghc
  • Mathemagician98/ghc
  • trac-taylorfausak/ghc
  • leungbk/ghc
  • MichaWiedenmann/ghc
  • chris-martin/ghc
  • TDecki/ghc
  • adithyaov/ghc
  • trac-gelisam/ghc
  • Lysxia/ghc
  • complyue/ghc
  • bwignall/ghc
  • sternmull/ghc
  • sonika/ghc
  • leif/ghc
  • broadwaylamb/ghc
  • myszon/ghc
  • danbroooks/ghc
  • Mechachleopteryx/ghc
  • zardyh/ghc
  • trac-vdukhovni/ghc
  • OmarKhaledAbdo/ghc
  • arrowd/ghc
  • Bodigrim/ghc
  • matheus23/ghc
  • cardenaso11/ghc
  • trac-Athas/ghc
  • mb720/ghc
  • DylanZA/ghc
  • liff/ghc
  • typedrat/ghc
  • trac-claude/ghc
  • jbm/ghc
  • Gertjan423/ghc
  • PHO/ghc
  • JKTKops/ghc
  • kockahonza/ghc
  • msakai/ghc
  • Sir4ur0n/ghc
  • barambani/ghc
  • vishnu.c/ghc
  • dcoutts/ghc
  • trac-runeks/ghc
  • trac-MaxGabriel/ghc
  • lexi.lambda/ghc
  • strake/ghc
  • spavikevik/ghc
  • JakobBruenker/ghc
  • rmanne/ghc
  • gdziadkiewicz/ghc
  • ani/ghc
  • iliastsi/ghc
  • smunix/ghc
  • judah/ghc
  • blackgnezdo/ghc
  • emilypi/ghc
  • trac-bpfoley/ghc
  • muesli4/ghc
  • trac-gkaracha/ghc
  • Kleidukos/ghc
  • nek0/ghc
  • TristanCacqueray/ghc
  • dwulive/ghc
  • mbakke/ghc
  • arybczak/ghc
  • Yang123321/ghc
  • maksbotan/ghc
  • QuietMisdreavus/ghc
  • trac-olshanskydr/ghc
  • emekoi/ghc
  • samuela/ghc
  • josephcsible/ghc
  • dramforever/ghc
  • lpsmith/ghc
  • DenisFrezzato/ghc
  • michivi/ghc
  • jneira/ghc
  • jeffhappily/ghc
  • Ivan-Yudin/ghc
  • nakaji-dayo/ghc
  • gdevanla/ghc
  • galen/ghc
  • fendor/ghc
  • yaitskov/ghc
  • rcythr/ghc
  • awpr/ghc
  • jeremyschlatter/ghc
  • Aver1y/ghc
  • mitchellvitez/ghc
  • merijn/ghc
  • tomjaguarpaw1/ghc
  • trac-NoidedSuper/ghc
  • erewok/ghc
  • trac-junji.hashimoto/ghc
  • adamwespiser/ghc
  • bjaress/ghc
  • jhrcek/ghc
  • leonschoorl/ghc
  • lukasz-golebiewski/ghc
  • sheaf/ghc
  • last-g/ghc
  • carassius1014/ghc
  • eschwartz/ghc
  • dwincort/ghc
  • felixwiemuth/ghc
  • TimWSpence/ghc
  • marcusmonteirodesouza/ghc
  • WJWH/ghc
  • vtols/ghc
  • theobat/ghc
  • BinderDavid/ghc
  • ckoparkar0/ghc
  • alexander-kjeldaas/ghc
  • dme2/ghc
  • philderbeast/ghc
  • aaronallen8455/ghc
  • rayshih/ghc
  • benkard/ghc
  • mpardalos/ghc
  • saidelman/ghc
  • leiftw/ghc
  • ca333/ghc
  • bwroga/ghc
  • nmichael44/ghc
  • trac-crobbins/ghc
  • felixonmars/ghc
  • adityagupta1089/ghc
  • hgsipiere/ghc
  • treeowl/ghc
  • alexpeits/ghc
  • CraigFe/ghc
  • dnlkrgr/ghc
  • kerckhove_ts/ghc
  • cptwunderlich/ghc
  • eiais/ghc
  • hahohihu/ghc
  • sanchayan/ghc
  • lemmih/ghc
  • sehqlr/ghc
  • trac-dbeacham/ghc
  • luite/ghc
  • trac-f-a/ghc
  • vados/ghc
  • luntain/ghc
  • fatho/ghc
  • alexbiehl-gc/ghc
  • dcbdan/ghc
  • tvh/ghc
  • liam-ly/ghc
  • timbobbarnes/ghc
  • GovanifY/ghc
  • shanth2600/ghc
  • gliboc/ghc
  • duog/ghc
  • moxonsghost/ghc
  • zander/ghc
  • masaeedu/ghc
  • georgefst/ghc
  • guibou/ghc
  • nicuveo/ghc
  • mdebruijne/ghc
  • stjordanis/ghc
  • emiflake/ghc
  • wygulmage/ghc
  • frasertweedale/ghc
  • coot/ghc
  • aratamizuki/ghc
  • tsandstr/ghc
  • mrBliss/ghc
  • Anton-Latukha/ghc
  • tadfisher/ghc
  • vapourismo/ghc
  • Sorokin-Anton/ghc
  • basile-henry/ghc
  • trac-mightybyte/ghc
  • AbsoluteNikola/ghc
  • cobrien99/ghc
  • songzh/ghc
  • blamario/ghc
  • aj4ayushjain/ghc
  • trac-utdemir/ghc
  • tangcl/ghc
  • hdgarrood/ghc
  • maerwald/ghc
  • arjun/ghc
  • ratherforky/ghc
  • haskieLambda/ghc
  • EmilGedda/ghc
  • Bogicevic/ghc
  • eddiejessup/ghc
  • kozross/ghc
  • AlistairB/ghc
  • 3Rafal/ghc
  • christiaanb/ghc
  • trac-bit/ghc
  • matsumonkie/ghc
  • trac-parsonsmatt/ghc
  • chisui/ghc
  • jaro/ghc
  • trac-kmiyazato/ghc
  • davidsd/ghc
  • Tritlo/ghc
  • I-B-3/ghc
  • lykahb/ghc
  • AriFordsham/ghc
  • turion1/ghc
  • berberman/ghc
  • christiantakle/ghc
  • zyklotomic/ghc
  • trac-ocramz/ghc
  • CSEdd/ghc
  • doyougnu/ghc
  • mmhat/ghc
  • why-not-try-calmer/ghc
  • plutotulp/ghc
  • kjekac/ghc
  • Manvi07/ghc
  • teo/ghc
  • cactus/ghc
  • CarrieMY/ghc
  • abel/ghc
  • yihming/ghc
  • tsakki/ghc
  • jessicah/ghc
  • oliverbunting/ghc
  • meld/ghc
  • friedbrice/ghc
  • Joald/ghc
  • abarbu/ghc
  • DigitalBrains1/ghc
  • sterni/ghc
  • alexDarcy/ghc
  • hexchain/ghc
  • minimario/ghc
  • zliu41/ghc
  • tommd/ghc
  • jazcarate/ghc
  • peterbecich/ghc
  • alirezaghey/ghc
  • solomon/ghc
  • mikael.urankar/ghc
  • davjam/ghc
  • int-index/ghc
  • MorrowM/ghc
  • nrnrnr/ghc
  • Sonfamm/ghc-test-only
  • afzt1/ghc
  • nguyenhaibinh-tpc/ghc
  • trac-lierdakil/ghc
  • MichaWiedenmann1/ghc
  • jmorag/ghc
  • Ziharrk/ghc
  • trac-MitchellSalad/ghc
  • juampe/ghc
  • jwaldmann/ghc
  • snowleopard/ghc
  • juhp/ghc
  • normalcoder/ghc
  • ksqsf/ghc
  • trac-jberryman/ghc
  • roberth/ghc
  • 1ntEgr8/ghc
  • epworth/ghc
  • MrAdityaAlok/ghc
  • JunmingZhao42/ghc
  • jappeace/ghc
  • trac-Gabriel439/ghc
  • alt-romes/ghc
  • HugoPeters1024/ghc
  • 10ne1/ghc-fork
  • agentultra/ghc
  • Garfield1002/ghc
  • ChickenProp/ghc
  • clyring/ghc
  • MaxHearnden/ghc
  • jumper149/ghc
  • vem/ghc
  • ketzacoatl/ghc
  • Rosuavio/ghc
  • jackohughes/ghc
  • p4l1ly/ghc
  • konsumlamm/ghc
  • shlevy/ghc
  • torsten.schmits/ghc
  • andremarianiello/ghc
  • amesgen/ghc
  • googleson78/ghc
  • InfiniteVerma/ghc
  • uhbif19/ghc
  • yiyunliu/ghc
  • raehik/ghc
  • mrkun/ghc
  • telser/ghc
  • 1Jajen1/ghc
  • slotThe/ghc
  • WinstonHartnett/ghc
  • mpilgrem/ghc
  • dreamsmasher/ghc
  • schuelermine/ghc
  • trac-Viwor/ghc
  • undergroundquizscene/ghc
  • evertedsphere/ghc
  • coltenwebb/ghc
  • oberblastmeister/ghc
  • agrue/ghc
  • lf-/ghc
  • zacwood9/ghc
  • steshaw/ghc
  • high-cloud/ghc
  • SkamDart/ghc
  • PiDelport/ghc
  • maoif/ghc
  • RossPaterson/ghc
  • CharlesTaylor7/ghc
  • ribosomerocker/ghc
  • trac-ramirez7/ghc
  • daig/ghc
  • NicolasT/ghc
  • FinleyMcIlwaine/ghc
  • lawtonnichols/ghc
  • jmtd/ghc
  • ozkutuk/ghc
  • wildsebastian/ghc
  • nikshalark/ghc
  • lrzlin/ghc
  • tobias/ghc
  • fw/ghc
  • hawkinsw/ghc
  • type-dance/ghc
  • rui314/ghc
  • ocharles/ghc
  • wavewave/ghc
  • TheKK/ghc
  • nomeata/ghc
  • trac-csabahruska/ghc
  • jonathanjameswatson/ghc
  • L-as/ghc
  • Axman6/ghc
  • barracuda156/ghc
  • trac-jship/ghc
  • jake-87/ghc
  • meooow/ghc
  • rebeccat/ghc
  • hamana55/ghc
  • Enigmage/ghc
  • kokobd/ghc
  • agevelt/ghc
  • gshen42/ghc
  • chrismwendt/ghc
  • MangoIV/ghc
  • teto/ghc
  • Sookr1/ghc
  • trac-thomasjm/ghc
  • barci2/ghc-dev
  • trac-m4dc4p/ghc
  • dixonary/ghc
  • breakerzirconia/ghc
  • alexsio27444/ghc
  • glocq/ghc
  • sourabhxyz/ghc
  • ryantrinkle/ghc
  • Jade/ghc
  • scedfaliako/ghc
  • martijnbastiaan/ghc
  • trac-george.colpitts/ghc
  • ammarbinfaisal/ghc
  • mimi.vx/ghc
  • lortabac/ghc
  • trac-zyla/ghc
  • benbellick/ghc
  • aadaa-fgtaa/ghc
  • jvanbruegge/ghc
  • archbung/ghc
  • gilmi/ghc
  • mfonism/ghc
  • alex-mckenna/ghc
  • Ei30metry/ghc
  • DiegoDiverio/ghc
  • jorgecunhamendes/ghc
  • liesnikov/ghc
  • akrmn/ghc
  • trac-simplifierticks/ghc
  • jacco/ghc
  • rhendric/ghc
  • damhiya/ghc
  • ryndubei/ghc
  • DaveBarton/ghc
  • trac-Profpatsch/ghc
  • GZGavinZhao/ghc
  • ncfavier/ghc
  • jameshaydon/ghc
  • ajccosta/ghc
  • dschrempf/ghc
  • cydparser/ghc
  • LinuxUserGD/ghc
  • elodielander/ghc
  • facundominguez/ghc
  • psilospore/ghc
  • lachrimae/ghc
  • dylan-thinnes/ghc-type-errors-plugin
  • hamishmack/ghc
  • Leary/ghc
  • lzszt/ghc
  • lyokha/ghc
  • trac-glaubitz/ghc
  • Rewbert/ghc
  • andreabedini/ghc
  • Jasagredo/ghc
  • sol/ghc
  • OlegAlexander/ghc
  • trac-sthibaul/ghc
  • avdv/ghc
  • Wendaolee/ghc
  • ur4t/ghc
  • daylily/ghc
  • boltzmannrain/ghc
  • mmzk1526/ghc
  • trac-fizzixnerd/ghc
  • soulomoon/ghc
  • rwmjones/ghc
  • j14i/ghc
  • tracsis/ghc
  • gesh/ghc
  • flip101/ghc
  • eldritch-cookie/ghc
  • LemonjamesD/ghc
  • pgujjula/ghc
  • skeuchel/ghc
  • noteed/ghc
  • gulin.serge/ghc
  • Torrekie/ghc
  • jlwoodwa/ghc
  • ayanamists/ghc
  • husong998/ghc
  • trac-edmundnoble/ghc
  • josephf/ghc
  • contrun/ghc
  • baulig/ghc
  • edsko/ghc
  • mzschr/ghc-issue-24732
  • ulidtko/ghc
  • Arsen/ghc
  • trac-sjoerd_visscher/ghc
  • crumbtoo/ghc
  • L0neGamer/ghc
  • DrewFenwick/ghc
  • benz0li/ghc
  • MaciejWas/ghc
  • jordanrule/ghc
  • trac-qqwy/ghc
  • LiamGoodacre/ghc
  • isomorpheme/ghc
  • trac-danidiaz/ghc
  • Kariim/ghc
  • MTaimoorZaeem/ghc
  • hololeap/ghc
  • ticat-fp/ghc
  • meritamen/ghc
  • criskell/ghc
  • trac-kraai/ghc
  • aergus/ghc
  • jdral/ghc
  • SamB/ghc
  • Tristian/ghc
  • ywgrit/ghc
  • KatsuPatrick/ghc
  • OsePedro/ghc
  • mpscholten/ghc
  • fp/ghc
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
640 results
Show changes
Commits on Source (265)
Showing
with 414 additions and 3010 deletions
......@@ -39,6 +39,7 @@ tags
TAGS
autom4te.cache
aclocal.m4
config.log
config.status
configure
......@@ -198,6 +199,7 @@ _darcs/
/utils/mkUserGuidePart/mkUserGuidePart.cabal
/utils/runghc/runghc.cabal
/utils/gen-dll/gen-dll.cabal
/utils/ghc-pkg/ghc-pkg.cabal
utils/lndir/fs.*
utils/unlit/fs.*
rts/fs.*
......
......@@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: 706cc974bfe7a54c5036185ddf4817d3a8fd5b0d
DOCKER_REV: 853f348f9caf38b08740b280296fbd34e09abb3a
# Sequential version number capturing the versions of all tools fetched by
# .gitlab/ci.sh. Used for invalidation of GitLab CI cache.
......@@ -69,7 +69,6 @@ workflow:
# N.B. Don't run on wip/ branches, instead on run on merge requests.
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/'
- if: '$CI_PIPELINE_SOURCE == "web"'
......@@ -87,6 +86,7 @@ workflow:
variables:
BUILD_FLAVOUR: "perf"
XZ_OPT: "-9"
IGNORE_PERF_FAILURES: "all"
HADDOCK_HYPERLINKED_SOURCES: "YES"
artifacts:
when: always
......@@ -273,11 +273,10 @@ stack-hadrian-build:
validate-x86_64-linux-deb9-hadrian:
extends: .validate-linux-hadrian
stage: quick-build
stage: full-build
validate-x86_64-linux-deb9-unreg-hadrian:
extends: .validate-linux-hadrian
needs: [validate-x86_64-linux-deb9-hadrian]
stage: full-build
variables:
CONFIGURE_ARGS: --enable-unregisterised
......@@ -436,7 +435,6 @@ lint-base:
.build-x86_64-freebsd:
stage: full-build
extends: .validate
needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-freebsd
allow_failure: true
......@@ -511,7 +509,7 @@ release-x86_64-freebsd:
#################################
validate-x86_64-darwin:
extends: .validate
extends: .validate-hadrian
stage: full-build
tags:
- x86_64-darwin-m1
......@@ -538,12 +536,15 @@ validate-x86_64-darwin:
LANG: "en_US.UTF-8"
# WARNING: this is overridden in the shell.nix, see shell.nix!
CONFIGURE_ARGS: "--with-intree-gmp"
TEST_ENV: "x86_64-darwin"
HADRIAN_ARGS: "--docs=no-sphinx"
TEST_ENV: "x86_64-darwin-hadrian"
BIN_DIST_NAME: "ghc-amd64-apple-darwin"
BUILD_FLAVOUR: "validate"
# Due to #19025
IGNORE_PERF_FAILURES: "all"
CABAL_CACHE: "cabal-cache-amd64"
after_script:
- cp -Rf $HOME/.cabal cabal-cache
- cp -Rf $HOME/.cabal cabal-cache-amd64
- .gitlab/ci.sh clean
# I wish we could just use the nix #! logic, but we can't --run and -i bash
......@@ -558,9 +559,10 @@ validate-x86_64-darwin:
--pure \
--keep GHC_VERSION --keep CABAL_INSTALL_VERSION --keep BUILD_FLAVOUR \
--keep BIN_DIST_PREP_TAR_COMP --keep CPUS --keep PROJECT_DIR \
--keep CI_PROJECT_DIR --keep MAKE_ARGS \
--keep LANG --keep CONFIGURE_ARGS \
--keep MACOSX_DEPLOYMENT_TARGET --keep ac_cv_func_clock_gettime \
--keep CI_PROJECT_DIR --keep MAKE_ARGS --keep HADRIAN_ARGS --keep CABAL_CACHE \
--keep LANG --keep CONFIGURE_ARGS --keep TEST_ENV --keep BIN_DIST_NAME \
--keep MACOSX_DEPLOYMENT_TARGET --keep ac_cv_func_clock_gettime --keep HACKAGE_INDEX_STATE \
--keep PERF_NOTE_KEY --keep HEAD_HACKAGE_TRIGGER_TOKEN \
--run "$1" 2>&1
}
# fix up config.sub in libraries for the time.
......@@ -573,18 +575,20 @@ validate-x86_64-darwin:
TIME_SETUP_DELTA=$(expr $TIME_SETUP - $TIME_START)
echo "Setup took $TIME_SETUP_DELTA seconds"
runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE" 2>&1
runInNixShell ".gitlab/ci.sh configure" 2>&1
TIME_CONFIGURE=$(date +%s)
TIME_CONFIGURE_DELTA=$(expr $TIME_CONFIGURE - $TIME_SETUP)
echo "Configure took $TIME_CONFIGURE_DELTA seconds"
runInNixShell ".gitlab/ci.sh build_make" 2>&1
runInNixShell ".gitlab/ci.sh build_hadrian" 2>&1
TIME_BUILD=$(date +%s)
TIME_BUILD_DELTA=$(expr $TIME_BUILD - $TIME_CONFIGURE)
echo "Build took $TIME_BUILD_DELTA seconds"
set +e
runInNixShell ".gitlab/ci.sh test_make" 2>&1
runInNixShell ".gitlab/ci.sh test_hadrian" 2>&1
status=$?
set -e
......@@ -605,11 +609,12 @@ validate-x86_64-darwin:
cache:
key: "darwin-x86_64-$GHC_VERSION"
paths:
- cabal-cache
- cabal-cache-amd64
- cabal-cache-arm64
- toolchain
validate-aarch64-darwin:
extends: .validate
extends: .validate-hadrian
stage: full-build
tags:
- aarch64-darwin-m1
......@@ -631,6 +636,13 @@ validate-aarch64-darwin:
LANG: "en_US.UTF-8"
# WARNING: this is overridden in the shell.nix, see shell.nix!
CONFIGURE_ARGS: "--with-intree-gmp"
HADRIAN_ARGS: "--docs=no-sphinx"
BIN_DIST_NAME: "ghc-arm64-apple-darwin"
TEST_ENV: "aarch64-darwin-hadrian"
CABAL_CACHE: "cabal-cache-arm64"
after_script:
- cp -Rf $HOME/.cabal cabal-cache-arm64
- .gitlab/ci.sh clean
# I wish we could just use the nix #! logic, but we can't --run and -i bash
# behave very differently. -i bash does not pass any nix related env vars
......@@ -644,8 +656,9 @@ validate-aarch64-darwin:
--pure \
--keep GHC_VERSION --keep CABAL_INSTALL_VERSION --keep BUILD_FLAVOUR \
--keep BIN_DIST_PREP_TAR_COMP --keep CPUS --keep PROJECT_DIR \
--keep CI_PROJECT_DIR --keep MAKE_ARGS \
--keep LANG --keep CONFIGURE_ARGS \
--keep CI_PROJECT_DIR --keep MAKE_ARGS --keep HADRIAN_ARGS --keep CABAL_CACHE \
--keep LANG --keep CONFIGURE_ARGS --keep TEST_ENV --keep BIN_DIST_NAME \
--keep HACKAGE_INDEX_STATE \
--run "$1" 2>&1
}
# fix up config.sub in libraries for the time.
......@@ -658,18 +671,20 @@ validate-aarch64-darwin:
TIME_SETUP_DELTA=$(expr $TIME_SETUP - $TIME_START)
echo "Setup took $TIME_SETUP_DELTA seconds"
runInNixShell "cabal update --index=$HACKAGE_INDEX_STATE" 2>&1
runInNixShell ".gitlab/ci.sh configure" 2>&1
TIME_CONFIGURE=$(date +%s)
TIME_CONFIGURE_DELTA=$(expr $TIME_CONFIGURE - $TIME_SETUP)
echo "Setup took $TIME_CONFIGURE_DELTA seconds"
runInNixShell ".gitlab/ci.sh build_make" 2>&1
runInNixShell ".gitlab/ci.sh build_hadrian" 2>&1
TIME_BUILD=$(date +%s)
TIME_BUILD_DELTA=$(expr $TIME_BUILD - $TIME_CONFIGURE)
echo "Build took $TIME_BUILD_DELTA seconds"
set +e
runInNixShell ".gitlab/ci.sh test_make" 2>&1
runInNixShell ".gitlab/ci.sh test_hadrian" 2>&1
status=$?
set -e
TIME_TEST=$(date +%s)
......@@ -689,46 +704,12 @@ validate-aarch64-darwin:
cache:
key: "darwin-aarch64-$GHC_VERSION"
paths:
- cabal-cache
- cabal-cache-amd64
- cabal-cache-arm64
- toolchain
# Disabled because of OS X CI capacity
.validate-x86_64-darwin-hadrian:
stage: full-build
needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-darwin
variables:
GHC_VERSION: 8.10.4
MACOSX_DEPLOYMENT_TARGET: "10.7"
ac_cv_func_clock_gettime: "no"
LANG: "en_US.UTF-8"
CONFIGURE_ARGS: --with-intree-gmp
TEST_ENV: "x86_64-darwin-hadrian"
# Due to #19025
IGNORE_PERF_FAILURES: "all"
BIN_DIST_NAME: "ghc-x86_64-apple-darwin"
BUILD_FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
- .gitlab/ci.sh configure
- .gitlab/ci.sh build_hadrian
- .gitlab/ci.sh test_hadrian
after_script:
- cp -Rf $HOME/.cabal cabal-cache
- .gitlab/ci.sh clean
artifacts:
when: always
expire_in: 2 week
reports:
junit: junit.xml
paths:
- "$BIN_DIST_NAME.tar.xz"
- junit.xml
.validate-linux:
extends: .validate
needs: [validate-x86_64-linux-deb9-hadrian]
tags:
- x86_64-linux
variables:
......@@ -761,14 +742,6 @@ validate-aarch64-darwin:
tags:
- aarch64-linux
.build-aarch64-linux-deb10-llvm:
extends: .build-aarch64-linux-deb10
stage: full-build
variables:
BUILD_FLAVOUR: perf-llvm
tags:
- aarch64-linux
validate-aarch64-linux-deb10:
extends: .build-aarch64-linux-deb10
artifacts:
......@@ -781,6 +754,30 @@ nightly-aarch64-linux-deb10:
variables:
TEST_TYPE: slowtest
.build-aarch64-linux-deb10-llvm:
extends: .build-aarch64-linux-deb10
stage: full-build
variables:
BUILD_FLAVOUR: perf-llvm
tags:
- aarch64-linux
validate-aarch64-linux-deb10-llvm:
extends: .build-aarch64-linux-deb10-llvm
variables:
CONFIGURE_ARGS: "CC=/opt/llvm/bin/clang"
RUNTEST_ARGS: "--way=llvm"
BUILD_FLAVOUR: perf-llvm
# No docs, for this build, slows it down unncessarily.
# We build docs on other platforms already anyway.
BUILD_SPHINX_HTML: "NO"
BUILD_SPHINX_INFO: "NO"
BUILD_SPHINX_PDF: "NO"
BUILD_SPHINX_MAN: "NO"
artifacts:
when: always
expire_in: 2 week
#################################
# armv7-linux-deb10
#################################
......@@ -973,8 +970,12 @@ release-x86_64-linux-deb10-dwarf:
variables:
CONFIGURE_ARGS: "--enable-dwarf-unwind"
BUILD_FLAVOUR: dwarf
IGNORE_PERF_FAILURES: "all"
TEST_ENV: "x86_64-linux-deb10-dwarf"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb10-linux-dwarf.tar.xz"
artifacts:
when: always
expire_in: 1 year
validate-x86_64-linux-deb10-llvm:
extends: .build-x86_64-linux-deb10
......@@ -1022,32 +1023,6 @@ release-x86_64-linux-ubuntu2004:
<<: *release
extends: .build-x86_64-linux-ubuntu2004
#################################
# x86_64-linux-deb8
#################################
.build-x86_64-linux-deb8:
extends: .validate-linux
stage: full-build
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV"
# Due to #18298.
allow_failure: true
variables:
TEST_ENV: "x86_64-linux-deb8"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb8-linux.tar.xz"
# Debian 8's Sphinx is too old to support the table directive's :widths:
# option: https://sourceforge.net/p/docutils/patches/120/
BUILD_SPHINX_HTML: "NO"
BUILD_SPHINX_INFO: "NO"
BUILD_SPHINX_PDF: "NO"
BUILD_SPHINX_MAN: "NO"
cache:
key: linux-x86_64-deb8
release-x86_64-linux-deb8:
<<: *release
extends: .build-x86_64-linux-deb8
#################################
# x86_64-linux-alpine
#################################
......@@ -1073,9 +1048,19 @@ release-x86_64-linux-deb8:
when: always
expire_in: 2 week
release-x86_64-linux-alpine:
<<: *release
extends: .build-x86_64-linux-alpine-hadrian
release-x86_64-linux-alpine-integer-simple:
extends:
- .build-x86_64-linux-alpine-hadrian
- .release
variables:
BIGNUM_BACKEND: native
release-x86_64-linux-alpine-integer-gmp:
extends:
- .build-x86_64-linux-alpine-hadrian
- .release
variables:
BIGNUM_BACKEND: gmp
nightly-x86_64-linux-alpine:
<<: *nightly
......@@ -1094,6 +1079,7 @@ nightly-x86_64-linux-alpine:
BUILD_SPHINX_HTML: "NO"
BUILD_SPHINX_PDF: "NO"
TEST_ENV: "x86_64-linux-centos7"
IGNORE_PERF_FAILURES: "all"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-centos7-linux.tar.xz"
# CentOS seems to default to ascii
LANG: "en_US.UTF-8"
......@@ -1137,6 +1123,7 @@ release-x86_64-linux-fedora27-dwarf:
HADDOCK_HYPERLINKED_SOURCES: "yes"
CONFIGURE_ARGS: "--enable-dwarf-unwind"
BUILD_FLAVOUR: dwarf
IGNORE_PERF_FAILURES: "all"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux-dwarf.tar.xz"
TEST_ENV: "x86_64-linux-fedora27-dwarf"
......@@ -1145,7 +1132,6 @@ release-x86_64-linux-fedora27-dwarf:
############################################################
.build-windows:
needs: [validate-x86_64-linux-deb9-hadrian]
before_script:
- git clean -xdf
......@@ -1176,6 +1162,8 @@ release-x86_64-linux-fedora27-dwarf:
# skipping perf tests for now since we build a quick-flavoured GHC,
# which might result in some broken perf tests?
HADRIAN_ARGS: "--docs=no-sphinx --skip-perf"
# --skip-perf is incompatible with IGNORE_PERF_FAILURES.
IGNORE_PERF_FAILURES: ""
script:
- bash .gitlab/ci.sh configure
......@@ -1252,6 +1240,8 @@ release-x86_64-windows:
variables:
BUILD_FLAVOUR: "perf"
HADDOCK_HYPERLINKED_SOURCES: "yes"
# --skip-perf is incompatible with IGNORE_PERF_FAILURES.
IGNORE_PERF_FAILURES: ""
release-x86_64-windows-integer-simple:
<<: *release
......@@ -1259,8 +1249,11 @@ release-x86_64-windows-integer-simple:
variables:
HADDOCK_HYPERLINKED_SOURCES: "yes"
BIGNUM_BACKEND: native
IGNORE_PERF_FAILURES: "all"
BUILD_FLAVOUR: "perf"
BIN_DIST_NAME: "ghc-x86_64-mingw32-unknown-nogmp"
# --skip-perf is incompatible with IGNORE_PERF_FAILURES.
IGNORE_PERF_FAILURES: ""
############################################################
......@@ -1306,10 +1299,10 @@ source-tarball:
needs: [validate-x86_64-linux-deb9-unreg-hadrian]
tags:
- x86_64-linux
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
dependencies: []
rules:
- if: $CI_COMMIT_TAG
- if: '$RELEASE_JOB == "yes"'
when: always
artifacts:
paths:
......
#!/usr/bin/env bash
# shellcheck disable=SC2230
# shellcheck disable=SC1090
# This is the primary driver of the GitLab CI infrastructure.
# Run `ci.sh usage` for usage information.
......@@ -15,7 +16,9 @@ if [ ! -d "$TOP/.gitlab" ]; then
echo "This script expects to be run from the root of a ghc checkout"
fi
source $TOP/.gitlab/common.sh
CABAL_CACHE="$TOP/${CABAL_CACHE:-cabal-cache}"
source "$TOP/.gitlab/common.sh"
function usage() {
cat <<EOF
......@@ -152,17 +155,6 @@ mkdir -p "$TOP/tmp"
export TMP="$TOP/tmp"
export TEMP="$TOP/tmp"
function darwin_setup() {
# It looks like we already have python2 here and just installing python3
# does not work.
brew upgrade python
brew install ghc cabal-install ncurses gmp
pip3 install sphinx
# PDF documentation disabled as MacTeX apparently doesn't include xelatex.
#brew cask install mactex
}
function show_tool() {
local tool="$1"
info "$tool = ${!tool}"
......@@ -206,19 +198,15 @@ function set_toolchain_paths() {
# Extract GHC toolchain
function setup() {
if [ -d "$TOP/cabal-cache" ]; then
if [ -d "${CABAL_CACHE}" ]; then
info "Extracting cabal cache..."
mkdir -p "$cabal_dir"
cp -Rf cabal-cache/* "$cabal_dir"
cp -Rf "${CABAL_CACHE}"/* "$cabal_dir"
fi
if [[ "$needs_toolchain" = "1" ]]; then
setup_toolchain
fi
case "$(uname)" in
Darwin) darwin_setup ;;
*) ;;
esac
# Make sure that git works
git config user.email "ghc-ci@gitlab-haskell.org"
......@@ -350,20 +338,8 @@ function prepare_build_mk() {
if [[ -z ${BIGNUM_BACKEND:-} ]]; then BIGNUM_BACKEND=gmp; fi
cat > mk/build.mk <<EOF
V=1
HADDOCK_DOCS=YES
LATEX_DOCS=YES
HSCOLOUR_SRCS=YES
BUILD_SPHINX_HTML=$BUILD_SPHINX_HTML
BUILD_SPHINX_PDF=$BUILD_SPHINX_PDF
BeConservative=YES
BIGNUM_BACKEND=$BIGNUM_BACKEND
XZ_CMD=${XZ:-}
BuildFlavour=$BUILD_FLAVOUR
ifneq "\$(BuildFlavour)" ""
include mk/flavours/\$(BuildFlavour).mk
endif
BIGNUM_BACKEND=${BIGNUM_BACKEND}
include mk/flavours/${BUILD_FLAVOUR}.mk
GhcLibHcOpts+=-haddock
EOF
......@@ -371,10 +347,6 @@ EOF
echo "EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump" >> mk/build.mk
fi
case "$(uname)" in
Darwin) echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk ;;
*) ;;
esac
info "build.mk is:"
cat mk/build.mk
......@@ -385,16 +357,15 @@ function configure() {
run python3 boot
end_section "booting"
local target_args=""
read -r -a args <<< "${CONFIGURE_ARGS:-}"
if [[ -n "${target_triple:-}" ]]; then
target_args="--target=$target_triple"
args+=("--target=$target_triple")
fi
start_section "configuring"
run ./configure \
--enable-tarballs-autodownload \
$target_args \
${CONFIGURE_ARGS:-} \
"${args[@]}" \
GHC="$GHC" \
HAPPY="$HAPPY" \
ALEX="$ALEX" \
......@@ -413,9 +384,7 @@ function build_make() {
MAKE_ARGS="${MAKE_ARGS:-} V=0"
fi
echo "include mk/flavours/${BUILD_FLAVOUR}.mk" > mk/build.mk
echo 'GhcLibHcOpts+=-haddock' >> mk/build.mk
run "$MAKE" -j"$cores" $MAKE_ARGS
run "$MAKE" -j"$cores" "$MAKE_ARGS"
run "$MAKE" -j"$cores" binary-dist-prep TAR_COMP_OPTS=-1
ls -lh "$BIN_DIST_PREP_TAR_COMP"
}
......@@ -438,7 +407,8 @@ function push_perf_notes() {
# Figure out which commit should be used by the testsuite driver as a
# performance baseline. See Note [The CI Story].
function determine_metric_baseline() {
export PERF_BASELINE_COMMIT="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD)"
PERF_BASELINE_COMMIT="$(git merge-base "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" HEAD)"
export PERF_BASELINE_COMMIT
info "Using $PERF_BASELINE_COMMIT for performance metric baseline..."
}
......@@ -462,7 +432,7 @@ function build_hadrian() {
run_hadrian binary-dist
mv _build/bindist/ghc*.tar.xz $BIN_DIST_NAME.tar.xz
mv _build/bindist/ghc*.tar.xz "$BIN_DIST_NAME.tar.xz"
}
function test_hadrian() {
......@@ -471,15 +441,24 @@ function test_hadrian() {
return
fi
cd _build/bindist/ghc-*/
run ./configure --prefix="$TOP"/_build/install
run "$MAKE" install
case "$(uname)" in
MSYS_*|MINGW*)
mkdir -p "$TOP"/_build/install
cp -a * "$TOP"/_build/install
;;
*)
run ./configure --prefix="$TOP"/_build/install
run "$MAKE" install
;;
esac
cd ../../../
run_hadrian \
test \
--summary-junit=./junit.xml \
--test-compiler="$TOP"/_build/install/bin/ghc \
--test-compiler="$TOP/_build/install/bin/ghc$exe" \
"runtest.opts+=${RUNTEST_ARGS:-}"
}
......@@ -495,7 +474,7 @@ function cabal_test() {
-ddump-to-file -dumpdir "$OUT/dumps" -ddump-timings \
+RTS --machine-readable "-t$OUT/rts.log" -RTS \
-package mtl -ilibraries/Cabal/Cabal libraries/Cabal/Cabal/Setup.hs \
$@
"$@"
rm -Rf tmp
end_section "Cabal test: $OUT"
}
......@@ -522,23 +501,24 @@ function run_hadrian() {
fail "BUILD_FLAVOUR not set"
fi
if [ -z "${BIGNUM_BACKEND:-}" ]; then BIGNUM_BACKEND="gmp"; fi
if [ -n "${VERBOSE:-}" ]; then HADRIAN_ARGS="${HADRIAN_ARGS:-} -V"; fi
read -r -a args <<< "${HADRIAN_ARGS:-}"
if [ -n "${VERBOSE:-}" ]; then args+=("-V"); fi
run hadrian/build-cabal \
--flavour="$BUILD_FLAVOUR" \
-j"$cores" \
--broken-test="${BROKEN_TESTS:-}" \
--bignum=$BIGNUM_BACKEND \
${HADRIAN_ARGS:-} \
$@
"${args[@]}" \
"$@"
}
# A convenience function to allow debugging in the CI environment.
function shell() {
local cmd=$@
local cmd="*@"
if [ -z "$cmd" ]; then
cmd="bash -i"
fi
run $cmd
run "$cmd"
}
setup_locale
......@@ -603,9 +583,9 @@ case $1 in
test_hadrian || res=$?
push_perf_notes
exit $res ;;
run_hadrian) shift; run_hadrian $@ ;;
run_hadrian) shift; run_hadrian "$@" ;;
perf_test) run_perf_test ;;
clean) clean ;;
shell) shell $@ ;;
shell) shell "$@" ;;
*) fail "unknown mode $1" ;;
esac
......@@ -12,34 +12,67 @@
# we need to inject ncurses into --with-curses-libraries.
# the real fix is to teach terminfo to use libcurses on macOS.
CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib";
# CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib";
CONFIGURE_ARGS = "--with-intree-gmp";
# magic speedup pony :facepalm:
#
# nix has the ugly habbit of duplicating ld flags more than necessary. This
# somewhat consolidates this.
shellHook = ''
echo $NIX_LDFLAGS
export NIX_LDFLAGS=$(for a in $NIX_LDFLAGS; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(for a in $NIX_LDFLAGS_FOR_TARGET; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(comm -3 <(for l in $NIX_LDFLAGS_FOR_TARGET; do echo $l; done) <(for l in $NIX_LDFLAGS; do echo $l; done))
# Impurity hack for GHC releases.
#################################
# We don't want binary releases to depend on nix, thus we'll need to make sure we don't leak in references.
# GHC externally depends only on iconv and curses. However we can't force a specific curses library for
# the terminfo package, as such we'll need to make sure we only look in the system path for the curses library
# and not pick up the tinfo from the nix provided ncurses package.
#
# We also need to force us to use the systems COREFOUNDATION, not the one that nix builds. Again this is impure,
# but it will allow us to have proper binary distributions.
#
# do not use nixpkgs provided core foundation
export NIX_COREFOUNDATION_RPATH=/System/Library/Frameworks
# drop curses from the LDFLAGS, we really want the system ones, not the nix ones.
export NIX_LDFLAGS=$(for lib in $NIX_LDFLAGS; do case "$lib" in *curses*);; *) echo -n "$lib ";; esac; done;)
export NIX_CFLAGS_COMPILE+=" -Wno-nullability-completeness -Wno-availability -Wno-expansion-to-defined -Wno-builtin-requires-header -Wno-unused-command-line-argument"
# unconditionally add the MacOSX.sdk and TargetConditional.h
export NIX_CFLAGS_COMPILE+=" -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
export NIX_LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib $NIX_LDFLAGS"
echo $NIX_LDFLAGS
echo $MACOSX_DEPLOYMENT_TARGET
export MACOSX_DEPLOYMENT_TARGET=10.7
echo $MACOSX_DEPLOYMENT_TARGET
# Use an architecture specific home, so cabal for different architectures don't confuse each other.
export HOME="$HOME/$(uname -m)-home"
mkdir -p $HOME
'';
nativeBuildInputs = (with pkgs; [
# This needs to come *before* ghc,
# otherwise we migth end up with the clang from
# the bootstrap GHC in PATH with higher priority.
clang_11
llvm_11
haskell.compiler.${compiler}
haskell.packages.${compiler}.cabal-install
haskell.packages.${compiler}.alex
haskell.packages.${compiler}.happy # _1_19_12 is needed for older GHCs.
clang_11
llvm_11
automake
autoconf
m4
gmp
ncurses
libiconv
zlib.out
zlib.dev
glibcLocales
......
This diff is collapsed.
......@@ -283,7 +283,7 @@ module GHC (
parser,
-- * API Annotations
ApiAnns(..),AnnKeywordId(..),AnnotationComment(..),
AnnKeywordId(..),EpaComment(..),
-- * Miscellaneous
--sessionHscEnv,
......@@ -637,9 +637,12 @@ checkBrokenTablesNextToCode' logger dflags
setSessionDynFlags :: GhcMonad m => DynFlags -> m ()
setSessionDynFlags dflags0 = do
logger <- getLogger
dflags <- checkNewDynFlags logger dflags0
dflags1 <- checkNewDynFlags logger dflags0
hsc_env <- getSession
(dbs,unit_state,home_unit) <- liftIO $ initUnits logger dflags (hsc_unit_dbs hsc_env)
let cached_unit_dbs = hsc_unit_dbs hsc_env
(dbs,unit_state,home_unit,mconstants) <- liftIO $ initUnits logger dflags1 cached_unit_dbs
dflags <- liftIO $ updatePlatformConstants dflags1 mconstants
-- Interpreter
interp <- if gopt Opt_ExternalInterpreter dflags
......@@ -705,24 +708,28 @@ setProgramDynFlags dflags = setProgramDynFlags_ True dflags
setProgramDynFlags_ :: GhcMonad m => Bool -> DynFlags -> m Bool
setProgramDynFlags_ invalidate_needed dflags = do
logger <- getLogger
dflags' <- checkNewDynFlags logger dflags
dflags0 <- checkNewDynFlags logger dflags
dflags_prev <- getProgramDynFlags
let changed = packageFlagsChanged dflags_prev dflags'
let changed = packageFlagsChanged dflags_prev dflags0
if changed
then do
hsc_env <- getSession
(dbs,unit_state,home_unit) <- liftIO $ initUnits logger dflags' (hsc_unit_dbs hsc_env)
let cached_unit_dbs = hsc_unit_dbs hsc_env
(dbs,unit_state,home_unit,mconstants) <- liftIO $ initUnits logger dflags0 cached_unit_dbs
dflags1 <- liftIO $ updatePlatformConstants dflags0 mconstants
let unit_env = UnitEnv
{ ue_platform = targetPlatform dflags'
, ue_namever = ghcNameVersion dflags'
{ ue_platform = targetPlatform dflags1
, ue_namever = ghcNameVersion dflags1
, ue_home_unit = home_unit
, ue_units = unit_state
}
modifySession $ \h -> h{ hsc_dflags = dflags'
modifySession $ \h -> h{ hsc_dflags = dflags1
, hsc_unit_dbs = Just dbs
, hsc_unit_env = unit_env
}
else modifySession $ \h -> h{ hsc_dflags = dflags' }
else modifySession $ \h -> h{ hsc_dflags = dflags0 }
when invalidate_needed $ invalidateModSummaryCache
return changed
......@@ -1021,9 +1028,7 @@ class TypecheckedMod m => DesugaredMod m where
data ParsedModule =
ParsedModule { pm_mod_summary :: ModSummary
, pm_parsed_source :: ParsedSource
, pm_extra_src_files :: [FilePath]
, pm_annotations :: ApiAnns }
-- See Note [Api annotations] in GHC.Parser.Annotation
, pm_extra_src_files :: [FilePath] }
instance ParsedMod ParsedModule where
modSummary m = pm_mod_summary m
......@@ -1115,9 +1120,8 @@ parseModule ms = do
hsc_env <- getSession
let hsc_env_tmp = hsc_env { hsc_dflags = ms_hspp_opts ms }
hpm <- liftIO $ hscParse hsc_env_tmp ms
return (ParsedModule ms (hpm_module hpm) (hpm_src_files hpm)
(hpm_annotations hpm))
-- See Note [Api annotations] in GHC.Parser.Annotation
return (ParsedModule ms (hpm_module hpm) (hpm_src_files hpm))
-- See Note [exact print annotations] in GHC.Parser.Annotation
-- | Typecheck and rename a parsed module.
--
......@@ -1130,8 +1134,7 @@ typecheckModule pmod = do
(tc_gbl_env, rn_info)
<- liftIO $ hscTypecheckRename hsc_env_tmp ms $
HsParsedModule { hpm_module = parsedSource pmod,
hpm_src_files = pm_extra_src_files pmod,
hpm_annotations = pm_annotations pmod }
hpm_src_files = pm_extra_src_files pmod }
details <- liftIO $ makeSimpleDetails hsc_env_tmp tc_gbl_env
safe <- liftIO $ finalSafeMode (ms_hspp_opts ms) tc_gbl_env
......
......@@ -438,6 +438,8 @@ basicKnownKeyNames
-- Float/Double
integerToFloatName,
integerToDoubleName,
naturalToFloatName,
naturalToDoubleName,
rationalToFloatName,
rationalToDoubleName,
......@@ -1366,9 +1368,13 @@ floatingClassName = clsQual gHC_FLOAT (fsLit "Floating") floatingClassKey
realFloatClassName = clsQual gHC_FLOAT (fsLit "RealFloat") realFloatClassKey
-- other GHC.Float functions
integerToFloatName, integerToDoubleName, rationalToFloatName, rationalToDoubleName :: Name
integerToFloatName, integerToDoubleName,
naturalToFloatName, naturalToDoubleName,
rationalToFloatName, rationalToDoubleName :: Name
integerToFloatName = varQual gHC_FLOAT (fsLit "integerToFloat#") integerToFloatIdKey
integerToDoubleName = varQual gHC_FLOAT (fsLit "integerToDouble#") integerToDoubleIdKey
naturalToFloatName = varQual gHC_FLOAT (fsLit "naturalToFloat#") naturalToFloatIdKey
naturalToDoubleName = varQual gHC_FLOAT (fsLit "naturalToDouble#") naturalToDoubleIdKey
rationalToFloatName = varQual gHC_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey
rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey
......@@ -2386,13 +2392,15 @@ coercionTokenIdKey = mkPreludeMiscIdUnique 124
noinlineIdKey = mkPreludeMiscIdUnique 125
considerAccessibleIdKey = mkPreludeMiscIdUnique 126
integerToFloatIdKey, integerToDoubleIdKey :: Unique
integerToFloatIdKey, integerToDoubleIdKey, naturalToFloatIdKey, naturalToDoubleIdKey :: Unique
integerToFloatIdKey = mkPreludeMiscIdUnique 128
integerToDoubleIdKey = mkPreludeMiscIdUnique 129
naturalToFloatIdKey = mkPreludeMiscIdUnique 130
naturalToDoubleIdKey = mkPreludeMiscIdUnique 131
rationalToFloatIdKey, rationalToDoubleIdKey :: Unique
rationalToFloatIdKey = mkPreludeMiscIdUnique 130
rationalToDoubleIdKey = mkPreludeMiscIdUnique 131
rationalToFloatIdKey = mkPreludeMiscIdUnique 132
rationalToDoubleIdKey = mkPreludeMiscIdUnique 133
magicDictKey :: Unique
magicDictKey = mkPreludeMiscIdUnique 156
......@@ -2817,7 +2825,11 @@ interactiveClassKeys = map getUnique interactiveClassNames
* *
************************************************************************
The following names should be considered by GHCi to be in scope always.
GHCi's :info command will usually filter out instances mentioning types whose
names are not in scope. GHCi makes an exception for some commonly used names,
such as Data.Kind.Type, which may not actually be in scope but should be
treated as though they were in scope. The list in the definition of
pretendNameIsInScope below contains these commonly used names.
-}
......@@ -2825,5 +2837,6 @@ pretendNameIsInScope :: Name -> Bool
pretendNameIsInScope n
= any (n `hasKey`)
[ liftedTypeKindTyConKey, unliftedTypeKindTyConKey
, liftedDataConKey, unliftedDataConKey
, tYPETyConKey
, runtimeRepTyConKey, boxedRepDataConKey ]
......@@ -58,7 +58,7 @@ templateHaskellNames = [
condEName, multiIfEName, letEName, caseEName, doEName, mdoEName, compEName,
fromEName, fromThenEName, fromToEName, fromThenToEName,
listEName, sigEName, recConEName, recUpdEName, staticEName, unboundVarEName,
labelEName, implicitParamVarEName,
labelEName, implicitParamVarEName, getFieldEName, projectionEName,
-- FieldExp
fieldExpName,
-- Body
......@@ -288,7 +288,7 @@ varEName, conEName, litEName, appEName, appTypeEName, infixEName, infixAppName,
sectionLName, sectionRName, lamEName, lamCaseEName, tupEName,
unboxedTupEName, unboxedSumEName, condEName, multiIfEName, letEName,
caseEName, doEName, mdoEName, compEName, staticEName, unboundVarEName,
labelEName, implicitParamVarEName :: Name
labelEName, implicitParamVarEName, getFieldEName, projectionEName :: Name
varEName = libFun (fsLit "varE") varEIdKey
conEName = libFun (fsLit "conE") conEIdKey
litEName = libFun (fsLit "litE") litEIdKey
......@@ -326,6 +326,8 @@ staticEName = libFun (fsLit "staticE") staticEIdKey
unboundVarEName = libFun (fsLit "unboundVarE") unboundVarEIdKey
labelEName = libFun (fsLit "labelE") labelEIdKey
implicitParamVarEName = libFun (fsLit "implicitParamVarE") implicitParamVarEIdKey
getFieldEName = libFun (fsLit "getFieldE") getFieldEIdKey
projectionEName = libFun (fsLit "projectionE") projectionEIdKey
-- type FieldExp = ...
fieldExpName :: Name
......@@ -812,7 +814,8 @@ varEIdKey, conEIdKey, litEIdKey, appEIdKey, appTypeEIdKey, infixEIdKey,
letEIdKey, caseEIdKey, doEIdKey, compEIdKey,
fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKey,
listEIdKey, sigEIdKey, recConEIdKey, recUpdEIdKey, staticEIdKey,
unboundVarEIdKey, labelEIdKey, implicitParamVarEIdKey, mdoEIdKey :: Unique
unboundVarEIdKey, labelEIdKey, implicitParamVarEIdKey, mdoEIdKey,
getFieldEIdKey, projectionEIdKey :: Unique
varEIdKey = mkPreludeMiscIdUnique 270
conEIdKey = mkPreludeMiscIdUnique 271
litEIdKey = mkPreludeMiscIdUnique 272
......@@ -846,6 +849,8 @@ unboundVarEIdKey = mkPreludeMiscIdUnique 299
labelEIdKey = mkPreludeMiscIdUnique 300
implicitParamVarEIdKey = mkPreludeMiscIdUnique 301
mdoEIdKey = mkPreludeMiscIdUnique 302
getFieldEIdKey = mkPreludeMiscIdUnique 303
projectionEIdKey = mkPreludeMiscIdUnique 304
-- type FieldExp = ...
fieldExpIdKey :: Unique
......
......@@ -17,6 +17,7 @@ module GHC.Builtin.PrimOps (
primOpOutOfLine, primOpCodeSize,
primOpOkForSpeculation, primOpOkForSideEffects,
primOpIsCheap, primOpFixity, primOpDocs,
primOpIsDiv,
getPrimOpResultInfo, isComparisonPrimOp, PrimOpResultInfo(..),
......@@ -525,6 +526,51 @@ primOpIsCheap op = primOpOkForSpeculation op
-- that (it's exprIsDupable that does) so the problem doesn't occur
-- even if primOpIsCheap sometimes says 'True'.
-- | True of dyadic operators that can fail only if the second arg is zero!
--
-- This function probably belongs in an automagically generated file.. but it's
-- such a special case I thought I'd leave it here for now.
primOpIsDiv :: PrimOp -> Bool
primOpIsDiv op = case op of
-- TODO: quotRemWord2, Int64, Word64
IntQuotOp -> True
Int8QuotOp -> True
Int16QuotOp -> True
Int32QuotOp -> True
IntRemOp -> True
Int8RemOp -> True
Int16RemOp -> True
Int32RemOp -> True
IntQuotRemOp -> True
Int8QuotRemOp -> True
Int16QuotRemOp -> True
Int32QuotRemOp -> True
WordQuotOp -> True
Word8QuotOp -> True
Word16QuotOp -> True
Word32QuotOp -> True
WordRemOp -> True
Word8RemOp -> True
Word16RemOp -> True
Word32RemOp -> True
WordQuotRemOp -> True
Word8QuotRemOp -> True
Word16QuotRemOp -> True
Word32QuotRemOp -> True
FloatDivOp -> True
DoubleDivOp -> True
_ -> False
{-
************************************************************************
* *
......
......@@ -541,6 +541,8 @@ typeNatCoAxiomRules = listToUFM $ map (\x -> (coaxrName x, x))
, axAppendSymbolDef
, axConsSymbolDef
, axUnconsSymbolDef
, axCharToNatDef
, axNatToCharDef
, axAdd0L
, axAdd0R
, axMul0L
......
......@@ -68,7 +68,6 @@ import GHC.Utils.Outputable
import GHC.Utils.Misc
import GHC.Utils.Panic
import Data.Bits
import Data.Maybe
-- | Get the 'Name' associated with a known-key 'Unique'.
......
......@@ -601,6 +601,43 @@ section "Int64#"
primtype Int64#
primop Int64ToIntOp "int64ToInt#" GenPrimOp Int64# -> Int#
primop IntToInt64Op "intToInt64#" GenPrimOp Int# -> Int64#
primop Int64NegOp "negateInt64#" GenPrimOp Int64# -> Int64#
primop Int64AddOp "plusInt64#" GenPrimOp Int64# -> Int64# -> Int64#
with
commutable = True
primop Int64SubOp "subInt64#" GenPrimOp Int64# -> Int64# -> Int64#
primop Int64MulOp "timesInt64#" GenPrimOp Int64# -> Int64# -> Int64#
with
commutable = True
primop Int64QuotOp "quotInt64#" GenPrimOp Int64# -> Int64# -> Int64#
with
can_fail = True
primop Int64RemOp "remInt64#" GenPrimOp Int64# -> Int64# -> Int64#
with
can_fail = True
primop Int64SllOp "uncheckedIShiftL64#" GenPrimOp Int64# -> Int# -> Int64#
primop Int64SraOp "uncheckedIShiftRA64#" GenPrimOp Int64# -> Int# -> Int64#
primop Int64SrlOp "uncheckedIShiftRL64#" GenPrimOp Int64# -> Int# -> Int64#
primop Int64ToWord64Op "int64ToWord64#" GenPrimOp Int64# -> Word64#
with code_size = 0
primop Int64EqOp "eqInt64#" Compare Int64# -> Int64# -> Int#
primop Int64GeOp "geInt64#" Compare Int64# -> Int64# -> Int#
primop Int64GtOp "gtInt64#" Compare Int64# -> Int64# -> Int#
primop Int64LeOp "leInt64#" Compare Int64# -> Int64# -> Int#
primop Int64LtOp "ltInt64#" Compare Int64# -> Int64# -> Int#
primop Int64NeOp "neInt64#" Compare Int64# -> Int64# -> Int#
------------------------------------------------------------------------
section "Word64#"
{Operations on 64-bit unsigned words. This type is only used
......@@ -610,6 +647,51 @@ section "Word64#"
primtype Word64#
primop Word64ToWordOp "word64ToWord#" GenPrimOp Word64# -> Word#
primop WordToWord64Op "wordToWord64#" GenPrimOp Word# -> Word64#
primop Word64AddOp "plusWord64#" GenPrimOp Word64# -> Word64# -> Word64#
with
commutable = True
primop Word64SubOp "subWord64#" GenPrimOp Word64# -> Word64# -> Word64#
primop Word64MulOp "timesWord64#" GenPrimOp Word64# -> Word64# -> Word64#
with
commutable = True
primop Word64QuotOp "quotWord64#" GenPrimOp Word64# -> Word64# -> Word64#
with
can_fail = True
primop Word64RemOp "remWord64#" GenPrimOp Word64# -> Word64# -> Word64#
with
can_fail = True
primop Word64AndOp "and64#" GenPrimOp Word64# -> Word64# -> Word64#
with commutable = True
primop Word64OrOp "or64#" GenPrimOp Word64# -> Word64# -> Word64#
with commutable = True
primop Word64XorOp "xor64#" GenPrimOp Word64# -> Word64# -> Word64#
with commutable = True
primop Word64NotOp "not64#" GenPrimOp Word64# -> Word64#
primop Word64SllOp "uncheckedShiftL64#" GenPrimOp Word64# -> Int# -> Word64#
primop Word64SrlOp "uncheckedShiftRL64#" GenPrimOp Word64# -> Int# -> Word64#
primop Word64ToInt64Op "word64ToInt64#" GenPrimOp Word64# -> Int64#
with code_size = 0
primop Word64EqOp "eqWord64#" Compare Word64# -> Word64# -> Int#
primop Word64GeOp "geWord64#" Compare Word64# -> Word64# -> Int#
primop Word64GtOp "gtWord64#" Compare Word64# -> Word64# -> Int#
primop Word64LeOp "leWord64#" Compare Word64# -> Word64# -> Int#
primop Word64LtOp "ltWord64#" Compare Word64# -> Word64# -> Int#
primop Word64NeOp "neWord64#" Compare Word64# -> Word64# -> Int#
#endif
------------------------------------------------------------------------
......@@ -3133,7 +3215,8 @@ section "Controlling object lifetime"
-- See Note [keepAlive# magic] in GHC.CoreToStg.Prep.
primop KeepAliveOp "keepAlive#" GenPrimOp
o -> State# RealWorld -> (State# RealWorld -> p) -> p
{ TODO. }
{ \tt{keepAlive# x s k} keeps the value \tt{x} alive during the execution
of the computation \tt{k}. }
with
strictness = { \ _arity -> mkClosedStrictSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv }
......
......@@ -41,6 +41,8 @@ import GHC.Data.FastString
import GHC.Data.SizedSeq
import GHC.StgToCmm.Layout ( ArgRep(..) )
import GHC.Cmm.Expr
import GHC.Cmm.CallConv ( tupleRegsCover )
import GHC.Platform
import GHC.Platform.Profile
......@@ -56,7 +58,7 @@ import Data.Array.Base ( UArray(..) )
import Data.Array.Unsafe( castSTUArray )
import Foreign
import Foreign hiding (shiftL, shiftR)
import Data.Char ( ord )
import Data.List ( genericLength )
import Data.Map.Strict (Map)
......@@ -394,7 +396,7 @@ assembleI platform i = case i of
p <- ioptr (liftM BCOPtrBCO ul_bco)
p_tup <- ioptr (liftM BCOPtrBCO ul_tuple_bco)
info <- int (fromIntegral $
mkTupleInfoSig tuple_info)
mkTupleInfoSig platform tuple_info)
emit bci_PUSH_ALTS_T
[Op p, Op info, Op p_tup]
PUSH_PAD8 -> emit bci_PUSH_PAD8 []
......@@ -454,7 +456,7 @@ assembleI platform i = case i of
JMP l -> emit bci_JMP [LabelOp l]
ENTER -> emit bci_ENTER []
RETURN -> emit bci_RETURN []
RETURN_UBX rep -> emit (return_ubx rep) []
RETURN_UNLIFTED rep -> emit (return_unlifted rep) []
RETURN_TUPLE -> emit bci_RETURN_T []
CCALL off m_addr i -> do np <- addr m_addr
emit bci_CCALL [SmallOp off, Op np, SmallOp i]
......@@ -522,16 +524,16 @@ push_alts V16 = error "push_alts: vector"
push_alts V32 = error "push_alts: vector"
push_alts V64 = error "push_alts: vector"
return_ubx :: ArgRep -> Word16
return_ubx V = bci_RETURN_V
return_ubx P = bci_RETURN_P
return_ubx N = bci_RETURN_N
return_ubx L = bci_RETURN_L
return_ubx F = bci_RETURN_F
return_ubx D = bci_RETURN_D
return_ubx V16 = error "return_ubx: vector"
return_ubx V32 = error "return_ubx: vector"
return_ubx V64 = error "return_ubx: vector"
return_unlifted :: ArgRep -> Word16
return_unlifted V = bci_RETURN_V
return_unlifted P = bci_RETURN_P
return_unlifted N = bci_RETURN_N
return_unlifted L = bci_RETURN_L
return_unlifted F = bci_RETURN_F
return_unlifted D = bci_RETURN_D
return_unlifted V16 = error "return_unlifted: vector"
return_unlifted V32 = error "return_unlifted: vector"
return_unlifted V64 = error "return_unlifted: vector"
{-
we can only handle up to a fixed number of words on the stack,
......@@ -552,22 +554,6 @@ return_ubx V64 = error "return_ubx: vector"
maxTupleNativeStackSize :: WordOff
maxTupleNativeStackSize = 62
{-
Maximum number of supported registers for returning tuples.
If GHC uses more more than these (because of a change in the calling
convention or a new platform) mkTupleInfoSig will panic.
You can raise the limits after modifying stg_ctoi_t and stg_ret_t
(StgMiscClosures.cmm) to save and restore the additional registers.
-}
maxTupleVanillaRegs, maxTupleFloatRegs, maxTupleDoubleRegs,
maxTupleLongRegs :: Int
maxTupleVanillaRegs = 6
maxTupleFloatRegs = 6
maxTupleDoubleRegs = 6
maxTupleLongRegs = 1
{-
Construct the tuple_info word that stg_ctoi_t and stg_ret_t use
to convert a tuple between the native calling convention and the
......@@ -575,47 +561,29 @@ maxTupleLongRegs = 1
See Note [GHCi tuple layout] for more information.
-}
mkTupleInfoSig :: TupleInfo -> Word32
mkTupleInfoSig ti@TupleInfo{..}
| tupleNativeStackSize > maxTupleNativeStackSize =
pprPanic "mkTupleInfoSig: tuple too big for the bytecode compiler"
mkTupleInfoSig :: Platform -> TupleInfo -> Word32
mkTupleInfoSig platform TupleInfo{..}
| tupleNativeStackSize > maxTupleNativeStackSize
= pprPanic "mkTupleInfoSig: tuple too big for the bytecode compiler"
(ppr tupleNativeStackSize <+> text "stack words." <+>
text "Use -fobject-code to get around this limit"
)
| tupleVanillaRegs `shiftR` maxTupleVanillaRegs /= 0 =
pprPanic "mkTupleInfoSig: too many vanilla registers" (ppr tupleVanillaRegs)
| tupleLongRegs `shiftR` maxTupleLongRegs /= 0 =
pprPanic "mkTupleInfoSig: too many long registers" (ppr tupleLongRegs)
| tupleFloatRegs `shiftR` maxTupleFloatRegs /= 0 =
pprPanic "mkTupleInfoSig: too many float registers" (ppr tupleFloatRegs)
| tupleDoubleRegs `shiftR` maxTupleDoubleRegs /= 0 =
pprPanic "mkTupleInfoSig: too many double registers" (ppr tupleDoubleRegs)
{-
Check that we can pack the register counts/bitmaps and stack size
in the information word. In particular we check that each component
fits in the bits we have reserved for it.
This overlaps with some of the above checks. It's likely that if the
number of registers changes, the number of bits will also need to be
updated.
-}
| tupleNativeStackSize < 16384 && -- 14 bits stack usage
tupleDoubleRegs < 64 && -- 6 bit bitmap (these can be shared with float)
tupleFloatRegs < 64 && -- 6 bit bitmap (these can be shared with double)
tupleLongRegs < 4 && -- 2 bit bitmap
tupleVanillaRegs < 65536 && -- 4 bit count (tupleVanillaRegs is still a bitmap)
-- check that there are no "holes", i.e. that R1..Rn are all in use
tupleVanillaRegs .&. (tupleVanillaRegs + 1) == 0
= fromIntegral tupleNativeStackSize .|.
unRegBitmap (tupleLongRegs `shiftL` 14) .|.
unRegBitmap (tupleDoubleRegs `shiftL` 16) .|.
unRegBitmap (tupleFloatRegs `shiftL` 22) .|.
fromIntegral (countTrailingZeros (1 + tupleVanillaRegs) `shiftL` 28)
| otherwise = pprPanic "mkTupleInfoSig: unsupported tuple shape" (ppr ti)
| otherwise
= ASSERT(length regs <= 24) {- 24 bits for bitmap -}
ASSERT(tupleNativeStackSize < 255) {- 8 bits for stack size -}
ASSERT(all (`elem` regs) (regSetToList tupleRegs)) {- all regs accounted for -}
foldl' reg_bit 0 (zip regs [0..]) .|.
(fromIntegral tupleNativeStackSize `shiftL` 24)
where
reg_bit :: Word32 -> (GlobalReg, Int) -> Word32
reg_bit x (r, n)
| r `elemRegSet` tupleRegs = x .|. 1 `shiftL` n
| otherwise = x
regs = tupleRegsCover platform
mkTupleInfoLit :: Platform -> TupleInfo -> Literal
mkTupleInfoLit platform tuple_info =
mkLitWord platform . fromIntegral $ mkTupleInfoSig tuple_info
mkLitWord platform . fromIntegral $ mkTupleInfoSig platform tuple_info
-- Make lists of host-sized words for literals, so that when the
-- words are placed in memory at increasing addresses, the
......
......@@ -174,9 +174,9 @@ data BCInstr
-- To Infinity And Beyond
| ENTER
| RETURN -- return a lifted value
| RETURN_UBX ArgRep -- return an unlifted value, here's its rep
| RETURN_TUPLE -- return an unboxed tuple (info already on stack)
| RETURN -- return a lifted value
| RETURN_UNLIFTED ArgRep -- return an unlifted value, here's its rep
| RETURN_TUPLE -- return an unboxed tuple (info already on stack)
-- Breakpoints
| BRK_FUN Word16 Unique (RemotePtr CostCentre)
......@@ -312,7 +312,7 @@ instance Outputable BCInstr where
<+> text "by" <+> ppr n
ppr ENTER = text "ENTER"
ppr RETURN = text "RETURN"
ppr (RETURN_UBX pk) = text "RETURN_UBX " <+> ppr pk
ppr (RETURN_UNLIFTED pk) = text "RETURN_UNLIFTED " <+> ppr pk
ppr (RETURN_TUPLE) = text "RETURN_TUPLE"
ppr (BRK_FUN index uniq _cc) = text "BRK_FUN" <+> ppr index <+> ppr uniq <+> text "<cc>"
......@@ -392,7 +392,7 @@ bciStackUse CASEFAIL{} = 0
bciStackUse JMP{} = 0
bciStackUse ENTER{} = 0
bciStackUse RETURN{} = 0
bciStackUse RETURN_UBX{} = 1 -- pushes stg_ret_X for some X
bciStackUse RETURN_UNLIFTED{} = 1 -- pushes stg_ret_X for some X
bciStackUse RETURN_TUPLE{} = 1 -- pushes stg_ret_t header
bciStackUse CCALL{} = 0
bciStackUse SWIZZLE{} = 0
......
......@@ -43,6 +43,7 @@ import qualified Data.IntMap as IntMap
import Data.Maybe (catMaybes)
import qualified GHC.Exts.Heap as Heap
import GHC.Stack.CCS
import GHC.Cmm.Expr ( GlobalRegSet, emptyRegSet, regSetToList )
-- -----------------------------------------------------------------------------
-- Compiled Byte Code
......@@ -106,10 +107,7 @@ newtype RegBitmap = RegBitmap { unRegBitmap :: Word32 }
-}
data TupleInfo = TupleInfo
{ tupleSize :: !WordOff -- total size of tuple in words
, tupleVanillaRegs :: !RegBitmap -- vanilla registers used
, tupleLongRegs :: !RegBitmap -- long registers used
, tupleFloatRegs :: !RegBitmap -- float registers used
, tupleDoubleRegs :: !RegBitmap -- double registers used
, tupleRegs :: !GlobalRegSet
, tupleNativeStackSize :: !WordOff {- words spilled on the stack by
GHCs native calling convention -}
} deriving (Show)
......@@ -118,14 +116,11 @@ instance Outputable TupleInfo where
ppr TupleInfo{..} = text "<size" <+> ppr tupleSize <+>
text "stack" <+> ppr tupleNativeStackSize <+>
text "regs" <+>
char 'R' <> ppr tupleVanillaRegs <+>
char 'L' <> ppr tupleLongRegs <+>
char 'F' <> ppr tupleFloatRegs <+>
char 'D' <> ppr tupleDoubleRegs <>
ppr (map (text.show) $ regSetToList tupleRegs) <>
char '>'
voidTupleInfo :: TupleInfo
voidTupleInfo = TupleInfo 0 0 0 0 0 0
voidTupleInfo = TupleInfo 0 emptyRegSet 0
type ItblEnv = NameEnv (Name, ItblPtr)
-- We need the Name in the range so we know which
......
......@@ -155,7 +155,6 @@ import GHC.Utils.Misc
import GHC.Core.Ppr ( {- instances -} )
import GHC.CmmToAsm.Config
import GHC.Types.SrcLoc
-- -----------------------------------------------------------------------------
-- The CLabel type
......@@ -290,6 +289,12 @@ data CLabel
deriving Eq
instance Show CLabel where
show = showPprUnsafe . pprDebugCLabel genericPlatform
instance Outputable CLabel where
ppr = text . show
isIdLabel :: CLabel -> Bool
isIdLabel IdLabel{} = True
isIdLabel _ = False
......@@ -1535,6 +1540,7 @@ pprDynamicLinkerAsmLabel platform dllInfo ppLbl =
SymbolPtr -> char 'L' <> ppLbl <> text "$non_lazy_ptr"
GotSymbolPtr -> ppLbl <> text "@GOTPCREL"
GotSymbolOffset -> ppLbl
| platformArch platform == ArchAArch64 -> ppLbl
| otherwise ->
case dllInfo of
CodeStub -> char 'L' <> ppLbl <> text "$stub"
......@@ -1563,6 +1569,10 @@ pprDynamicLinkerAsmLabel platform dllInfo ppLbl =
SymbolPtr -> text ".LC_" <> ppLbl
_ -> panic "pprDynamicLinkerAsmLabel"
| platformArch platform == ArchAArch64
= ppLbl
| platformArch platform == ArchX86_64
= case dllInfo of
CodeStub -> ppLbl <> text "@plt"
......
......@@ -2,10 +2,12 @@ module GHC.Cmm.CallConv (
ParamLocation(..),
assignArgumentsPos,
assignStack,
realArgRegsCover
realArgRegsCover,
tupleRegsCover
) where
import GHC.Prelude
import Data.List (nub)
import GHC.Cmm.Expr
import GHC.Runtime.Heap.Layout
......@@ -219,3 +221,13 @@ realArgRegsCover platform
realDoubleRegs platform ++
realLongRegs platform
-- we don't save XMM registers if they are not used for parameter passing
-- Like realArgRegsCover but always includes the node. This covers the real
-- and virtual registers used for unboxed tuples.
--
-- Note: if anything changes in how registers for unboxed tuples overlap,
-- make sure to also update GHC.StgToByteCode.layoutTuple.
tupleRegsCover :: Platform -> [GlobalReg]
tupleRegsCover platform =
nub (VanillaReg 1 VGcPtr : realArgRegsCover platform)
......@@ -18,7 +18,6 @@ import GHC.Cmm.Dataflow.Block
import GHC.Cmm.Dataflow.Graph
import GHC.Cmm.Dataflow.Label
import GHC.Cmm.Dataflow.Collections
import Data.Bits
import Data.Maybe (mapMaybe)
import qualified Data.List as List
import Data.Word
......
......@@ -65,6 +65,7 @@ data CmmExpr
-- ** is shorthand only, meaning **
-- CmmMachOp (MO_Add rep) [x, CmmLit (CmmInt (fromIntegral i) rep)]
-- where rep = typeWidth (cmmRegType reg)
deriving Show
instance Eq CmmExpr where -- Equality ignores the types
CmmLit l1 == CmmLit l2 = l1==l2
......@@ -78,7 +79,7 @@ instance Eq CmmExpr where -- Equality ignores the types
data CmmReg
= CmmLocal {-# UNPACK #-} !LocalReg
| CmmGlobal GlobalReg
deriving( Eq, Ord )
deriving( Eq, Ord, Show )
-- | A stack area is either the stack slot where a variable is spilled
-- or the stack space where function arguments and results are passed.
......@@ -86,7 +87,7 @@ data Area
= Old -- See Note [Old Area]
| Young {-# UNPACK #-} !BlockId -- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in GHC.Cmm.Node.
deriving (Eq, Ord)
deriving (Eq, Ord, Show)
{- Note [Old Area]
~~~~~~~~~~~~~~~~~~
......@@ -209,7 +210,7 @@ data CmmLit
-- During the stack-layout pass, CmmHighStackMark
-- is replaced by a CmmInt for the actual number
-- of bytes used
deriving Eq
deriving (Eq, Show)
instance Outputable CmmLit where
ppr (CmmInt n w) = text "CmmInt" <+> ppr n <+> ppr w
......@@ -279,6 +280,7 @@ data LocalReg
-- ^ Parameters:
-- 1. Identifier
-- 2. Type
deriving Show
instance Eq LocalReg where
(LocalReg u1 _) == (LocalReg u2 _) = u1 == u2
......
......@@ -58,7 +58,6 @@ import GHC.Utils.Misc
import GHC.Utils.Outputable
import Data.ByteString (ByteString)
import Data.Bits
-- When we split at proc points, we need an empty info table.
mkEmptyContInfoTable :: CLabel -> CmmInfoTable
......