Make non-streaming LLVM and C backends streaming
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Thu, 22 Aug 2019 09:09:24 +0000 (12:09 +0300)
committerÖmer Sinan Ağacan <omeragacan@gmail.com>
Fri, 23 Aug 2019 09:04:15 +0000 (12:04 +0300)
commita8300520a714fa5e46e342e10175d237d89221c5
tree90823e8854bebb6288a94e36613f8c022336a367
parentc3e26ab3bd450a2ad17cc80b41dda084558039a2
Make non-streaming LLVM and C backends streaming

This adds a Stream.consume function, uses it in LLVM and C code
generators, and removes the use of Stream.collect function which was
used to collect streaming Cmm generation results into a list.

LLVM and C backends now properly use streamed Cmm generation, instead of
collecting Cmm groups into a list before generating LLVM/C code.
compiler/cmm/PprC.hs
compiler/llvmGen/LlvmCodeGen.hs
compiler/main/CodeOutput.hs
compiler/utils/Stream.hs