[PATCH] D31085: [InlineCost] Increase the cost of Switch
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 15:13:17 PDT 2017
chandlerc added a comment.
In https://reviews.llvm.org/D31085#715294, @junbuml wrote:
> Chandler, do you agree with the heuristic Hans suggested above? Even though it do not cover switches that are lowered with a mix of jump table/bit test/BTree, I think this is reasonable compromise between accuracy and cost of the hook.
Yes, I like this model.
================
Comment at: lib/CodeGen/SelectionDAG/SwitchCaseCluster.cpp:68-69
+/// are lowered with a mix of jump table / bit test / BTree. This function was
+/// mainly intended to be used when estimating the cost of switch in inline cost
+/// heuristic.
+unsigned
----------------
inlining and loop unrolling. it's a generic cost model.
https://reviews.llvm.org/D31085
More information about the llvm-commits
mailing list