[all-commits] [llvm/llvm-project] 732b05: [GlobalOpt] support ConstantExpr use of global add...

Shimin Cui via All-commits all-commits at lists.llvm.org
Sat Jul 31 15:42:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 732b05555c71cfdbf135a100a06472c5efc4eefb
      https://github.com/llvm/llvm-project/commit/732b05555c71cfdbf135a100a06472c5efc4eefb
  Author: Shimin Cui <scui at ca.ibm.com>
  Date:   2021-07-31 (Sat, 31 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    M llvm/lib/Transforms/Utils/GlobalStatus.cpp
    A llvm/test/Transforms/GlobalOpt/new-promote.ll

  Log Message:
  -----------
  [GlobalOpt] support ConstantExpr use of global address for OptimizeGlobalAddressOfMalloc

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.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D106589




More information about the All-commits mailing list