Here is the optimization pass I\'ve written. It replaces any multiplication which has zero as one of its operands to simply zero.
struct FoldConstant : public