[all-commits] [llvm/llvm-project] 167ff5: [GlobalOpt] Do not shrink global to bool for an un...

Christudasan Devadasan via All-commits all-commits at lists.llvm.org
Thu Sep 16 20:15:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 167ff5280d7fcad731810d5d2bf10561ed2adacc
      https://github.com/llvm/llvm-project/commit/167ff5280d7fcad731810d5d2bf10561ed2adacc
  Author: Christudasan Devadasan <Christudasan.Devadasan at amd.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    A llvm/test/Transforms/GlobalOpt/shrink-global-to-bool.ll

  Log Message:
  -----------
  [GlobalOpt] Do not shrink global to bool for an unfavorable AS

Do not call `TryToShrinkGlobalToBoolean` for address spaces
that don't allow initializers. It inserts an initializer value
while shrinking to bool. Used the target hook introduced with
D109337 to skip this call for the restricted address spaces.

Reviewed By: tra

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




More information about the All-commits mailing list