Minor refactoring in copy array primops:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Fri, 22 Mar 2019 07:06:37 +0000 (10:06 +0300)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 27 Mar 2019 11:20:10 +0000 (07:20 -0400)
commit5730f86331df4aa9b3d7b5ab59b1ebeafceaeadb
treecd5cf7266a7885e95f72f28c7cb6f033440e8d3d
parent3dec527a840a8165c33579bca09740ca9cf1f4de
Minor refactoring in copy array primops:

- `emitCopySmallArray` now checks size before generating code and
  doesn't generate any code when size is 0. `emitCopyArray` already does
  this so this makes small/large array cases the same in argument
  checking.

- In both `emitCopySmallArray` and `emitCopyArray` read the `dflags`
  after checking the argument.
compiler/codeGen/StgCmmPrim.hs