[all-commits] [llvm/llvm-project] 03f1d0: [FuncSpec] Add Phi nodes to the InstCostVisitor.

Alexandros Lamprineas via All-commits all-commits at lists.llvm.org
Tue Jul 25 03:01:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03f1d09fe484f6c924434bc9c888e022b3514455
      https://github.com/llvm/llvm-project/commit/03f1d09fe484f6c924434bc9c888e022b3514455
  Author: Alexandros Lamprineas <alexandros.lamprineas at arm.com>
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
    M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
    M llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp

  Log Message:
  -----------
  [FuncSpec] Add Phi nodes to the InstCostVisitor.

This patch allows constant folding of PHIs when estimating the user
bonus. Phi nodes are a special case since some of their inputs may
remain unresolved until all the specialization arguments have been
processed by the InstCostVisitor. Therefore, we keep a list of dead
basic blocks and then lazily visit the Phi nodes once the user bonus
has been computed for all the specialization arguments.

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




More information about the All-commits mailing list