Unofficial Hacker News companion — get notified on comment replies, and more.

So, I rewrote my game in C3 (opens external site)

159 points by lerno 5 days ago | www.madrigalgames.com | 46 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (3)

  1. what patterns do you mean? I know people don't really like phi nodes, and managing locals, so they spill everything to memory by default, which is kinda bad.
    Replies (2)
    1. That's not really that much of a problem. Try loading and storing large structures instead of using llvm.memcpy. That's quite a bit worse I believe.
    2. We never fully understood what exactly triggered it, and it's been a while, but I believe it was due to too many local %foo variables. Each compiled line would generate a bunch of temporary variables that were only required within that line. That appeared to put some pressure on some pass. We then began re-using variables over lines, which did not fix the root issue, but brought compile times into acceptable ranges.