Simple (slow!) instruction synthesis + pass support

I think the interesting part of this patch is the getValue() function in the Pass
``LHSCost`` seems to be not used in this block.