
18 Feb
2011
18 Feb
'11
8:10 a.m.
On 18 February 2011 01:18, Johan Tibell
C compilers, like gcc, go to great lengths making memcpy fast and I was thinking that we might be able to steal a trick or two from them. I'd like some feedback on these ideas:
It seems like a sufficient solution for your needs would be for us to use the LTO support in LLVM to inline across module boundaries - in particular to inline primop implementations into their call sites. LLVM would then probably deal with unrolling small loops with statically known bounds. I don't think this would require a major change to GHC, though LTO would only work with the Gold linker (which only supports ELF) at the moment :-( Cheers, Max