codeGen: allocate small byte arrays of statically known size inline
authorJohan Tibell <johan.tibell@gmail.com>
Wed, 12 Mar 2014 06:20:19 +0000 (07:20 +0100)
committerJohan Tibell <johan.tibell@gmail.com>
Thu, 13 Mar 2014 23:01:28 +0000 (00:01 +0100)
commit210ccabc9489bfbf814939e8b45646c8d0c7ce5f
tree3ce5e2af9f13639fc1b0c202ec7f9ee80fe7bee8
parentcbdd83288bc3d3d2f07eadf800e9f2b27916c168
codeGen: allocate small byte arrays of statically known size inline

This results in a 57% runtime decrease when allocating an array of 128
bytes on a 64-bit machine.

Fixes #8876.
compiler/cmm/CLabel.hs
compiler/cmm/SMRep.lhs
compiler/codeGen/StgCmmPrim.hs
testsuite/tests/codeGen/should_run/StaticByteArraySize.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_run/StaticByteArraySize.stdout [new file with mode: 0644]
testsuite/tests/codeGen/should_run/all.T
testsuite/tests/perf/should_run/InlineByteArrayAlloc.hs [new file with mode: 0644]
testsuite/tests/perf/should_run/all.T
utils/deriveConstants/DeriveConstants.hs