Stream: git-cranelift

Topic: cranelift / Issue #767 Move the cranelift-preopt crate co...


view this post on Zulip GitHub (Feb 28 2020 at 23:26):

alexcrichton transferred Issue #767:

I think cranelift-preopt was separated from cranelift-codegen because we assume that, in general, the input IR has been generated by an optimizing compiler (namely, one that ran constant folding). This being said, in our use case, when translating wasm to clif, we're likely to introduce redundancies and constant-foldable instructions that aren't obvious to catch (because we're operating on one wasm binary opcode at a time). There was also another instance of constant-foldable operations being emitted by legalization recently.

In principle, every pass that takes IR and augments it (by adding more IR nodes) is likely to introduce redundancies / constant-foldable instructions. I'd like someone to get more data on this, but how would people feel about putting the cranelift-preopt constant folding facilities into codegen instead?


Last updated: Oct 23 2024 at 20:03 UTC