[PATCH] D104282: [FuncSpec] Use std::pow instead of operator^

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 23:22:02 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:274
+    auto LoopDepth = LI.getLoopDepth(I->getParent());
+    Cost *= std::pow((double)AvgLoopIterationCount, LoopDepth);
     return Cost;
----------------
Converting to double here is to reduce the ambitious reloading.


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

https://reviews.llvm.org/D104282



More information about the llvm-commits mailing list