add a memory input to all constants, needed for the optimized scheduler