[all-commits] [llvm/llvm-project] de24d0: [FuncSpec] Fix inconsistent treatment of global va...

Momchil Velikov via All-commits all-commits at lists.llvm.org
Fri May 5 01:56:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de24d084597a819992bc2e769b88597c9e28b47c
      https://github.com/llvm/llvm-project/commit/de24d084597a819992bc2e769b88597c9e28b47c
  Author: Momchil Velikov <momchil.velikov at arm.com>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
    M llvm/test/Transforms/FunctionSpecialization/compiler-crash-promote-alloca.ll
    A llvm/test/Transforms/FunctionSpecialization/global-var-constants.ll

  Log Message:
  -----------
  [FuncSpec] Fix inconsistent treatment of global variables

There are a few inaccuracies with how FuncSpec handles global
variables.

When specialisation on non-const global variables is disabled (the
default) the pass could nevertheless perform some specializations,
e.g. on a constant GEP expression, or on a SSA variable, for which the
Solver has determined it has the value of a global variable.

When specialisation on non-const global variables is enabled, the pass
would skip non-scalars, e.g. a global array, but this should be
completely inconsequential, a pointer is a pointer.

Reviewed By: SjoerdMeijer

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

Change-Id: Ic73051b2f8602587306760bf2ec552e5860f8d39




More information about the All-commits mailing list