[PATCH] D142705: [GVN] Support address translation through select instructions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 12:17:46 PST 2023


nikic added inline comments.


================
Comment at: llvm/include/llvm/Analysis/PHITransAddr.h:45
+private:
+  std::variant<Value *, SelectAddrs> Addr;
+};
----------------
Unless std::variant is smarter than I think, you probably want to use a pair of Values instead, and determine the variant based on whether the second is nullptr. Otherwise you'll store a redundant type tag.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142705



More information about the llvm-commits mailing list