[PATCH] D109337: [GlobalOpt][FIX] Do not embed initializers into AS!=0 globals

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 08:06:07 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:109
+  bool canHaveNonUndefGlobalInitializerInAddressSpace(unsigned AS) const {
+    return AS == 0;
+  };
----------------
arsenm wrote:
> I'm not sure this should be so strict by default. At the minimum it should probably allow the datalayout's default global address space
I have no strong feelings either way. This seems more cautious and maybe we want targets to overwrite it explicitly? That said, feel free to patch it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109337



More information about the llvm-commits mailing list