[PATCH] D102257: [GlobalOpt] Remove heap SROA

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 10:42:59 PDT 2021


aeubanks added a comment.

seems fine, small nits



================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:1015-1026
-    // Must index into the array and into the struct.
-    if (isa<GetElementPtrInst>(Inst) && Inst->getNumOperands() >= 3) {
-      if (!ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Inst, GV, PHIs))
-        return false;
-      continue;
-    }
-
----------------
these could still be used to get to `OptimizeGlobalAddressOfMalloc`, why are these being deleted?

if you are deleting the Phi part, `PHIs` is no longer used


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102257



More information about the llvm-commits mailing list