summaryrefslogtreecommitdiff
path: root/compiler/GHC/Platform/PPC.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-01-12 22:21:40 +0000
committerSimon Peyton Jones <simon.peytonjones@gmail.com>2023-01-31 08:54:52 +0000
commitae22d1096df1bd83b5ce9ef5d8c2bd8c00e20bad (patch)
treedc345c52cefcb688e3be7447551cb0a0bedfb492 /compiler/GHC/Platform/PPC.hs
parentb69461a06166d2b1c600df87b87656d09122fb7c (diff)
downloadhaskell-wip/T22745.tar.gz
Improve exprOkForSpeculation for classopswip/T22745
This patch fixes #22745 and #15205, which are about GHC's failure to discard unnecessary superclass selections that yield coercions. See GHC.Core.Utils Note [exprOkForSpeculation and type classes] The main changes are: * Write new Note [NON-BOTTOM_DICTS invariant] in GHC.Core, and refer to it * Define new function isTerminatingType, to identify those guaranteed-terminating dictionary types. * exprOkForSpeculation has a new (very simple) case for ClassOpId * ClassOpId has a new field that says if the return type is an unlifted type, or a terminating type. This was surprisingly tricky to get right. In particular note that unlifted types are not terminating types; you can write an expression of unlifted type, that diverges. Not so for dictionaries (or, more precisely, for the dictionaries that GHC constructs). Metric Decrease: LargeRecord
Diffstat (limited to 'compiler/GHC/Platform/PPC.hs')
0 files changed, 0 insertions, 0 deletions