[PATCH] D36115: [Loop Vectorize] Block Probability for Predicated Blocks
Hiroshi Inoue via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 08:34:17 PDT 2017
inouehrs added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:350
+ return ((BFI->getBlockFreq(HeaderBB)).getFrequency()) /
+ ((BFI->getBlockFreq(BB)).getFrequency());
+}
----------------
Don't you need to handle the case of zero frequency (e.g. if BFI is not available) to avoid divide-by-zero?
https://reviews.llvm.org/D36115
More information about the llvm-commits
mailing list