[all-commits] [llvm/llvm-project] bbc629: [CallPrinter] Fix maxFreq = 0 case

Kirill Bobyrev via All-commits all-commits at lists.llvm.org
Wed Jun 17 01:44:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bbc629ebd6429d43cfd72d9a0e2b5ca8a4083b54
      https://github.com/llvm/llvm-project/commit/bbc629ebd6429d43cfd72d9a0e2b5ca8a4083b54
  Author: Kirill Bobyrev <kbobyrev at google.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M llvm/lib/Analysis/HeatUtils.cpp

  Log Message:
  -----------
  [CallPrinter] Fix maxFreq = 0 case

llvm::getHeatColor becomes a problem when maxFreq = 0 -> freq = 0 =>
log2(double(freq)) / log2(maxFreq) -> log2(0.) / log2(0.) which
results in illegal instruction on some architectures.

Problematic revision: https://reviews.llvm.org/D77172




More information about the All-commits mailing list