diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-24 13:59:42 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | c1fe4ab6ee00b21c1918f67b58ad78be5b044109 (patch) | |
tree | 3ff63bb515732330d53b9d58bf18bf03e95115f3 | |
parent | df6bb1124154bf95527bfe0645b81c89ee869940 (diff) | |
download | haskell-c1fe4ab6ee00b21c1918f67b58ad78be5b044109.tar.gz |
compiler: enforce cmm switch planning for wasm32
This patch forcibly enable Cmm switch planning for wasm32, since
otherwise the switch tables we generate may exceed the br_table
maximum allowed size.
-rw-r--r-- | compiler/GHC/Driver/Config/Cmm.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Config/Cmm.hs b/compiler/GHC/Driver/Config/Cmm.hs index 5e7ebf72dd..26ee35cba1 100644 --- a/compiler/GHC/Driver/Config/Cmm.hs +++ b/compiler/GHC/Driver/Config/Cmm.hs @@ -20,7 +20,8 @@ initCmmConfig dflags = CmmConfig , cmmOptSink = gopt Opt_CmmSink dflags , cmmGenStackUnwindInstr = debugLevel dflags > 0 , cmmExternalDynamicRefs = gopt Opt_ExternalDynamicRefs dflags - , cmmDoCmmSwitchPlans = not . backendHasNativeSwitch . backend $ dflags + , cmmDoCmmSwitchPlans = not (backendHasNativeSwitch (backend dflags)) + || platformArch platform == ArchWasm32 , cmmSplitProcPoints = not (backendSupportsUnsplitProcPoints (backend dflags)) || not (platformTablesNextToCode platform) || usingInconsistentPicReg |