diff options
author | Jonas Scholl <anselm.scholl@tu-harburg.de> | 2016-01-22 16:21:57 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-22 18:50:27 +0100 |
commit | 4d51bfc8975f9c6c3ab6d293c48f98da85210d5f (patch) | |
tree | 08bf0c69dc58ece3f09055a2f2dbbc54d3a72ab5 /rts/Timer.c | |
parent | 6e5f8285005895fe4f1915ddea99b72f8ee91834 (diff) | |
download | haskell-4d51bfc8975f9c6c3ab6d293c48f98da85210d5f.tar.gz |
Do not count void arguments when considering a function for loopification.
This fixes #11372 by omitting arguments with a void-type when checking
whether a self-recursive tail call can be optimized to a local jump.
Previously, a function taking a real argument and a State# token
would report an arity of 1 in the SelfLoopInfo in getCallMethod,
but a self-recursive call would apply it to 2 arguments, one of them
being the State# token, thus no local jump would be generated.
As the State# token is not represented by anything at runtime, we can
ignore it and thus trigger the loopification optimization.
Test Plan: ./validate
Reviewers: austin, bgamari, simonmar
Reviewed By: bgamari
Subscribers: simonmar, thomie
Differential Revision: https://phabricator.haskell.org/D1767
GHC Trac Issues: #11372
Diffstat (limited to 'rts/Timer.c')
0 files changed, 0 insertions, 0 deletions