Nah, just use assembly. Better yet, create a function in assembly and call it from C with a function prototype.. i can show you how if you need
The reason is that some instructions like REPEAT and DO are not used by the compiler (exception: REPEAT is ALWAYS used along with the divide instruction as it's a requirement)
Also, you can't use some specialized functions like the modulo address generator
Also, the usage of the builtins that have to deal with the accumulators is clunky at best.
Also, the compiler may not be as smart in register usage with dsp instructions
Also, depending on the dsPIC in question you may want to do the thing in its own ISR using its own register set like for mantaining pointers and intermediate results. Better handle that in assembly
At first for DSP and lower level stuff like table load and store in flash i used inline assembly, then i converted everything to C because it's better that the compiler don't see inline assembly (it breaks its operations, also easier to mantain), then i created assembly files called with C function prototypes, the best approach