try to use alloc_(2|3)w in codegen as this can improve perf in allocation heavy scenario