[PATCH] D31924: SROA: Allow eliminating addrspacecasted allocas
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 12:30:30 PDT 2017
efriedma added inline comments.
================
Comment at: docs/LangRef.rst:8460
+same memory location. The pointer conversion cannot be an arbitrarily
+complex value modification. For a defined result, the inverse cast to
+the original address space should yield the original pointer value.
----------------
"The pointer conversion cannot be an arbitrarily complex value modification." is a bit vague... it'd be better if we could specifically say what transforms are allowed.
================
Comment at: lib/Transforms/Scalar/SROA.cpp:1588
+ Ptr = IRB.CreatePointerBitCastOrAddrSpaceCast(Ptr, PointerTy,
+ NamePrefix + "sroa_cast");
+ }
----------------
Why do we want to generate an address-space cast here, as opposed to performing the memory operation using the alloca's natural address-space?
https://reviews.llvm.org/D31924
More information about the llvm-commits
mailing list