[PATCH] D82632: [NFCI][SCEV] getPointerBase(): de-recursify

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 27 01:31:17 PDT 2020


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:3970
+      if (!PtrOp) // All operands were non-pointer.
+        return V;
+      V = PtrOp;
----------------
As this is a recurring pattern, I wonder if there's room for something like `llvm::get_unique(R &&Range, Getter Fn)` in STLExtras.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82632/new/

https://reviews.llvm.org/D82632





More information about the llvm-commits mailing list