Enabling Optimizations Through Demodularization