[PATCH] D54695: [PM] Port Scalarizer to the new pass manager.

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 21 10:26:32 PST 2018


bjope added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Scalar/Scalarizer.cpp:822
+  (void)Impl.visit(F);
+  return PreservedAnalyses::none();
 }
----------------
(sorry for post commit comments, but I ran into minor trouble when trying to merge this with our downstream branch)

Not sure if it matters really, but why are we saying that we preserve "none" here?
If Impl.visit returns false, it means that we didn't do any changes. And then I think it would be more appropriate to return PreservedAnalyses::all().

Isn't that what happens for the legacy version. When runOnFunction returns that nothing was modified it will implicitly also say that it preserve all analyses, even if getAnalysisUsage doesn't say so (or maybe I remember wrong about that).

So there might be a slight difference about preserved analyses here, when the pass isn't doing any rewrites at all.


Repository:
  rL LLVM

https://reviews.llvm.org/D54695





More information about the llvm-commits mailing list