llvm-6502/include/llvm
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
..
ADT Add DenseMapInfo for signed long long. 2010-01-22 03:33:01 +00:00
Analysis Fix inline cost predictions with SCIENCE. 2010-01-26 23:21:56 +00:00
Assembly
Bitcode Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved(). 2010-01-10 07:14:18 +00:00
CodeGen now that enough stuff is constified, move function header printing 2010-01-26 23:18:44 +00:00
CompilerDriver
Config Regenerate configure. 2010-01-26 08:50:50 +00:00
ExecutionEngine
MC Eliminate SetDirective, and replace it with HasSetDirective. 2010-01-26 20:40:54 +00:00
Support change the canonical form of "cond ? -1 : 0" to be 2010-01-24 00:09:49 +00:00
System Stubs for getHostCPUFeatures API. This implements part of PR5389. 2010-01-19 21:26:05 +00:00
Target constify a method argument. 2010-01-26 23:15:09 +00:00
Transforms DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics() 2010-01-21 23:05:53 +00:00
AbstractTypeUser.h
Argument.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
Attributes.h Remove the InlineHint attribute. There are no current or planned 2010-01-15 21:36:30 +00:00
AutoUpgrade.h
BasicBlock.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
CallGraphSCCPass.h elimiante the dynamic_cast's from opt. 2010-01-22 06:03:06 +00:00
CallingConv.h
CMakeLists.txt
Constant.h
Constants.h add a layer of accessors around the Value::SubClassData member, and use 2009-12-29 02:14:09 +00:00
DerivedTypes.h
Function.h back this out for now. Growing Function is not good. 2010-01-21 20:10:22 +00:00
GlobalAlias.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
GlobalValue.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
GlobalVariable.h sink twine.h down out of Value.h. It is annoying that you need 2009-12-29 07:12:03 +00:00
InlineAsm.h
InstrTypes.h add an out-of-line virtual method to CmpInst to give it a home. 2010-01-22 06:25:37 +00:00
Instruction.def
Instruction.h Final step in the metadata API restructuring: move the 2009-12-29 09:01:33 +00:00
Instructions.h sink the Instruction::HasMetadata bit into SubclassData. 2009-12-29 02:46:09 +00:00
IntrinsicInst.h Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast). 2010-01-15 19:04:09 +00:00
Intrinsics.h
Intrinsics.td Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast). 2010-01-15 19:04:09 +00:00
IntrinsicsAlpha.td
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsPowerPC.td
IntrinsicsX86.td Revert r92939. These intrinsics get matched to LLVM instructions, 2010-01-07 21:43:58 +00:00
IntrinsicsXCore.td
LinkAllPasses.h remove the random sampling framework, which is not maintained anymore. 2010-01-02 20:07:03 +00:00
LinkAllVMCore.h fix a warning. 2010-01-16 21:55:24 +00:00
Linker.h
LLVMContext.h Final step in the metadata API restructuring: move the 2009-12-29 09:01:33 +00:00
Metadata.h Add MDNode::getIfExists(), an efficient way to determine if a value is used by metadata (since metadata does not appear in a value's use list) 2010-01-26 02:36:35 +00:00
Module.h Tweak the way appendModuleInlineAsm works, so you aren't obliged 2010-01-26 11:58:04 +00:00
ModuleProvider.h
OperandTraits.h
Operator.h
Pass.h elimiante the dynamic_cast's from opt. 2010-01-22 06:03:06 +00:00
PassAnalysisSupport.h eliminate dynamic_cast from the pass manager. 2010-01-21 02:07:07 +00:00
PassManager.h
PassManagers.h eliminate a bunch of dynamic_cast's. 2010-01-22 05:24:46 +00:00
PassSupport.h add a helper method. 2010-01-20 19:25:45 +00:00
SymbolTableListTraits.h
Type.h Add a new predicate for integer type equality tests. 2010-01-05 20:04:48 +00:00
TypeSymbolTable.h
Use.h
User.h
Value.h Change Value::getUnderlyingObject to have the MaxLookup value specified as a 2010-01-25 18:26:54 +00:00
ValueSymbolTable.h Before existing NamedMDNode entry in the symbol table, remove any existing entry with the same name. 2010-01-26 22:03:41 +00:00