[commit: ghc] master: Turn divInt# and modInt# into bitwise operations when possible (6ea6242)
git at git.haskell.org
git at git.haskell.org
Mon Sep 5 19:29:30 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6ea62427de419ea071e1ea79ad0c15d9f4e90a67/ghc
>---------------------------------------------------------------
commit 6ea62427de419ea071e1ea79ad0c15d9f4e90a67
Author: Takano Akio <tak at anoak.io>
Date: Sun Sep 4 13:22:22 2016 -0400
Turn divInt# and modInt# into bitwise operations when possible
This implements #5615 for divInt# and modInt#.
I also included rules to do constant-folding when the both arguments
are known.
Test Plan: validate
Reviewers: austin, simonmar, bgamari
Reviewed By: bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D2486
GHC Trac Issues: #5615
>---------------------------------------------------------------
6ea62427de419ea071e1ea79ad0c15d9f4e90a67
compiler/cmm/CmmOpt.hs | 21 +------------------
compiler/prelude/PrelNames.hs | 12 ++++++++++-
compiler/prelude/PrelRules.hs | 21 ++++++++++++++++++-
compiler/prelude/primops.txt.pp | 8 ++++++--
compiler/utils/Util.hs | 24 ++++++++++++++++++++++
libraries/ghc-prim/GHC/Classes.hs | 3 +++
testsuite/tests/simplCore/should_compile/Makefile | 10 +++++++++
testsuite/tests/simplCore/should_compile/T5615.hs | 10 +++++++++
.../should_compile/T5615.stdout} | 0
testsuite/tests/simplCore/should_compile/all.T | 1 +
10 files changed, 86 insertions(+), 24 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6ea62427de419ea071e1ea79ad0c15d9f4e90a67
More information about the ghc-commits
mailing list