llvm-6502/include/llvm/Analysis
Jakob Stoklund Olesen 43cda021d9 Fix inline cost predictions with SCIENCE.
After running a batch of measurements, it is clear that the inliner metrics
need some adjustments:

Own argument bonus:       20 -> 5
Outgoing argument penalty: 0 -> 5
Alloca bonus:             10 -> 5
Constant instr bonus:      7 -> 5
Dead successor bonus:     40 -> 5*(avg instrs/block)

The new cost metrics are generaly 25 points higher than before, so we may need
to move thresholds.

With this change, InlineConstants::CallPenalty becomes a political correction:

if (!isa<IntrinsicInst>(II) && !callIsSmall(CS.getCalledFunction()))
  NumInsts += InlineConstants::CallPenalty + CS.arg_size();

The code size is accurately modelled by CS.arg_size(). CallPenalty is added
because calls tend to take a long time, so it may not be worth it to inline a
function with lots of calls.

All of the political corrections are in the InlineConstants namespace:
IndirectCallBonus, CallPenalty, LastCallToStaticBonus, ColdccPenalty,
NoreturnPenalty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:21:56 +00:00
..
AliasAnalysis.h
AliasSetTracker.h
CallGraph.h
CaptureTracking.h
CFGPrinter.h
ConstantFolding.h
ConstantsScanner.h
DebugInfo.h Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable. 2010-01-26 21:14:59 +00:00
DominatorInternals.h Fix PR6047 2010-01-16 13:38:07 +00:00
Dominators.h
DomPrinter.h
DOTGraphTraitsPass.h Create Generic DOTGraphTraits Printer/Viewer 2010-01-16 10:56:41 +00:00
FindUsedTypes.h
InlineCost.h Fix inline cost predictions with SCIENCE. 2010-01-26 23:21:56 +00:00
InstructionSimplify.h
Interval.h
IntervalIterator.h
IntervalPartition.h
IVUsers.h Add a new helper function to IVUsers for returning the "canonical" 2010-01-19 21:55:32 +00:00
LazyValueInfo.h
LibCallAliasAnalysis.h
LibCallSemantics.h
LiveValues.h
LoopDependenceAnalysis.h
LoopInfo.h
LoopPass.h elimiante the dynamic_cast's from opt. 2010-01-22 06:03:06 +00:00
MemoryBuiltins.h
MemoryDependenceAnalysis.h
Passes.h
PHITransAddr.h
PointerTracking.h
PostDominators.h Remove trailing white spaces in post dominators header file 2010-01-11 22:22:46 +00:00
ProfileInfo.h
ProfileInfoLoader.h
ProfileInfoTypes.h
ScalarEvolution.h struct/class mismatch. 2010-01-21 15:40:14 +00:00
ScalarEvolutionExpander.h Revert LoopStrengthReduce.cpp to pre-r94061 for now. 2010-01-22 00:46:49 +00:00
ScalarEvolutionExpressions.h Make SCEVAddRecExpr's getType return a pointer type when the add 2010-01-19 22:53:50 +00:00
SparsePropagation.h
Trace.h
ValueTracking.h
Verifier.h