Fix Polly failures. Reviewed By: mehdi_amini, Meinersbur Differential Revision: https://reviews.llvm.org/D121566
This required support for the canonicalization passes, inlcuding porting RewriteByReferenceParams to the NPM. For some reason, the legacy pass pipeline with -polly-position=early did not run the CodePreparation pass. This was fixed as well.