mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Revert r98089, it was breaking a clang test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -383,39 +383,3 @@ float InlineCostAnalyzer::getInlineFudgeFactor(CallSite CS) {
|
||||
Factor += 1.5f;
|
||||
return Factor;
|
||||
}
|
||||
|
||||
/// growCachedCostInfo - update the cached cost info for Caller after Callee has
|
||||
/// been inlined.
|
||||
void
|
||||
InlineCostAnalyzer::growCachedCostInfo(Function* Caller, Function* Callee) {
|
||||
FunctionInfo &CallerFI = CachedFunctionInfo[Caller];
|
||||
|
||||
// For small functions we prefer to recalculate the cost for better accuracy.
|
||||
if (!CallerFI.Metrics.NumBlocks || CallerFI.Metrics.NumInsts < 100) {
|
||||
resetCachedCostInfo(Caller);
|
||||
return;
|
||||
}
|
||||
|
||||
// For large functions, we can save a lot of computation time by skipping
|
||||
// recalculations.
|
||||
if (CallerFI.Metrics.NumCalls > 0)
|
||||
--CallerFI.Metrics.NumCalls;
|
||||
|
||||
if (Callee) {
|
||||
FunctionInfo &CalleeFI = CachedFunctionInfo[Callee];
|
||||
if (!CalleeFI.Metrics.NumBlocks) {
|
||||
resetCachedCostInfo(Caller);
|
||||
return;
|
||||
}
|
||||
CallerFI.Metrics.NeverInline |= CalleeFI.Metrics.NeverInline;
|
||||
CallerFI.Metrics.usesDynamicAlloca |= CalleeFI.Metrics.usesDynamicAlloca;
|
||||
|
||||
CallerFI.Metrics.NumInsts += CalleeFI.Metrics.NumInsts;
|
||||
CallerFI.Metrics.NumBlocks += CalleeFI.Metrics.NumBlocks;
|
||||
CallerFI.Metrics.NumCalls += CalleeFI.Metrics.NumCalls;
|
||||
CallerFI.Metrics.NumVectorInsts += CalleeFI.Metrics.NumVectorInsts;
|
||||
CallerFI.Metrics.NumRets += CalleeFI.Metrics.NumRets;
|
||||
}
|
||||
// We are not updating the argumentweights. We have already determined that
|
||||
// Caller is a fairly large function, so we accept the loss of precision.
|
||||
}
|
||||
|
Reference in New Issue
Block a user