[all-commits] [llvm/llvm-project] 0fd03f: [FuncSpec] Return changed if function is changed b...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Fri Aug 6 02:01:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fd03feb4ba5d86835ac386eebe16cbc3cfb36ec
      https://github.com/llvm/llvm-project/commit/0fd03feb4ba5d86835ac386eebe16cbc3cfb36ec
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
    A llvm/test/Transforms/FunctionSpecialization/function-specialization-constant-expression.ll

  Log Message:
  -----------
  [FuncSpec] Return changed if function is changed by tryToReplaceWithConstant

The may get changed before specialization by RunSCCPSolver. In other
words, the pass may change the function without specialization happens.
Add test and comment to reveal this.
And it may return No Changed if the function get changed by
RunSCCPSolver before the specialization. It looks like a potential bug.

Test Plan: check-all

Reviewed By: https://reviews.llvm.org/D107622

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




More information about the All-commits mailing list