[PATCH] D81449: [JumpThreading] Handle zero !prof branch_weights

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 09:17:40 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:220
+  if (!CondBr->extractProfMetadata(TrueWeight, FalseWeight) ||
+      TrueWeight + FalseWeight == 0)
     return;
----------------
Add a code comment that this is to avoid a division by zero below?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81449





More information about the llvm-commits mailing list