Increase the import-threshold for crtical functions.
authorDehao Chen <dehao@google.com>
Fri, 7 Jul 2017 21:01:00 +0000 (21:01 +0000)
committerDehao Chen <dehao@google.com>
Fri, 7 Jul 2017 21:01:00 +0000 (21:01 +0000)
commit64c46574b0adc5aece427650a0b950a3eb3e166e
tree203a5d389f9112aa7bed901b4f67b505d9a94b30
parent4a7e66a84686f07b525adc90b97ea6f24ae86e00
Increase the import-threshold for crtical functions.

Summary: For interative sample-pgo, if a hot call site is inlined in the profiling binary, we should inline it in before profile annotation in the backend. Before that, the compile phase first collects all GUIDs that needs to be imported and creates virtual "hot" call edge in the summary. However, "hot" is not good enough to guarantee the callsites get inlined. This patch introduces "critical" call edge, and assign much higher importing threshold for those edges.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, mehdi_amini, llvm-commits, eraman

Differential Revision: https://reviews.llvm.org/D35096

llvm-svn: 307439
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll