Changing prefetch primops to have a `seq`-like interface
Summary: The current primops for prefetching do not properly work in pure code; namely, the primops are not 'hoisted' into the correct call sites based on when arguments are evaluated. Instead, they should use a `seq`-like interface, which will cause it to be evaluated when the needed term is. See #9353 for the full discussion. Test Plan: updated tests for pure prefetch in T8256 to reflect the design changes in #9353 Reviewers: simonmar, hvr, ekmett, austin Reviewed By: ekmett, austin Subscribers: merijn, thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D350 GHC Trac Issues: #9353
Showing
- compiler/codeGen/StgCmmPrim.hs 51 additions, 29 deletionscompiler/codeGen/StgCmmPrim.hs
- compiler/prelude/primops.txt.pp 51 additions, 23 deletionscompiler/prelude/primops.txt.pp
- testsuite/tests/codeGen/should_run/T8256.hs 19 additions, 34 deletionstestsuite/tests/codeGen/should_run/T8256.hs
- testsuite/tests/codeGen/should_run/all.T 1 addition, 1 deletiontestsuite/tests/codeGen/should_run/all.T
Loading
Please register or sign in to comment