porting mem2reg to new CFG framework