[HotColdSplit] Reflect full cost of parameters in split penalty
authorAditya Kumar <1894981+hiraditya@users.noreply.github.com>
Fri, 18 Dec 2020 16:57:38 +0000 (08:57 -0800)
committerAditya Kumar <1894981+hiraditya@users.noreply.github.com>
Sat, 19 Dec 2020 01:06:17 +0000 (17:06 -0800)
commit1ab4db0f847fa1ddd394dbf54a5051b626eab160
treebd27a8c0fe9b5391ca18f762f3066dbd88d42bcd
parent2fced5a07b45ef527ac00a13e63bfca61e407ee3
[HotColdSplit] Reflect full cost of parameters in split penalty

Make the penalty for splitting a region more accurately reflect the cost
of materializing all of the inputs/outputs to/from the region.

This almost entirely eliminates code growth within functions which
undergo splitting in key internal frameworks, and reduces the size of
those frameworks between 2.6% to 3%.

rdar://49167240

Patch by: Vedant Kumar(@vsk)
Reviewers: hiraditya,rjf,t.p.northover
Reviewed By: hiraditya,rjf

Differential Revision: https://reviews.llvm.org/D59715
llvm/lib/Transforms/IPO/HotColdSplitting.cpp
llvm/test/Transforms/CodeExtractor/extract-assume.ll
llvm/test/Transforms/HotColdSplit/apply-penalty-for-inputs.ll
llvm/test/Transforms/HotColdSplit/apply-penalty-for-outputs.ll
llvm/test/Transforms/HotColdSplit/apply-successor-penalty.ll
llvm/test/Transforms/HotColdSplit/assumption-cache-invalidation.ll