[PATCH] D106589: [GlobalOpt] support ConstantExpr use of global address for OptimizeGlobalAddressOfMalloc

Shimin Cui via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 13:14:42 PDT 2021


scui created this revision.
scui added reviewers: efriedma, vsk, fhahn, etiotto, Whitney.
Herald added subscribers: ormris, hiraditya.
scui requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I'm working on extending the OptimizeGlobalAddressOfMalloc to handle some more general cases.  This is to add support of the ConstantExpr use of the global variables. The function allUsesOfLoadedValueWillTrapIfNull is now iterative with the added CE use of GV. Also, the recursive function valueIsOnlyUsedLocallyOrStoredToOneGlobal is changed to iterative using a worklist with the GEP case added.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106589

Files:
  llvm/lib/Transforms/IPO/GlobalOpt.cpp
  llvm/lib/Transforms/Utils/GlobalStatus.cpp
  llvm/test/Transforms/GlobalOpt/new-promote-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106589.360947.patch
Type: text/x-patch
Size: 7902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210722/ec43b60b/attachment.bin>


More information about the llvm-commits mailing list