distinguish lref and cref at analysis stage
remove resolver pass