[PD] DSP loop detection and abstractions/subpatches