[PATCH] D154852: [FuncSpec] Add Phi nodes to the InstCostVisitor.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 08:33:04 PDT 2023


labrinea updated this revision to Diff 545175.
labrinea added a comment.

The previous revision ws sensitive to the order `getSpecializationBonus` was evaluated in the unittest.
Specifically I was under the assumption that the expression

  Specializer.getSpecializationBonus(F->getArg(0), One, Visitor) +
  Specializer.getSpecializationBonus(F->getArg(1), One, Visitor) +
  Specializer.getSpecializationBonus(F->getArg(2), One, Visitor)

would evaluate in order, but it depends on the target, so it has an effect on the resulting value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154852/new/

https://reviews.llvm.org/D154852

Files:
  llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
  llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
  llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154852.545175.patch
Type: text/x-patch
Size: 11434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230728/ae261a9d/attachment-0001.bin>


More information about the llvm-commits mailing list