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
  • 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
  • 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
  • taimoorzaeem/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
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
  • rkirkman/ghc
  • gulin.serge/ghc-windows-aarch64-bootstrap
  • iris/ghc
  • kwxm/ghc
  • maralorn/ghc
  • rafl/ghc
  • nikshalark/ghc
  • mrcjkb/ghc
  • blackheaven/ghc
  • laurenyim/ghc
  • bolt12/ghc
  • Xitian9/ghc
  • wenkokke/ghc
  • kephas/ghc
  • rmullanix/ghc
  • GunpowderGuy/ghc
  • I_I/ghc
  • leana8959/ghc
  • zlonast/ghc
  • jryans/ghc
  • Vekhir/ghc
658 results
Show changes
Commits on Source (382)
Showing
with 791 additions and 317 deletions
......@@ -124,6 +124,12 @@ _darcs/
/driver/ghci/ghc-pkg-inplace
/driver/ghci/ghci-inplace
/driver/ghci/ghci.res
/driver/ghci/cwrapper.c
/driver/ghci/cwrapper.h
/driver/ghci/getLocation.c
/driver/ghci/getLocation.h
/driver/ghci/isMinTTY.c
/driver/ghci/isMinTTY.h
/driver/package.conf
/driver/package.conf.inplace.old
/settings
......
......@@ -5,8 +5,8 @@ variables:
DOCKER_REV: 6223fe0b5942f4fa35bdec92c74566cf195bfb42
# Sequential version number capturing the versions of all tools fetched by
# .gitlab/ci.sh.
WINDOWS_TOOLCHAIN_VERSION: 1
# .gitlab/ci.sh. Used for invalidation of GitLab CI cache.
WINDOWS_TOOLCHAIN_VERSION: 4
# Disable shallow clones; they break our linting rules
GIT_DEPTH: 0
......@@ -26,13 +26,29 @@ stages:
- testing # head.hackage correctness and compiler performance testing
- deploy # push documentation
# Note [The CI Story]
# ~~~~~~~~~~~~~~~~~~~
#
# There are two different types of pipelines:
#
# - marge-bot merges to `master`. Here we perform an exhaustive validation
# across all of the platforms which we support. In addition, we push
# performance metric notes upstream, providing a persistent record of the
# performance characteristics of the compiler.
#
# - merge requests. Here we perform a slightly less exhaustive battery of
# testing. Namely we omit some configurations (e.g. the unregisterised job).
# These use the merge request's base commit for performance metric
# comparisons.
#
workflow:
# N.B.Don't run on wip/ branches, instead on run on merge requests.
# 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_COMMIT_BRANCH == "wip/marge_bot_batch_merge_job"'
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/'
- if: '$CI_PIPELINE_SOURCE == "web"'
.nightly: &nightly
......@@ -45,12 +61,11 @@ workflow:
.release: &release
variables:
BUILD_FLAVOUR: "perf"
FLAVOUR: "perf"
artifacts:
when: always
expire_in: 1 year
rules:
- if: '$RELEASE == "yes"'
- if: '$RELEASE_JOB == "yes"'
############################################################
# Runner Tags
......@@ -180,7 +195,7 @@ lint-release-changelogs:
.validate-hadrian:
variables:
FLAVOUR: "validate"
BUILD_FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
- .gitlab/ci.sh configure
......@@ -190,6 +205,7 @@ lint-release-changelogs:
key: hadrian
paths:
- cabal-cache
dependencies: []
artifacts:
reports:
junit: junit.xml
......@@ -292,8 +308,8 @@ hadrian-ghc-in-ghci:
# porting guide [1].
# [1] https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html)
CONFIGURE_ARGS: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib"
GHC_VERSION: 8.10.1
CABAL_INSTALL_VERSION: 3.2.0.0
GHC_VERSION: "8.10.1"
CABAL_INSTALL_VERSION: "3.2.0.0"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-portbld-freebsd.tar.xz"
TEST_ENV: "x86_64-freebsd"
BUILD_FLAVOUR: "validate"
......@@ -339,7 +355,7 @@ release-x86_64-freebsd:
CABAL_INSTALL_VERSION: 3.0.0.0
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-portbld-freebsd.tar.xz"
TEST_ENV: "x86_64-freebsd-hadrian"
FLAVOUR: "validate"
BUILD_FLAVOUR: "validate"
after_script:
- cp -Rf $HOME/.cabal cabal-cache
- .gitlab/ci.sh clean
......@@ -367,7 +383,7 @@ validate-x86_64-darwin:
tags:
- x86_64-darwin
variables:
GHC_VERSION: 8.8.3
GHC_VERSION: 8.8.4
CABAL_INSTALL_VERSION: 3.0.0.0
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-apple-darwin.tar.xz"
MACOSX_DEPLOYMENT_TARGET: "10.7"
......@@ -395,13 +411,13 @@ validate-x86_64-darwin:
tags:
- x86_64-darwin
variables:
GHC_VERSION: 8.8.3
GHC_VERSION: 8.8.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"
FLAVOUR: "validate"
BUILD_FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
- .gitlab/ci.sh configure
......@@ -582,10 +598,11 @@ validate-x86_64-linux-deb9-debug:
when: always
expire_in: 2 week
# Disabled to alleviate CI load
.validate-x86_64-linux-deb9-llvm:
validate-x86_64-linux-deb9-llvm:
extends: .build-x86_64-linux-deb9
stage: full-build
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*LLVM backend.*/'
variables:
BUILD_FLAVOUR: perf-llvm
TEST_ENV: "x86_64-linux-deb9-llvm"
......@@ -616,12 +633,34 @@ nightly-x86_64-linux-deb9-integer-simple:
TEST_ENV: "x86_64-linux-deb9-integer-simple"
TEST_TYPE: slowtest
.build-x86_64-linux-deb9-tsan:
extends: .validate-linux-hadrian
stage: full-build
variables:
TEST_ENV: "x86_64-linux-deb9-tsan"
BUILD_FLAVOUR: "thread-sanitizer"
TSAN_OPTIONS: "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions"
# Haddock is large enough to make TSAN choke without massive quantities of
# memory.
HADRIAN_ARGS: "--docs=none"
nightly-x86_64-linux-deb9-tsan:
<<: *nightly
extends: .build-x86_64-linux-deb9-tsan
validate-x86_64-linux-deb9-tsan:
extends: .build-x86_64-linux-deb9-tsan
when: manual
validate-x86_64-linux-deb9-dwarf:
extends: .build-x86_64-linux-deb9
stage: full-build
variables:
CONFIGURE_ARGS: "--enable-dwarf-unwind"
BUILD_FLAVOUR: dwarf
# Ensure that we don't run the LLVM testsuite ways since LLVM is too old on Debian 9.
LLC: "/nonexistent/nonexistent"
OPT: "/nonexistent/nonexistent"
TEST_ENV: "x86_64-linux-deb9-dwarf"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb9-linux-dwarf.tar.xz"
......@@ -654,6 +693,21 @@ release-x86_64-linux-deb10:
<<: *release
extends: .build-x86_64-linux-deb10
validate-x86_64-linux-deb10-dwarf:
extends: .build-x86_64-linux-deb10
stage: full-build
# N.B. cannot transclude .release since it would override BUILD_FLAVOUR.
rules:
- if: '$RELEASE_JOB == "yes"'
variables:
CONFIGURE_ARGS: "--enable-dwarf-unwind"
BUILD_FLAVOUR: dwarf
TEST_ENV: "x86_64-linux-deb9-dwarf"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb10-linux-dwarf.tar.xz"
artifacts:
when: always
expire_in: 1 year
#################################
# x86_64-linux-deb8
#################################
......@@ -776,8 +830,8 @@ validate-x86_64-linux-fedora27:
#FORCE_SYMLINKS: 1
LANG: "en_US.UTF-8"
SPHINXBUILD: "/mingw64/bin/sphinx-build.exe"
CABAL_INSTALL_VERSION: 3.0.0.0
GHC_VERSION: "8.8.3"
CABAL_INSTALL_VERSION: "3.0.0.0"
GHC_VERSION: "8.8.4"
cache:
paths:
- cabal-cache
......@@ -788,7 +842,7 @@ validate-x86_64-linux-fedora27:
extends: .build-windows
stage: full-build
variables:
FLAVOUR: "validate"
BUILD_FLAVOUR: "validate"
# 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"
......@@ -809,22 +863,16 @@ validate-x86_64-linux-fedora27:
- ghc.tar.xz
- junit.xml
validate-x86_64-windows-hadrian:
.build-x86_64-windows-hadrian:
extends: .build-windows-hadrian
variables:
MSYSTEM: MINGW64
TEST_ENV: "x86_64-windows-hadrian"
TEST_ENV: "x86_64-windows"
cache:
key: "x86_64-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
nightly-i386-windows-hadrian:
<<: *nightly
extends: .build-windows-hadrian
variables:
MSYSTEM: MINGW32
TEST_ENV: "i386-windows-hadrian"
cache:
key: "i386-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
validate-x86_64-windows-hadrian:
extends: .build-x86_64-windows-hadrian
.build-windows-make:
extends: .build-windows
......@@ -858,9 +906,6 @@ nightly-i386-windows-hadrian:
cache:
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
validate-x86_64-windows:
extends: .build-x86_64-windows-make
nightly-x86_64-windows:
<<: *nightly
extends: .build-x86_64-windows-make
......@@ -868,47 +913,19 @@ nightly-x86_64-windows:
variables:
BUILD_FLAVOUR: "validate"
# Normal Windows validate builds are profiled; that won't do for releases.
# Normal Windows validate builds lack profiled libraries; that won't do for
# releases.
release-x86_64-windows:
<<: *release
extends: validate-x86_64-windows
extends: .build-x86_64-windows-hadrian
variables:
BUILD_FLAVOUR: "perf"
#
release-x86_64-windows-integer-simple:
<<: *release
extends: validate-x86_64-windows
extends: .build-x86_64-windows-hadrian
variables:
BIGNUM_BACKEND: native
BUILD_FLAVOUR: "perf"
.build-i386-windows-make:
extends: .build-windows-make
variables:
MSYSTEM: MINGW32
# Due to #15934
BUILD_PROF_LIBS: "NO"
TEST_ENV: "i386-windows"
# Due to #17736
allow_failure: true
cache:
key: "i386-windows-$WINDOWS_TOOLCHAIN_VERSION"
validate-i386-windows:
extends: .build-i386-windows-make
variables:
BUILD_FLAVOUR: "perf"
release-i386-windows:
<<: *release
extends: .build-i386-windows-make
variables:
BUILD_FLAVOUR: "perf"
nightly-i386-windows:
<<: *nightly
extends: .build-i386-windows-make
############################################################
# Cleanup
......@@ -960,7 +977,7 @@ doc-tarball:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
dependencies:
- validate-x86_64-linux-deb9-debug
- validate-x86_64-windows
- validate-x86_64-windows-hadrian
variables:
LINUX_BINDIST: "ghc-x86_64-deb9-linux-debug.tar.xz"
WINDOWS_BINDIST: "ghc-x86_64-mingw32.tar.xz"
......
......@@ -8,6 +8,8 @@ set -e -o pipefail
# Configuration:
hackage_index_state="@1579718451"
MIN_ALEX_VERSION="3.2"
# Colors
BLACK="0;30"
GRAY="1;30"
......@@ -26,9 +28,6 @@ LT_CYAN="1;36"
WHITE="1;37"
LT_GRAY="0;37"
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
# GitLab Pipelines log section delimiters
# https://gitlab.com/gitlab-org/gitlab-foss/issues/14664
start_section() {
......@@ -60,6 +59,39 @@ function run() {
TOP="$(pwd)"
function setup_locale() {
# Musl doesn't provide locale support at all...
if ! which locale > /dev/null; then
info "No locale executable. Skipping locale setup..."
return
fi
# BSD grep terminates early with -q, consequently locale -a will get a
# SIGPIPE and the pipeline will fail with pipefail.
shopt -o -u pipefail
if locale -a | grep -q C.UTF-8; then
# Debian
export LANG=C.UTF-8
elif locale -a | grep -q C.utf8; then
# Fedora calls it this
export LANG=C.utf8
elif locale -a | grep -q en_US.UTF-8; then
# Centos doesn't have C.UTF-8
export LANG=en_US.UTF-8
elif locale -a | grep -q en_US.utf8; then
# Centos doesn't have C.UTF-8
export LANG=en_US.utf8
else
error "Failed to find usable locale"
info "Available locales:"
locale -a
fail "No usable locale, aborting..."
fi
info "Using locale $LANG..."
export LC_ALL=$LANG
shopt -o -s pipefail
}
function mingw_init() {
case "$MSYSTEM" in
MINGW32)
......@@ -138,6 +170,7 @@ function set_toolchain_paths() {
HAPPY="$HOME/.cabal/bin/happy"
ALEX="$HOME/.cabal/bin/alex"
fi
export GHC
export CABAL
export HAPPY
......@@ -184,7 +217,7 @@ function fetch_ghc() {
url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
info "Fetching GHC binary distribution from $url..."
curl "$url" > ghc.tar.xz || fail "failed to fetch GHC binary distribution"
tar -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
$TAR -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
case "$(uname)" in
MSYS_*|MINGW*)
cp -r "ghc-${GHC_VERSION}"/* "$toolchain"
......@@ -235,7 +268,7 @@ function fetch_cabal() {
esac
echo "Fetching cabal-install from $cabal_url"
curl "$cabal_url" > cabal.tar.xz
tar -xJf cabal.tar.xz
$TAR -xJf cabal.tar.xz
mv cabal "$toolchain/bin"
;;
esac
......@@ -249,24 +282,25 @@ function fetch_cabal() {
function setup_toolchain() {
fetch_ghc
fetch_cabal
cabal_install="$CABAL v2-install --index-state=$hackage_index_state --installdir=$toolchain/bin"
cabal_install="$CABAL v2-install \
--index-state=$hackage_index_state \
--installdir=$toolchain/bin \
--overwrite-policy=always"
# Avoid symlinks on Windows
case "$(uname)" in
MSYS_*|MINGW*) cabal_install="$cabal_install --install-method=copy" ;;
*) ;;
esac
if [ ! -e "$HAPPY" ]; then
info "Building happy..."
cabal update
$cabal_install happy
fi
cabal update
if [ ! -e "$ALEX" ]; then
info "Building alex..."
cabal update
$cabal_install alex
fi
info "Building happy..."
$cabal_install happy --constraint="happy==1.19.*"
info "Building alex..."
$cabal_install alex --constraint="alex>=$MIN_ALEX_VERSION"
}
function cleanup_submodules() {
......@@ -363,6 +397,13 @@ function push_perf_notes() {
"$TOP/.gitlab/test-metrics.sh" push
}
# 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)"
info "Using $PERF_BASELINE_COMMIT for performance metric baseline..."
}
function test_make() {
run "$MAKE" test_bindist TEST_PREP=YES
run "$MAKE" V=0 test \
......@@ -371,8 +412,8 @@ function test_make() {
}
function build_hadrian() {
if [ -z "$FLAVOUR" ]; then
fail "FLAVOUR not set"
if [ -z "$BUILD_FLAVOUR" ]; then
fail "BUILD_FLAVOUR not set"
fi
run_hadrian binary-dist
......@@ -399,10 +440,12 @@ function clean() {
}
function run_hadrian() {
if [ -z "$BIGNUM_BACKEND" ]; then BIGNUM_BACKEND="gmp"; fi
run hadrian/build-cabal \
--flavour="$FLAVOUR" \
--flavour="$BUILD_FLAVOUR" \
-j"$cores" \
--broken-test="$BROKEN_TESTS" \
--bignum=$BIGNUM_BACKEND \
$HADRIAN_ARGS \
$@
}
......@@ -416,6 +459,8 @@ function shell() {
run $cmd
}
setup_locale
# Determine Cabal data directory
case "$(uname)" in
MSYS_*|MINGW*) exe=".exe"; cabal_dir="$APPDATA/cabal" ;;
......@@ -424,12 +469,14 @@ esac
# Platform-specific environment initialization
MAKE="make"
TAR="tar"
case "$(uname)" in
MSYS_*|MINGW*) mingw_init ;;
Darwin) boot_triple="x86_64-apple-darwin" ;;
FreeBSD)
boot_triple="x86_64-portbld-freebsd"
MAKE="gmake"
TAR="gtar"
;;
Linux) ;;
*) fail "uname $(uname) is not supported" ;;
......
......@@ -81,6 +81,10 @@ function push() {
echo ""
echo "Failed to push git notes. Fetching, appending, and retrying... $MAX_RETRY retries left."
done
# Be sure to kill agent before we terminate since otherwise the Windows CI
# job won't finish.
ssh-agent -k
}
case $1 in
......@@ -88,3 +92,4 @@ case $1 in
pull) pull ;;
*) fail "Invalid mode $1" ;;
esac
......@@ -49,3 +49,18 @@
/utils/gen-dll/ @Phyx
/utils/fs/ @Phyx
# WinIO related code
/libraries/base/GHC/Event/Windows/ @Phyx
/libraries/base/GHC/IO/Windows/ @Phyx
/rts/win32/ @Phyx
/libraries/base/GHC/IO/Handle/Lock/Windows.hsc @Phyx
/libraries/base/GHC/Event/Windows.hsc @Phyx
/libraries/base/GHC/Conc/WinIO.hs @Phyx
/libraries/base/GHC/Conc/Windows.hs @Phyx
/libraries/base/GHC/IO/Handle/Windows.hs @Phyx
/libraries/base/GHC/IO/StdHandles.hs @Phyx
/libraries/base/GHC/Windows.hs @Phyx
/libraries/base/cbits/IOutils.c @Phyx
/libraries/base/cbits/Win32Utils.c @Phyx
/libraries/base/cbits/consUtils.c @Phyx
/libraries/base/include/winio_structs.h @Phyx
......@@ -3,6 +3,15 @@
# To be a good autoconf citizen, names of local macros have prefixed with FP_ to
# ensure we don't clash with any pre-supplied autoconf ones.
# FPTOOLS_WRITE_FILE
# ------------------
# Write $2 to the file named $1.
AC_DEFUN([FPTOOLS_WRITE_FILE],
[
cat >$1 <<ACEOF
$2
ACEOF
])
AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS],
[
......@@ -109,7 +118,7 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS],
GHC_CONVERT_OS([$target_os], [$TargetArch], [TargetOS])
fi
GHC_LLVM_TARGET([$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
GHC_LLVM_TARGET([$target],[$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
GHC_SELECT_FILE_EXTENSIONS([$host], [exeext_host], [soext_host])
GHC_SELECT_FILE_EXTENSIONS([$target], [exeext_target], [soext_target])
......@@ -209,7 +218,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\""
;;
aarch64)
test -z "[$]2" || eval "[$]2=ArchARM64"
test -z "[$]2" || eval "[$]2=ArchAArch64"
;;
alpha)
test -z "[$]2" || eval "[$]2=ArchAlpha"
......@@ -318,9 +327,14 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([], [__asm__ (".subsections_via_symbols");])],
[AC_MSG_RESULT(yes)
TargetHasSubsectionsViaSymbols=YES
AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
if test x"$TargetArch" = xaarch64; then
dnl subsections via symbols is busted on arm64
TargetHasSubsectionsViaSymbols=NO
else
TargetHasSubsectionsViaSymbols=YES
AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
[Define to 1 if Apple-style dead-stripping is supported.])
fi
],
[TargetHasSubsectionsViaSymbols=NO
AC_MSG_RESULT(no)])
......@@ -498,6 +512,7 @@ AC_DEFUN([GET_ARM_ISA],
# FP_SETTINGS
# ----------------------------------
# Set the variables used in the settings file
# See Note [tooldir: How GHC finds mingw on Windows]
AC_DEFUN([FP_SETTINGS],
[
if test "$windows" = YES -a "$EnableDistroToolchain" = "NO"
......@@ -507,6 +522,10 @@ AC_DEFUN([FP_SETTINGS],
SettingsHaskellCPPCommand="${mingw_bin_prefix}gcc.exe"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
SettingsLdCommand="${mingw_bin_prefix}ld.exe"
# Overrides FIND_MERGE_OBJECTS in order to avoid hard-coding linker
# path on Windows (#18550).
SettingsMergeObjectsCommand="${SettingsLdCommand}"
SettingsMergeObjectsFlags="-r --oformat=pe-bigobj-x86-64"
SettingsArCommand="${mingw_bin_prefix}ar.exe"
SettingsRanlibCommand="${mingw_bin_prefix}ranlib.exe"
SettingsDllWrapCommand="${mingw_bin_prefix}dllwrap.exe"
......@@ -520,6 +539,8 @@ AC_DEFUN([FP_SETTINGS],
SettingsHaskellCPPCommand="$(basename $HaskellCPPCmd)"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
SettingsLdCommand="$(basename $LdCmd)"
SettingsMergeObjectsCommand="$(basename $MergeObjsCmd)"
SettingsMergeObjectsFlags="$MergeObjsArgs"
SettingsArCommand="$(basename $ArCmd)"
SettingsDllWrapCommand="$(basename $DllWrapCmd)"
SettingsWindresCommand="$(basename $WindresCmd)"
......@@ -529,6 +550,8 @@ AC_DEFUN([FP_SETTINGS],
SettingsHaskellCPPCommand="$HaskellCPPCmd"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
SettingsLdCommand="$LdCmd"
SettingsMergeObjectsCommand="$MergeObjsCmd"
SettingsMergeObjectsFlags="$MergeObjsArgs"
SettingsArCommand="$ArCmd"
SettingsRanlibCommand="$RanlibCmd"
if test -z "$DllWrapCmd"
......@@ -569,11 +592,24 @@ AC_DEFUN([FP_SETTINGS],
else
SettingsOptCommand="$OptCmd"
fi
if test -z "$OtoolCmd"
then
SettingsOtoolCommand="otool"
else
SettingsOtoolCommand="$OtoolCmd"
fi
if test -z "$InstallNameToolCmd"
then
SettingsInstallNameToolCommand="install_name_tool"
else
SettingsInstallNameToolCommand="$InstallNameToolCmd"
fi
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2"
SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE"
SettingsLdFlags="$CONF_LD_LINKER_OPTS_STAGE2"
SettingsUseDistroMINGW="$EnableDistroToolchain"
AC_SUBST(SettingsCCompilerCommand)
AC_SUBST(SettingsHaskellCPPCommand)
AC_SUBST(SettingsHaskellCPPFlags)
......@@ -583,8 +619,12 @@ AC_DEFUN([FP_SETTINGS],
AC_SUBST(SettingsCCompilerSupportsNoPie)
AC_SUBST(SettingsLdCommand)
AC_SUBST(SettingsLdFlags)
AC_SUBST(SettingsMergeObjectsCommand)
AC_SUBST(SettingsMergeObjectsFlags)
AC_SUBST(SettingsArCommand)
AC_SUBST(SettingsRanlibCommand)
AC_SUBST(SettingsOtoolCommand)
AC_SUBST(SettingsInstallNameToolCommand)
AC_SUBST(SettingsDllWrapCommand)
AC_SUBST(SettingsWindresCommand)
AC_SUBST(SettingsLibtoolCommand)
......@@ -592,6 +632,7 @@ AC_DEFUN([FP_SETTINGS],
AC_SUBST(SettingsClangCommand)
AC_SUBST(SettingsLlcCommand)
AC_SUBST(SettingsOptCommand)
AC_SUBST(SettingsUseDistroMINGW)
])
# Helper for cloning a shell variable's state
......@@ -1014,6 +1055,8 @@ if test ! -f compiler/GHC/Parser.hs || test ! -f compiler/GHC/Cmm/Parser.hs
then
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.19.10],
[AC_MSG_ERROR([Happy version 1.19.10 or later is required to compile GHC.])])[]
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.20.0],
[AC_MSG_ERROR([Happy version 1.19 is required to compile GHC.])])[]
fi
HappyVersion=$fptools_cv_happy_version;
AC_SUBST(HappyVersion)
......@@ -1175,7 +1218,8 @@ AC_SUBST([LdHasFilelist])
# thinks that target == host so it never checks the unqualified
# tools for Windows. See #14274.
AC_DEFUN([FP_PROG_AR],
[if test -z "$fp_prog_ar"; then
[AC_SUBST(fp_prog_ar,$AR)
if test -z "$fp_prog_ar"; then
if test "$HostOS" = "mingw32"
then
AC_PATH_PROG([fp_prog_ar], [ar])
......@@ -1588,37 +1632,37 @@ AC_SUBST([GccExtraViaCOpts],$fp_cv_gcc_extra_opts)
# ---------------------
AC_DEFUN([FP_SETUP_PROJECT_VERSION],
[
if test "$RELEASE" = "NO"; then
AC_MSG_CHECKING([for GHC version date])
if test -f VERSION_DATE; then
PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE`
AC_MSG_RESULT(given $PACKAGE_VERSION)
elif test -e .git; then
changequote(, )dnl
ver_posixtime=`git log -1 --pretty=format:%ct`
ver_date=`perl -MPOSIX -e "print strftime('%Y%m%d', gmtime($ver_posixtime));"`
if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else
changequote([, ])dnl
AC_MSG_ERROR([failed to detect version date: check that git and perl are in your path])
if test "$RELEASE" = "NO"; then
AC_MSG_CHECKING([for GHC version date])
if test -f VERSION_DATE; then
PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE`
AC_MSG_RESULT(given $PACKAGE_VERSION)
elif test -e .git; then
changequote(, )dnl
ver_posixtime=`git log -1 --pretty=format:%ct`
ver_date=`perl -MPOSIX -e "print strftime('%Y%m%d', gmtime($ver_posixtime));"`
if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else
changequote([, ])dnl
AC_MSG_ERROR([failed to detect version date: check that git and perl are in your path])
fi
PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date
AC_MSG_RESULT(inferred $PACKAGE_VERSION)
elif test -f VERSION; then
PACKAGE_VERSION=`cat VERSION`
AC_MSG_RESULT(given $PACKAGE_VERSION)
else
AC_MSG_WARN([cannot determine snapshot version: no .git directory and no VERSION file])
dnl We'd really rather this case didn't happen, but it might
dnl do (in particular, people using lndir trees may find that
dnl the build system can't find any other date). If it does
dnl happen, then we use the current date.
dnl This way we get some idea about how recent a build is.
dnl It also means that packages built for 2 different builds
dnl will probably use different version numbers, so things are
dnl less likely to go wrong.
PACKAGE_VERSION=${PACKAGE_VERSION}.`date +%Y%m%d`
fi
PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date
AC_MSG_RESULT(inferred $PACKAGE_VERSION)
elif test -f VERSION; then
PACKAGE_VERSION=`cat VERSION`
AC_MSG_RESULT(given $PACKAGE_VERSION)
else
AC_MSG_WARN([cannot determine snapshot version: no .git directory and no VERSION file])
dnl We'd really rather this case didn't happen, but it might
dnl do (in particular, people using lndir trees may find that
dnl the build system can't find any other date). If it does
dnl happen, then we use the current date.
dnl This way we get some idea about how recent a build is.
dnl It also means that packages built for 2 different builds
dnl will probably use different version numbers, so things are
dnl less likely to go wrong.
PACKAGE_VERSION=${PACKAGE_VERSION}.`date +%Y%m%d`
fi
fi
AC_MSG_CHECKING([for GHC Git commit id])
if test -e .git; then
......@@ -1637,54 +1681,54 @@ fi
fi
# Some renamings
AC_SUBST([ProjectName], [$PACKAGE_NAME])
AC_SUBST([ProjectVersion], [$PACKAGE_VERSION])
AC_SUBST([ProjectGitCommitId], [$PACKAGE_GIT_COMMIT_ID])
# Some renamings
AC_SUBST([ProjectName], [$PACKAGE_NAME])
AC_SUBST([ProjectVersion], [$PACKAGE_VERSION])
AC_SUBST([ProjectGitCommitId], [$PACKAGE_GIT_COMMIT_ID])
# Split PACKAGE_VERSION into (possibly empty) parts
VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
VERSION_TMP=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
# Split PACKAGE_VERSION into (possibly empty) parts
VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
VERSION_TMP=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
# Calculate project version as an integer, using 2 digits for minor version
case $VERSION_MINOR in
?) ProjectVersionInt=${VERSION_MAJOR}0${VERSION_MINOR} ;;
??) ProjectVersionInt=${VERSION_MAJOR}${VERSION_MINOR} ;;
*) AC_MSG_ERROR([bad minor version in $PACKAGE_VERSION]) ;;
esac
AC_SUBST([ProjectVersionInt])
# Calculate project version as an integer, using 2 digits for minor version
case $VERSION_MINOR in
?) ProjectVersionInt=${VERSION_MAJOR}0${VERSION_MINOR} ;;
??) ProjectVersionInt=${VERSION_MAJOR}${VERSION_MINOR} ;;
*) AC_MSG_ERROR([bad minor version in $PACKAGE_VERSION]) ;;
esac
AC_SUBST([ProjectVersionInt])
# The project patchlevel is zero unless stated otherwise
test -z "$ProjectPatchLevel" && ProjectPatchLevel=0
# The project patchlevel is zero unless stated otherwise
test -z "$ProjectPatchLevel" && ProjectPatchLevel=0
# Save split version of ProjectPatchLevel
ProjectPatchLevel1=`echo $ProjectPatchLevel | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1/'`
ProjectPatchLevel2=`echo $ProjectPatchLevel | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3/'`
# Save split version of ProjectPatchLevel
ProjectPatchLevel1=`echo $ProjectPatchLevel | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1/'`
ProjectPatchLevel2=`echo $ProjectPatchLevel | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3/'`
AC_SUBST([ProjectPatchLevel1])
AC_SUBST([ProjectPatchLevel2])
AC_SUBST([ProjectPatchLevel1])
AC_SUBST([ProjectPatchLevel2])
# Remove dots from the patch level; this allows us to have versions like 6.4.1.20050508
ProjectPatchLevel=`echo $ProjectPatchLevel | sed 's/\.//'`
# Remove dots from the patch level; this allows us to have versions like 6.4.1.20050508
ProjectPatchLevel=`echo $ProjectPatchLevel | sed 's/\.//'`
AC_SUBST([ProjectPatchLevel])
AC_SUBST([ProjectPatchLevel])
# The version of the GHC package changes every day, since the
# patchlevel is the current date. We don't want to force
# recompilation of the entire compiler when this happens, so for
# GHC HEAD we omit the patchlevel from the package version number.
#
# The ProjectPatchLevel1 > 20000000 iff GHC HEAD. If it's for a stable
# release like 7.10.1 or for a release candidate such as 7.10.1.20141224
# then we don't omit the patchlevel components.
# The version of the GHC package changes every day, since the
# patchlevel is the current date. We don't want to force
# recompilation of the entire compiler when this happens, so for
# GHC HEAD we omit the patchlevel from the package version number.
#
# The ProjectPatchLevel1 > 20000000 iff GHC HEAD. If it's for a stable
# release like 7.10.1 or for a release candidate such as 7.10.1.20141224
# then we don't omit the patchlevel components.
ProjectVersionMunged="$ProjectVersion"
if test "$ProjectPatchLevel1" -gt 20000000; then
ProjectVersionMunged="${VERSION_MAJOR}.${VERSION_MINOR}"
fi
AC_SUBST([ProjectVersionMunged])
ProjectVersionMunged="$ProjectVersion"
if test "$ProjectPatchLevel1" -gt 20000000; then
ProjectVersionMunged="${VERSION_MAJOR}.${VERSION_MINOR}"
fi
AC_SUBST([ProjectVersionMunged])
])# FP_SETUP_PROJECT_VERSION
# Check for a working timer_create(). We need a pretty detailed check
......@@ -1923,7 +1967,7 @@ AC_MSG_CHECKING(for path to top of build tree)
# `libraries/base/System/Info.hs`'s documentation.
AC_DEFUN([GHC_CONVERT_CPU],[
case "$1" in
aarch64*)
aarch64*|arm64*)
$2="aarch64"
;;
alpha*)
......@@ -2005,37 +2049,50 @@ case "$1" in
esac
])
# GHC_LLVM_TARGET(target_cpu, target_vendor, target_os, llvm_target_var)
# GHC_LLVM_TARGET(target, target_cpu, target_vendor, target_os, llvm_target_var)
# --------------------------------
# converts the canonicalized target into something llvm can understand
AC_DEFUN([GHC_LLVM_TARGET], [
case "$2-$3" in
llvm_target_cpu=$2
case "$1" in
*-freebsd*-gnueabihf)
llvm_target_vendor="unknown"
llvm_target_os="freebsd-gnueabihf"
;;
hardfloat-*eabi)
*-hardfloat-*eabi)
llvm_target_vendor="unknown"
llvm_target_os="$3""hf"
llvm_target_os="$4""hf"
;;
*-mingw32|*-mingw64|*-msys)
llvm_target_vendor="unknown"
llvm_target_os="windows"
;;
# retain any android and gnueabi linux flavours
# for the LLVM Target. Otherwise these would be
# turned into just `-linux` and fail to be found
# in the `llvm-targets` file.
*-android*|*-gnueabi*|*-musleabi*)
GHC_CONVERT_VENDOR([$2],[llvm_target_vendor])
llvm_target_os="$3"
# apple is a bit about their naming scheme for
# aarch64; and clang on macOS doesn't know that
# aarch64 would be arm64. So for LLVM we'll need
# to call it arm64; while we'll refer to it internally
# as aarch64 for consistency and sanity.
aarch64-apple-*|arm64-apple-*)
llvm_target_cpu="arm64"
GHC_CONVERT_VENDOR([$3],[llvm_target_vendor])
GHC_CONVERT_OS([$4],[$2],[llvm_target_os])
;;
*)
GHC_CONVERT_VENDOR([$2],[llvm_target_vendor])
GHC_CONVERT_OS([$3],[$1],[llvm_target_os])
GHC_CONVERT_VENDOR([$3],[llvm_target_vendor])
GHC_CONVERT_OS([$4],[$2],[llvm_target_os])
;;
esac
$4="$1-$llvm_target_vendor-$llvm_target_os"
case "$4" in
# retain any android and gnueabi linux flavours
# for the LLVM Target. Otherwise these would be
# turned into just `-linux` and fail to be found
# in the `llvm-targets` file.
*-android*|*-gnueabi*|*-musleabi*)
GHC_CONVERT_VENDOR([$3],[llvm_target_vendor])
llvm_target_os="$4"
;;
esac
$5="$llvm_target_cpu-$llvm_target_vendor-$llvm_target_os"
])
......@@ -2471,7 +2528,6 @@ AC_DEFUN([FIND_LD],[
# Make sure the user didn't specify LD manually.
if test "z$LD" != "z"; then
AC_CHECK_TARGET_TOOL([LD], [ld])
LD_NO_GOLD=$LD
return
fi
......@@ -2484,7 +2540,6 @@ AC_DEFUN([FIND_LD],[
if test "x$TmpLd" = "x"; then continue; fi
out=`$TmpLd --version`
LD_NO_GOLD=$TmpLd
case $out in
"GNU ld"*)
FP_CC_LINKER_FLAG_TRY(bfd, $2) ;;
......@@ -2492,8 +2547,6 @@ AC_DEFUN([FIND_LD],[
FP_CC_LINKER_FLAG_TRY(gold, $2)
if test "$cross_compiling" = "yes"; then
AC_MSG_NOTICE([Using ld.gold and assuming that it is not affected by binutils issue 22266]);
else
LD_NO_GOLD=ld;
fi
;;
"LLD"*)
......@@ -2514,21 +2567,138 @@ AC_DEFUN([FIND_LD],[
# Fallback
AC_CHECK_TARGET_TOOL([LD], [ld])
# This isn't entirely safe since $LD may have been discovered to be
# ld.gold, but what else can we do?
if test "x$LD_NO_GOLD" = "x"; then LD_NO_GOLD=$LD; fi
}
if test "x$enable_ld_override" = "xyes"; then
find_ld
else
AC_CHECK_TARGET_TOOL([LD], [ld])
if test "x$LD_NO_GOLD" = "x"; then LD_NO_GOLD=$LD; fi
fi
CHECK_LD_COPY_BUG([$1])
])
# CHECK_FOR_GOLD_T22266
# ----------------------
#
# Test for binutils #22266. This bug manifested as GHC bug #14328 (see also:
# #14675, #14291).
# Uses test from
# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=033bfb739b525703bfe23f151d09e9beee3a2afe
#
# $1 = linker to test
# Sets $result to 0 if not affected, 1 otherwise
AC_DEFUN([CHECK_FOR_GOLD_T22266],[
AC_MSG_CHECKING([for ld.gold object merging bug (binutils 22266)])
if ! $1 --version | grep -q "GNU gold"; then
# Not gold
result=0
elif test "$cross_compiling" = "yes"; then
AC_MSG_RESULT([cross-compiling, assuming LD can merge objects correctly.])
result=0
else
FPTOOLS_WRITE_FILE([conftest.a.c], [
__attribute__((section(".data.a")))
static int int_from_a_1 = 0x11223344;
__attribute__((section(".data.rel.ro.a")))
int *p_int_from_a_2 = &int_from_a_1;
const char *hello (void);
const char *
hello (void)
{
return "XXXHello, world!" + 3;
}
])
FPTOOLS_WRITE_FILE([conftest.main.c], [
#include <stdlib.h>
#include <string.h>
extern int *p_int_from_a_2;
extern const char *hello (void);
int main (void) {
if (*p_int_from_a_2 != 0x11223344)
abort ();
if (strcmp(hello(), "Hello, world!") != 0)
abort ();
return 0;
}
])
FPTOOLS_WRITE_FILE([conftest.t], [
SECTIONS
{
.text : {
*(.text*)
}
.rodata :
{
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.data : {
*(.data*)
}
.bss : {
*(.bss*)
}
}
])
$CC -c -o conftest.a.o conftest.a.c || AC_MSG_ERROR([Failed to compile test])
$MergeObjsCmd $MergeObjsArgs -T conftest.t conftest.a.o -o conftest.ar.o || AC_MSG_ERROR([Failed to merge test object])
$CC -c -o conftest.main.o conftest.main.c || AC_MSG_ERROR([Failed to compile test driver])
$CC conftest.ar.o conftest.main.o -o conftest || AC_MSG_ERROR([Failed to link test driver])
if ./conftest; then
AC_MSG_RESULT([not affected])
result=0
else
AC_MSG_RESULT([affected])
result=1
fi
rm -f conftest.a.o conftest.a.c conttest.ar.o conftest.main.c conftest.main.o conftest
fi
])
# FIND_MERGE_OBJECTS
# ------------------
# Find which linker to use to merge object files.
#
# See Note [Merging object files for GHCi] in GHC.Driver.Pipeline.
AC_DEFUN([FIND_MERGE_OBJECTS],[
AC_REQUIRE([FIND_LD])
if test -z "$MergeObjsCmd"; then
MergeObjsCmd="$LD"
fi
if test -z "$MergeObjsArgs"; then
MergeObjsArgs="-r"
fi
CHECK_FOR_GOLD_T22266($MergeObjsCmd)
if test "$result" = "1"; then
AC_MSG_NOTICE([$MergeObjsCmd is broken due to binutils 22266, looking for another linker...])
MergeObjsCmd=""
AC_CHECK_TARGET_TOOL([MergeObjsCmd], [ld])
CHECK_FOR_GOLD_T22266($MergeObjsCmd)
if test "$result" = "1"; then
AC_MSG_ERROR([Linker is affected by binutils 22266 but couldn't find another unaffected linker. Please set the MergeObjsCmd variable to a functional linker.])
fi
fi
AC_SUBST([MergeObjsCmd])
AC_SUBST([MergeObjsArgs])
])
# FIND_PYTHON
# -----------
# Find the version of `python` to use (for the testsuite driver)
......
......@@ -248,7 +248,7 @@ module GHC (
srcSpanStartCol, srcSpanEndCol,
-- ** Located
GenLocated(..), Located,
GenLocated(..), Located, RealLocated,
-- *** Constructing Located
noLoc, mkGeneralLocated,
......@@ -274,7 +274,7 @@ module GHC (
parser,
-- * API Annotations
ApiAnns(..),AnnKeywordId(..),AnnotationComment(..),
ApiAnns(..),AnnKeywordId(..),AnnotationComment(..), ApiAnnKey,
getAnnotation, getAndRemoveAnnotation,
getAnnotationComments, getAndRemoveAnnotationComments,
unicodeAnn,
......
......@@ -116,35 +116,6 @@ known keys. See
Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)
in GHC.Builtin.Types.
Note [The integer library]
~~~~~~~~~~~~~~~~~~~~~~~~~~
Clearly, we need to know the names of various definitions of the integer
library, e.g. the type itself, `mkInteger` etc. But there are two possible
implementations of the integer library:
* integer-gmp (fast, but uses libgmp, which may not be available on all
targets and is GPL licensed)
* integer-simple (slow, but pure Haskell and BSD-licensed)
We want the compiler to work with either one. The way we achieve this is:
* When compiling the integer-{gmp,simple} library, we pass
-this-unit-id integer-wired-in
to GHC (see the cabal file libraries/integer-{gmp,simple}.
* This way, GHC can use just this UnitID (see Module.integerUnitId) when
generating code, and the linker will succeed.
Unfortuately, the abstraction is not complete: When using integer-gmp, we
really want to use the S# constructor directly. This is controlled by
the `integerLibrary` field of `DynFlags`: If it is IntegerGMP, we use
this constructor directly (see CorePrep.lookupIntegerSDataConName)
When GHC reads the package data base, it (internally only) pretends it has UnitId
`integer-wired-in` instead of the actual UnitId (which includes the version
number); just like for `base` and other packages, as described in
Note [Wired-in units] in GHC.Unit.Module. This is done in
GHC.Unit.State.findWiredInUnits.
-}
{-# LANGUAGE CPP #-}
......@@ -377,6 +348,8 @@ basicKnownKeyNames
-- ghc-bignum
integerFromNaturalName,
integerToNaturalClampName,
integerToNaturalThrowName,
integerToNaturalName,
integerToWordName,
integerToIntName,
integerToWord64Name,
......@@ -388,15 +361,16 @@ basicKnownKeyNames
integerMulName,
integerSubName,
integerNegateName,
integerEqPrimName,
integerNePrimName,
integerLePrimName,
integerGtPrimName,
integerLtPrimName,
integerGePrimName,
integerEqName,
integerNeName,
integerLeName,
integerGtName,
integerLtName,
integerGeName,
integerAbsName,
integerSignumName,
integerCompareName,
integerPopCountName,
integerQuotName,
integerRemName,
integerDivName,
......@@ -407,7 +381,6 @@ basicKnownKeyNames
integerToDoubleName,
integerEncodeFloatName,
integerEncodeDoubleName,
integerDecodeDoubleName,
integerGcdName,
integerLcmName,
integerAndName,
......@@ -415,15 +388,46 @@ basicKnownKeyNames
integerXorName,
integerComplementName,
integerBitName,
integerTestBitName,
integerShiftLName,
integerShiftRName,
naturalToWordName,
naturalToWordClampName,
naturalEqName,
naturalNeName,
naturalGeName,
naturalLeName,
naturalGtName,
naturalLtName,
naturalCompareName,
naturalPopCountName,
naturalShiftRName,
naturalShiftLName,
naturalAddName,
naturalSubName,
naturalSubThrowName,
naturalSubUnsafeName,
naturalMulName,
naturalSignumName,
naturalNegateName,
naturalQuotRemName,
naturalQuotName,
naturalRemName,
naturalQuotRemName,
naturalAndName,
naturalAndNotName,
naturalOrName,
naturalXorName,
naturalTestBitName,
naturalBitName,
naturalGcdName,
naturalLcmName,
naturalLog2Name,
naturalLogBaseWordName,
naturalLogBaseName,
naturalPowModName,
naturalSizeInBaseName,
bignatFromWordListName,
-- Float/Double
......@@ -1153,6 +1157,8 @@ negateName = varQual gHC_NUM (fsLit "negate") negateClassOpKey
---------------------------------
integerFromNaturalName
, integerToNaturalClampName
, integerToNaturalThrowName
, integerToNaturalName
, integerToWordName
, integerToIntName
, integerToWord64Name
......@@ -1164,15 +1170,16 @@ integerFromNaturalName
, integerMulName
, integerSubName
, integerNegateName
, integerEqPrimName
, integerNePrimName
, integerLePrimName
, integerGtPrimName
, integerLtPrimName
, integerGePrimName
, integerEqName
, integerNeName
, integerLeName
, integerGtName
, integerLtName
, integerGeName
, integerAbsName
, integerSignumName
, integerCompareName
, integerPopCountName
, integerQuotName
, integerRemName
, integerDivName
......@@ -1183,7 +1190,6 @@ integerFromNaturalName
, integerToDoubleName
, integerEncodeFloatName
, integerEncodeDoubleName
, integerDecodeDoubleName
, integerGcdName
, integerLcmName
, integerAndName
......@@ -1191,15 +1197,44 @@ integerFromNaturalName
, integerXorName
, integerComplementName
, integerBitName
, integerTestBitName
, integerShiftLName
, integerShiftRName
, naturalToWordName
, naturalToWordClampName
, naturalEqName
, naturalNeName
, naturalGeName
, naturalLeName
, naturalGtName
, naturalLtName
, naturalCompareName
, naturalPopCountName
, naturalShiftRName
, naturalShiftLName
, naturalAddName
, naturalSubName
, naturalSubThrowName
, naturalSubUnsafeName
, naturalMulName
, naturalSignumName
, naturalNegateName
, naturalQuotRemName
, naturalQuotName
, naturalRemName
, naturalQuotRemName
, naturalAndName
, naturalAndNotName
, naturalOrName
, naturalXorName
, naturalTestBitName
, naturalBitName
, naturalGcdName
, naturalLcmName
, naturalLog2Name
, naturalLogBaseWordName
, naturalLogBaseName
, naturalPowModName
, naturalSizeInBaseName
, bignatFromWordListName
:: Name
......@@ -1212,15 +1247,45 @@ bniVarQual str key = varQual gHC_NUM_INTEGER (fsLit str) key
bignatFromWordListName = bnbVarQual "bigNatFromWordList#" bignatFromWordListIdKey
naturalToWordName = bnnVarQual "naturalToWord#" naturalToWordIdKey
naturalToWordClampName = bnnVarQual "naturalToWordClamp#" naturalToWordClampIdKey
naturalEqName = bnnVarQual "naturalEq#" naturalEqIdKey
naturalNeName = bnnVarQual "naturalNe#" naturalNeIdKey
naturalGeName = bnnVarQual "naturalGe#" naturalGeIdKey
naturalLeName = bnnVarQual "naturalLe#" naturalLeIdKey
naturalGtName = bnnVarQual "naturalGt#" naturalGtIdKey
naturalLtName = bnnVarQual "naturalLt#" naturalLtIdKey
naturalCompareName = bnnVarQual "naturalCompare" naturalCompareIdKey
naturalPopCountName = bnnVarQual "naturalPopCount#" naturalPopCountIdKey
naturalShiftRName = bnnVarQual "naturalShiftR#" naturalShiftRIdKey
naturalShiftLName = bnnVarQual "naturalShiftL#" naturalShiftLIdKey
naturalAddName = bnnVarQual "naturalAdd" naturalAddIdKey
naturalSubName = bnnVarQual "naturalSubUnsafe" naturalSubIdKey
naturalSubName = bnnVarQual "naturalSub" naturalSubIdKey
naturalSubThrowName = bnnVarQual "naturalSubThrow" naturalSubThrowIdKey
naturalSubUnsafeName = bnnVarQual "naturalSubUnsafe" naturalSubUnsafeIdKey
naturalMulName = bnnVarQual "naturalMul" naturalMulIdKey
naturalSignumName = bnnVarQual "naturalSignum" naturalSignumIdKey
naturalNegateName = bnnVarQual "naturalNegate" naturalNegateIdKey
naturalQuotRemName = bnnVarQual "naturalQuotRem#" naturalQuotRemIdKey
naturalQuotName = bnnVarQual "naturalQuot" naturalQuotIdKey
naturalRemName = bnnVarQual "naturalRem" naturalRemIdKey
naturalQuotRemName = bnnVarQual "naturalQuotRem" naturalQuotRemIdKey
naturalAndName = bnnVarQual "naturalAnd" naturalAndIdKey
naturalAndNotName = bnnVarQual "naturalAndNot" naturalAndNotIdKey
naturalOrName = bnnVarQual "naturalOr" naturalOrIdKey
naturalXorName = bnnVarQual "naturalXor" naturalXorIdKey
naturalTestBitName = bnnVarQual "naturalTestBit#" naturalTestBitIdKey
naturalBitName = bnnVarQual "naturalBit#" naturalBitIdKey
naturalGcdName = bnnVarQual "naturalGcd" naturalGcdIdKey
naturalLcmName = bnnVarQual "naturalLcm" naturalLcmIdKey
naturalLog2Name = bnnVarQual "naturalLog2#" naturalLog2IdKey
naturalLogBaseWordName = bnnVarQual "naturalLogBaseWord#" naturalLogBaseWordIdKey
naturalLogBaseName = bnnVarQual "naturalLogBase#" naturalLogBaseIdKey
naturalPowModName = bnnVarQual "naturalPowMod" naturalPowModIdKey
naturalSizeInBaseName = bnnVarQual "naturalSizeInBase#" naturalSizeInBaseIdKey
integerFromNaturalName = bniVarQual "integerFromNatural" integerFromNaturalIdKey
integerToNaturalClampName = bniVarQual "integerToNaturalClamp" integerToNaturalClampIdKey
integerToNaturalThrowName = bniVarQual "integerToNaturalThrow" integerToNaturalThrowIdKey
integerToNaturalName = bniVarQual "integerToNatural" integerToNaturalIdKey
integerToWordName = bniVarQual "integerToWord#" integerToWordIdKey
integerToIntName = bniVarQual "integerToInt#" integerToIntIdKey
integerToWord64Name = bniVarQual "integerToWord64#" integerToWord64IdKey
......@@ -1232,15 +1297,16 @@ integerAddName = bniVarQual "integerAdd" integerAddIdK
integerMulName = bniVarQual "integerMul" integerMulIdKey
integerSubName = bniVarQual "integerSub" integerSubIdKey
integerNegateName = bniVarQual "integerNegate" integerNegateIdKey
integerEqPrimName = bniVarQual "integerEq#" integerEqPrimIdKey
integerNePrimName = bniVarQual "integerNe#" integerNePrimIdKey
integerLePrimName = bniVarQual "integerLe#" integerLePrimIdKey
integerGtPrimName = bniVarQual "integerGt#" integerGtPrimIdKey
integerLtPrimName = bniVarQual "integerLt#" integerLtPrimIdKey
integerGePrimName = bniVarQual "integerGe#" integerGePrimIdKey
integerEqName = bniVarQual "integerEq#" integerEqIdKey
integerNeName = bniVarQual "integerNe#" integerNeIdKey
integerLeName = bniVarQual "integerLe#" integerLeIdKey
integerGtName = bniVarQual "integerGt#" integerGtIdKey
integerLtName = bniVarQual "integerLt#" integerLtIdKey
integerGeName = bniVarQual "integerGe#" integerGeIdKey
integerAbsName = bniVarQual "integerAbs" integerAbsIdKey
integerSignumName = bniVarQual "integerSignum" integerSignumIdKey
integerCompareName = bniVarQual "integerCompare" integerCompareIdKey
integerPopCountName = bniVarQual "integerPopCount#" integerPopCountIdKey
integerQuotName = bniVarQual "integerQuot" integerQuotIdKey
integerRemName = bniVarQual "integerRem" integerRemIdKey
integerDivName = bniVarQual "integerDiv" integerDivIdKey
......@@ -1251,7 +1317,6 @@ integerToFloatName = bniVarQual "integerToFloat#" integerToFloa
integerToDoubleName = bniVarQual "integerToDouble#" integerToDoubleIdKey
integerEncodeFloatName = bniVarQual "integerEncodeFloat#" integerEncodeFloatIdKey
integerEncodeDoubleName = bniVarQual "integerEncodeDouble#" integerEncodeDoubleIdKey
integerDecodeDoubleName = bniVarQual "integerDecodeDouble#" integerDecodeDoubleIdKey
integerGcdName = bniVarQual "integerGcd" integerGcdIdKey
integerLcmName = bniVarQual "integerLcm" integerLcmIdKey
integerAndName = bniVarQual "integerAnd" integerAndIdKey
......@@ -1259,6 +1324,7 @@ integerOrName = bniVarQual "integerOr" integerOrIdKe
integerXorName = bniVarQual "integerXor" integerXorIdKey
integerComplementName = bniVarQual "integerComplement" integerComplementIdKey
integerBitName = bniVarQual "integerBit#" integerBitIdKey
integerTestBitName = bniVarQual "integerTestBit#" integerTestBitIdKey
integerShiftLName = bniVarQual "integerShiftL#" integerShiftLIdKey
integerShiftRName = bniVarQual "integerShiftR#" integerShiftRIdKey
......@@ -2456,6 +2522,8 @@ unsafeCoercePrimIdKey = mkPreludeMiscIdUnique 571
integerFromNaturalIdKey
, integerToNaturalClampIdKey
, integerToNaturalThrowIdKey
, integerToNaturalIdKey
, integerToWordIdKey
, integerToIntIdKey
, integerToWord64IdKey
......@@ -2464,15 +2532,16 @@ integerFromNaturalIdKey
, integerMulIdKey
, integerSubIdKey
, integerNegateIdKey
, integerEqPrimIdKey
, integerNePrimIdKey
, integerLePrimIdKey
, integerGtPrimIdKey
, integerLtPrimIdKey
, integerGePrimIdKey
, integerEqIdKey
, integerNeIdKey
, integerLeIdKey
, integerGtIdKey
, integerLtIdKey
, integerGeIdKey
, integerAbsIdKey
, integerSignumIdKey
, integerCompareIdKey
, integerPopCountIdKey
, integerQuotIdKey
, integerRemIdKey
, integerDivIdKey
......@@ -2490,74 +2559,133 @@ integerFromNaturalIdKey
, integerXorIdKey
, integerComplementIdKey
, integerBitIdKey
, integerTestBitIdKey
, integerShiftLIdKey
, integerShiftRIdKey
, integerFromWordIdKey
, integerFromWord64IdKey
, integerFromInt64IdKey
, integerDecodeDoubleIdKey
, naturalToWordIdKey
, naturalToWordClampIdKey
, naturalEqIdKey
, naturalNeIdKey
, naturalGeIdKey
, naturalLeIdKey
, naturalGtIdKey
, naturalLtIdKey
, naturalCompareIdKey
, naturalPopCountIdKey
, naturalShiftRIdKey
, naturalShiftLIdKey
, naturalAddIdKey
, naturalSubIdKey
, naturalSubThrowIdKey
, naturalSubUnsafeIdKey
, naturalMulIdKey
, naturalSignumIdKey
, naturalNegateIdKey
, naturalQuotRemIdKey
, naturalQuotIdKey
, naturalRemIdKey
, naturalQuotRemIdKey
, naturalAndIdKey
, naturalAndNotIdKey
, naturalOrIdKey
, naturalXorIdKey
, naturalTestBitIdKey
, naturalBitIdKey
, naturalGcdIdKey
, naturalLcmIdKey
, naturalLog2IdKey
, naturalLogBaseWordIdKey
, naturalLogBaseIdKey
, naturalPowModIdKey
, naturalSizeInBaseIdKey
, bignatFromWordListIdKey
:: Unique
integerFromNaturalIdKey = mkPreludeMiscIdUnique 600
integerToNaturalClampIdKey = mkPreludeMiscIdUnique 601
integerToWordIdKey = mkPreludeMiscIdUnique 602
integerToIntIdKey = mkPreludeMiscIdUnique 603
integerToWord64IdKey = mkPreludeMiscIdUnique 604
integerToInt64IdKey = mkPreludeMiscIdUnique 605
integerAddIdKey = mkPreludeMiscIdUnique 606
integerMulIdKey = mkPreludeMiscIdUnique 607
integerSubIdKey = mkPreludeMiscIdUnique 608
integerNegateIdKey = mkPreludeMiscIdUnique 609
integerEqPrimIdKey = mkPreludeMiscIdUnique 610
integerNePrimIdKey = mkPreludeMiscIdUnique 611
integerLePrimIdKey = mkPreludeMiscIdUnique 612
integerGtPrimIdKey = mkPreludeMiscIdUnique 613
integerLtPrimIdKey = mkPreludeMiscIdUnique 614
integerGePrimIdKey = mkPreludeMiscIdUnique 615
integerAbsIdKey = mkPreludeMiscIdUnique 616
integerSignumIdKey = mkPreludeMiscIdUnique 617
integerCompareIdKey = mkPreludeMiscIdUnique 618
integerQuotIdKey = mkPreludeMiscIdUnique 619
integerRemIdKey = mkPreludeMiscIdUnique 620
integerDivIdKey = mkPreludeMiscIdUnique 621
integerModIdKey = mkPreludeMiscIdUnique 622
integerDivModIdKey = mkPreludeMiscIdUnique 623
integerQuotRemIdKey = mkPreludeMiscIdUnique 624
integerToFloatIdKey = mkPreludeMiscIdUnique 625
integerToDoubleIdKey = mkPreludeMiscIdUnique 626
integerEncodeFloatIdKey = mkPreludeMiscIdUnique 627
integerEncodeDoubleIdKey = mkPreludeMiscIdUnique 628
integerGcdIdKey = mkPreludeMiscIdUnique 629
integerLcmIdKey = mkPreludeMiscIdUnique 630
integerAndIdKey = mkPreludeMiscIdUnique 631
integerOrIdKey = mkPreludeMiscIdUnique 632
integerXorIdKey = mkPreludeMiscIdUnique 633
integerComplementIdKey = mkPreludeMiscIdUnique 634
integerBitIdKey = mkPreludeMiscIdUnique 635
integerShiftLIdKey = mkPreludeMiscIdUnique 636
integerShiftRIdKey = mkPreludeMiscIdUnique 637
integerFromWordIdKey = mkPreludeMiscIdUnique 638
integerFromWord64IdKey = mkPreludeMiscIdUnique 639
integerFromInt64IdKey = mkPreludeMiscIdUnique 640
integerDecodeDoubleIdKey = mkPreludeMiscIdUnique 641
integerToNaturalThrowIdKey = mkPreludeMiscIdUnique 602
integerToNaturalIdKey = mkPreludeMiscIdUnique 603
integerToWordIdKey = mkPreludeMiscIdUnique 604
integerToIntIdKey = mkPreludeMiscIdUnique 605
integerToWord64IdKey = mkPreludeMiscIdUnique 606
integerToInt64IdKey = mkPreludeMiscIdUnique 607
integerAddIdKey = mkPreludeMiscIdUnique 608
integerMulIdKey = mkPreludeMiscIdUnique 609
integerSubIdKey = mkPreludeMiscIdUnique 610
integerNegateIdKey = mkPreludeMiscIdUnique 611
integerEqIdKey = mkPreludeMiscIdUnique 612
integerNeIdKey = mkPreludeMiscIdUnique 613
integerLeIdKey = mkPreludeMiscIdUnique 614
integerGtIdKey = mkPreludeMiscIdUnique 615
integerLtIdKey = mkPreludeMiscIdUnique 616
integerGeIdKey = mkPreludeMiscIdUnique 617
integerAbsIdKey = mkPreludeMiscIdUnique 618
integerSignumIdKey = mkPreludeMiscIdUnique 619
integerCompareIdKey = mkPreludeMiscIdUnique 620
integerPopCountIdKey = mkPreludeMiscIdUnique 621
integerQuotIdKey = mkPreludeMiscIdUnique 622
integerRemIdKey = mkPreludeMiscIdUnique 623
integerDivIdKey = mkPreludeMiscIdUnique 624
integerModIdKey = mkPreludeMiscIdUnique 625
integerDivModIdKey = mkPreludeMiscIdUnique 626
integerQuotRemIdKey = mkPreludeMiscIdUnique 627
integerToFloatIdKey = mkPreludeMiscIdUnique 628
integerToDoubleIdKey = mkPreludeMiscIdUnique 629
integerEncodeFloatIdKey = mkPreludeMiscIdUnique 630
integerEncodeDoubleIdKey = mkPreludeMiscIdUnique 631
integerGcdIdKey = mkPreludeMiscIdUnique 632
integerLcmIdKey = mkPreludeMiscIdUnique 633
integerAndIdKey = mkPreludeMiscIdUnique 634
integerOrIdKey = mkPreludeMiscIdUnique 635
integerXorIdKey = mkPreludeMiscIdUnique 636
integerComplementIdKey = mkPreludeMiscIdUnique 637
integerBitIdKey = mkPreludeMiscIdUnique 638
integerTestBitIdKey = mkPreludeMiscIdUnique 639
integerShiftLIdKey = mkPreludeMiscIdUnique 640
integerShiftRIdKey = mkPreludeMiscIdUnique 641
integerFromWordIdKey = mkPreludeMiscIdUnique 642
integerFromWord64IdKey = mkPreludeMiscIdUnique 643
integerFromInt64IdKey = mkPreludeMiscIdUnique 644
naturalToWordIdKey = mkPreludeMiscIdUnique 650
naturalAddIdKey = mkPreludeMiscIdUnique 651
naturalSubIdKey = mkPreludeMiscIdUnique 652
naturalMulIdKey = mkPreludeMiscIdUnique 653
naturalQuotIdKey = mkPreludeMiscIdUnique 654
naturalRemIdKey = mkPreludeMiscIdUnique 655
naturalQuotRemIdKey = mkPreludeMiscIdUnique 656
bignatFromWordListIdKey = mkPreludeMiscIdUnique 670
naturalToWordClampIdKey = mkPreludeMiscIdUnique 651
naturalEqIdKey = mkPreludeMiscIdUnique 652
naturalNeIdKey = mkPreludeMiscIdUnique 653
naturalGeIdKey = mkPreludeMiscIdUnique 654
naturalLeIdKey = mkPreludeMiscIdUnique 655
naturalGtIdKey = mkPreludeMiscIdUnique 656
naturalLtIdKey = mkPreludeMiscIdUnique 657
naturalCompareIdKey = mkPreludeMiscIdUnique 658
naturalPopCountIdKey = mkPreludeMiscIdUnique 659
naturalShiftRIdKey = mkPreludeMiscIdUnique 660
naturalShiftLIdKey = mkPreludeMiscIdUnique 661
naturalAddIdKey = mkPreludeMiscIdUnique 662
naturalSubIdKey = mkPreludeMiscIdUnique 663
naturalSubThrowIdKey = mkPreludeMiscIdUnique 664
naturalSubUnsafeIdKey = mkPreludeMiscIdUnique 665
naturalMulIdKey = mkPreludeMiscIdUnique 666
naturalSignumIdKey = mkPreludeMiscIdUnique 667
naturalNegateIdKey = mkPreludeMiscIdUnique 668
naturalQuotRemIdKey = mkPreludeMiscIdUnique 669
naturalQuotIdKey = mkPreludeMiscIdUnique 670
naturalRemIdKey = mkPreludeMiscIdUnique 671
naturalAndIdKey = mkPreludeMiscIdUnique 672
naturalAndNotIdKey = mkPreludeMiscIdUnique 673
naturalOrIdKey = mkPreludeMiscIdUnique 674
naturalXorIdKey = mkPreludeMiscIdUnique 675
naturalTestBitIdKey = mkPreludeMiscIdUnique 676
naturalBitIdKey = mkPreludeMiscIdUnique 677
naturalGcdIdKey = mkPreludeMiscIdUnique 678
naturalLcmIdKey = mkPreludeMiscIdUnique 679
naturalLog2IdKey = mkPreludeMiscIdUnique 680
naturalLogBaseWordIdKey = mkPreludeMiscIdUnique 681
naturalLogBaseIdKey = mkPreludeMiscIdUnique 682
naturalPowModIdKey = mkPreludeMiscIdUnique 683
naturalSizeInBaseIdKey = mkPreludeMiscIdUnique 684
bignatFromWordListIdKey = mkPreludeMiscIdUnique 690
{-
************************************************************************
......
......@@ -71,7 +71,7 @@ import GHC.Driver.Types
import GHC.Core.Class
import GHC.Core.TyCon
import GHC.Types.Unique.FM
import GHC.Utils.Misc
import GHC.Utils.Misc as Utils
import GHC.Builtin.Types.Literals ( typeNatTyCons )
import GHC.Hs.Doc
......@@ -179,7 +179,7 @@ knownKeyNamesOkay all_names
| otherwise
= Just badNamesStr
where
namesEnv = foldl' (\m n -> extendNameEnv_Acc (:) singleton m n n)
namesEnv = foldl' (\m n -> extendNameEnv_Acc (:) Utils.singleton m n n)
emptyUFM all_names
badNamesEnv = filterNameEnv (\ns -> ns `lengthExceeds` 1) namesEnv
badNamesPairs = nonDetUFMToList badNamesEnv
......
......@@ -2471,17 +2471,47 @@ primop WriteOffAddrOp_Word64 "writeWord64OffAddr#" GenPrimOp
with has_side_effects = True
can_fail = True
primop InterlockedExchange_Addr "interlockedExchangeAddr#" GenPrimOp
primop InterlockedExchange_Addr "atomicExchangeAddrAddr#" GenPrimOp
Addr# -> Addr# -> State# s -> (# State# s, Addr# #)
{The atomic exchange operation. Atomically exchanges the value at the first address
with the Addr# given as second argument. Implies a read barrier.}
with has_side_effects = True
can_fail = True
primop InterlockedExchange_Int "interlockedExchangeInt#" GenPrimOp
Addr# -> Int# -> State# s -> (# State# s, Int# #)
primop InterlockedExchange_Word "atomicExchangeWordAddr#" GenPrimOp
Addr# -> Word# -> State# s -> (# State# s, Word# #)
{The atomic exchange operation. Atomically exchanges the value at the address
with the given value. Returns the old value. Implies a read barrier.}
with has_side_effects = True
can_fail = True
primop CasAddrOp_Addr "atomicCasAddrAddr#" GenPrimOp
Addr# -> Addr# -> Addr# -> State# s -> (# State# s, Addr# #)
{ Compare and swap on a word-sized memory location.
Use as: \s -> atomicCasAddrAddr# location expected desired s
This version always returns the old value read. This follows the normal
protocol for CAS operations (and matches the underlying instruction on
most architectures).
Implies a full memory barrier.}
with has_side_effects = True
can_fail = True
primop CasAddrOp_Word "atomicCasWordAddr#" GenPrimOp
Addr# -> Word# -> Word# -> State# s -> (# State# s, Word# #)
{ Compare and swap on a word-sized and aligned memory location.
Use as: \s -> atomicCasWordAddr# location expected desired s
This version always returns the old value read. This follows the normal
protocol for CAS operations (and matches the underlying instruction on
most architectures).
Implies a full memory barrier.}
with has_side_effects = True
can_fail = True
------------------------------------------------------------------------
section "Mutable variables"
......@@ -3264,6 +3294,20 @@ primop NumSparks "numSparks#" GenPrimOp
has_side_effects = True
out_of_line = True
------------------------------------------------------------------------
section "Controlling object lifetime"
{Ensuring that objects don't die a premature death.}
------------------------------------------------------------------------
-- See Note [keepAlive# magic] in GHC.CoreToStg.Prep.
primop KeepAliveOp "keepAlive#" GenPrimOp
o -> State# RealWorld -> (State# RealWorld -> p) -> p
{ TODO. }
with
strictness = { \ _arity -> mkClosedStrictSig [topDmd, topDmd, strictApply1Dmd] topDiv }
------------------------------------------------------------------------
section "Tag to enum stuff"
{Convert back and forth between values of enumerated types
......
......@@ -1255,7 +1255,7 @@ pprCLabel dflags = \case
where
platform = targetPlatform dflags
useNCG = platformMisc_ghcWithNativeCodeGen (platformMisc dflags)
useNCG = hscTarget dflags == HscAsm
maybe_underscore :: SDoc -> SDoc
maybe_underscore doc =
......
......@@ -6,6 +6,7 @@
--
-----------------------------------------------------------------------------
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
module GHC.Cmm.Lint (
cmmLint, cmmLintGraph
......@@ -14,6 +15,7 @@ module GHC.Cmm.Lint (
import GHC.Prelude
import GHC.Platform
import GHC.Platform.Regs (callerSaves)
import GHC.Cmm.Dataflow.Block
import GHC.Cmm.Dataflow.Collections
import GHC.Cmm.Dataflow.Graph
......@@ -26,7 +28,7 @@ import GHC.Cmm.Ppr () -- For Outputable instances
import GHC.Utils.Outputable
import GHC.Driver.Session
import Control.Monad (ap)
import Control.Monad (ap, unless)
-- Things to check:
-- - invariant on CmmBlock in GHC.Cmm.Expr (see comment there)
......@@ -160,7 +162,13 @@ lintCmmMiddle node = case node of
CmmUnsafeForeignCall target _formals actuals -> do
lintTarget target
mapM_ lintCmmExpr actuals
let lintArg expr = do
-- Arguments can't mention caller-saved
-- registers. See Note [Register parameter passing].
mayNotMentionCallerSavedRegs (text "foreign call argument") expr
lintCmmExpr expr
mapM_ lintArg actuals
lintCmmLast :: LabelSet -> CmmNode O C -> CmmLint ()
......@@ -188,18 +196,40 @@ lintCmmLast labels node = case node of
CmmForeignCall tgt _ args succ _ _ _ -> do
lintTarget tgt
mapM_ lintCmmExpr args
let lintArg expr = do
-- Arguments can't mention caller-saved
-- registers. See Note [Register
-- parameter passing].
-- N.B. This won't catch local registers
-- which the NCG's register allocator later
-- places in caller-saved registers.
mayNotMentionCallerSavedRegs (text "foreign call argument") expr
lintCmmExpr expr
mapM_ lintArg args
checkTarget succ
where
checkTarget id
| setMember id labels = return ()
| otherwise = cmmLintErr (text "Branch to nonexistent id" <+> ppr id)
lintTarget :: ForeignTarget -> CmmLint ()
lintTarget (ForeignTarget e _) = lintCmmExpr e >> return ()
lintTarget (ForeignTarget e _) = do
mayNotMentionCallerSavedRegs (text "foreign target") e
_ <- lintCmmExpr e
return ()
lintTarget (PrimTarget {}) = return ()
-- | As noted in Note [Register parameter passing], the arguments and
-- 'ForeignTarget' of a foreign call mustn't mention
-- caller-saved registers.
mayNotMentionCallerSavedRegs :: (UserOfRegs GlobalReg a, Outputable a)
=> SDoc -> a -> CmmLint ()
mayNotMentionCallerSavedRegs what thing = do
dflags <- getDynFlags
let badRegs = filter (callerSaves (targetPlatform dflags))
$ foldRegsUsed dflags (flip (:)) [] thing
unless (null badRegs)
$ cmmLintErr (what <+> text "mentions caller-saved registers: " <> ppr badRegs $$ ppr thing)
checkCond :: Platform -> CmmExpr -> CmmLint ()
checkCond _ (CmmMachOp mop _) | isComparisonMachOp mop = return ()
......
......@@ -45,6 +45,9 @@ native code generators to handle.
Most operations are parameterised by the 'Width' that they operate on.
Some operations have separate signed and unsigned versions, and float
and integer versions.
Note that there are variety of places in the native code generator where we
assume that the code produced for a MachOp does not introduce new blocks.
-}
data MachOp
......
......@@ -93,7 +93,7 @@ data CmmNode e x where
--
-- Invariant: the arguments and the ForeignTarget must not
-- mention any registers for which GHC.Platform.callerSaves
-- is True. See Note [Register Parameter Passing].
-- is True. See Note [Register parameter passing].
CmmBranch :: ULabel -> CmmNode O C
-- Goto another block in the same procedure
......@@ -223,11 +223,12 @@ convention, rdi, rsi, rdx and rcx (as well as r8 and r9) may be used for
argument passing. These are registers R3-R6, which our generated
code may also be using; as a result, it's necessary to save these
values before doing a foreign call. This is done during initial
code generation in callerSaveVolatileRegs in GHC.StgToCmm.Utils. However,
one result of doing this is that the contents of these registers
may mysteriously change if referenced inside the arguments. This
is dangerous, so you'll need to disable inlining much in the same
way is done in GHC.Cmm.Opt currently. We should fix this!
code generation in callerSaveVolatileRegs in GHC.StgToCmm.Utils.
However, one result of doing this is that the contents of these registers may
mysteriously change if referenced inside the arguments. This is dangerous, so
you'll need to disable inlining much in the same way is done in GHC.Cmm.Sink
currently. We should fix this!
-}
---------------------------------------------
......
......@@ -203,6 +203,7 @@ necessary to the stack to accommodate it (e.g. 2).
module GHC.Cmm.Parser ( parseCmmFile ) where
import GHC.Prelude
import qualified Prelude -- for happy-generated code
import GHC.StgToCmm.ExtCode
import GHC.Cmm.CallConv
......
......@@ -772,6 +772,7 @@ regAddr _ _ _ _ = AnyMem
{-
Note [Inline GlobalRegs?]
~~~~~~~~~~~~~~~~~~~~~~~~~
Should we freely inline GlobalRegs?
......
......@@ -177,7 +177,7 @@ nativeCodeGen dflags this_mod modLoc h us cmms
ArchSPARC -> nCG' (sparcNcgImpl config)
ArchSPARC64 -> panic "nativeCodeGen: No NCG for SPARC64"
ArchARM {} -> panic "nativeCodeGen: No NCG for ARM"
ArchARM64 -> panic "nativeCodeGen: No NCG for ARM64"
ArchAArch64 -> panic "nativeCodeGen: No NCG for AArch64"
ArchPPC_64 _ -> nCG' (ppcNcgImpl config)
ArchAlpha -> panic "nativeCodeGen: No NCG for Alpha"
ArchMipseb -> panic "nativeCodeGen: No NCG for mipseb"
......@@ -1243,3 +1243,4 @@ cmmExprNative referenceKind expr = do
other
-> return other
......@@ -278,7 +278,8 @@ regAlloc_spin config spinCount triv regsFree slotsFree slotsCount debug_codeGrap
, raCoalesced = rmCoalesce
, raSpillStats = spillStats
, raSpillCosts = spillCosts
, raSpilled = code_spilled }
, raSpilled = code_spilled
, raPlatform = platform }
-- Bundle up all the register allocator statistics.
-- .. but make sure to drop them on the floor if they're not
......
......@@ -73,7 +73,11 @@ data RegAllocStats statics instr
, raSpillCosts :: SpillCostInfo
-- | Code with spill instructions added.
, raSpilled :: [LiveCmmDecl statics instr] }
, raSpilled :: [LiveCmmDecl statics instr]
-- | Target platform
, raPlatform :: !Platform
}
-- a successful coloring
......
......@@ -115,7 +115,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcInteger conflicts excl
ArchSPARC64 -> panic "trivColorable ArchSPARC64"
ArchPPC_64 _ -> 15
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAArch64 -> panic "trivColorable ArchAArch64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
......@@ -146,7 +146,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclus
ArchSPARC64 -> panic "trivColorable ArchSPARC64"
ArchPPC_64 _ -> 0
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAArch64 -> panic "trivColorable ArchAArch64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
......@@ -179,7 +179,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu
ArchSPARC64 -> panic "trivColorable ArchSPARC64"
ArchPPC_64 _ -> 20
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAArch64 -> panic "trivColorable ArchAArch64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
......