Rodrigo Mesquita pushed to branch wip/romes/async-rpc at Glasgow Haskell Compiler / GHC
Commits:
-
f22a9782
by Rodrigo Mesquita at 2026-11-25T11:38:46+00:00
2 changed files:
Changes:
| ... | ... | @@ -890,3 +890,15 @@ test ('T26989', |
| 890 | 890 | multimod_compile,
|
| 891 | 891 | ['T26989', '-v0 -O'])
|
| 892 | 892 | |
| 893 | +# Compile many trivial splices with -fno-code, to try and isolate the cost of communication with ext-interp.
|
|
| 894 | +# Introduced as a test against a regression that had been introduced in the async-rpc branch work.
|
|
| 895 | +test('ExtInterpManySplices',
|
|
| 896 | + [ collect_compiler_stats('bytes allocated', 2),
|
|
| 897 | + req_th,
|
|
| 898 | + unless(config.have_ext_interp, skip),
|
|
| 899 | + pre_cmd('./genExtInterpManySplices'),
|
|
| 900 | + extra_files(['genExtInterpManySplices']),
|
|
| 901 | + only_ways(['normal']),
|
|
| 902 | + ],
|
|
| 903 | + compile,
|
|
| 904 | + ['-fno-code -fexternal-interpreter']) |
| 1 | +#!/usr/bin/env bash
|
|
| 2 | +# One module with many trivial splices
|
|
| 3 | +NSPLICES=1000
|
|
| 4 | +{
|
|
| 5 | + echo "{-# LANGUAGE TemplateHaskell #-}"
|
|
| 6 | + echo "module ExtInterpManySplices where"
|
|
| 7 | + echo "import Language.Haskell.TH.Syntax"
|
|
| 8 | + for i in $(seq $NSPLICES); do
|
|
| 9 | + echo "x$i :: Int"
|
|
| 10 | + echo "x$i = \$(lift ($i :: Int))"
|
|
| 11 | + done
|
|
| 12 | +} > ExtInterpManySplices.hs |