[PATCH] D88363: [CodeGen] Improve likelihood attribute branch weights
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 05:25:48 PDT 2020
aaron.ballman added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1622
EmitBranchOnBoolExpr(CondOp->getCond(), LHSBlock, RHSBlock,
- getProfileCount(CondOp), Weights);
+ getProfileCount(CondOp), Stmt::LH_None);
----------------
Why `LH_None` in this case? (Also, given that it's the default value, should you skip passing this at all? Or should the parameter not have a default value, perhaps?)
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1678-1679
// Create branch weights based on the number of times we get here and the
// number of times the condition should be true.
+ llvm::MDNode *Weights = nullptr;
----------------
This comment is now a bit stale.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88363/new/
https://reviews.llvm.org/D88363
More information about the cfe-commits
mailing list