[LPM] Use a map from analysis ID to immutable passes in the legacy pass