[PATCH] D52904: [hot-cold-split] fix static analysis of cold regions
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 15 11:36:08 PDT 2018
tejohnson added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:105
+// Same as blockEndsInUnreachable in CodeGen/BranchFolding.cpp. Do not modify
+// this function unless you modify the MBB version as well.
bool blockEndsInUnreachable(const BasicBlock &BB) {
----------------
Suggest copying in the explanatory header comments from there.
================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:385
+ // otherwise all the function gets outlined.
+ if (BB == Begin)
+ return nullptr;
----------------
Suggest moving this check outside this loop. I.e. just check if Begin is cold and return early if so.
https://reviews.llvm.org/D52904
More information about the llvm-commits
mailing list