llvm-6502/include/llvm
Chandler Carruth 274d377ea6 Extend the inline cost calculation to account for bonuses due to
correlated pairs of pointer arguments at the callsite. This is designed
to recognize the common C++ idiom of begin/end pointer pairs when the
end pointer is a constant offset from the begin pointer. With the
C-based idiom of a pointer and size, the inline cost saw the constant
size calculation, and this provides the same level of information for
begin/end pairs.

In order to propagate this information we have to search for candidate
operations on a pair of pointer function arguments (or derived from
them) which would be simplified if the pointers had a known constant
offset. Then the callsite analysis looks for such pointer pairs in the
argument list, and applies the appropriate bonus.

This helps LLVM detect that half of bounds-checked STL algorithms
(such as hash_combine_range, and some hybrid sort implementations)
disappear when inlined with a constant size input. However, it's not
a complete fix due the inaccuracy of our cost metric for constants in
general. I'm looking into that next.

Benchmarks showed no significant code size change, and very minor
performance changes. However, specific code such as hashing is showing
significantly cleaner inlining decisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152752 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 23:19:53 +00:00
..
ADT Fixes the MSVC build. 2012-03-14 22:36:10 +00:00
Analysis Extend the inline cost calculation to account for bonuses due to 2012-03-14 23:19:53 +00:00
Assembly
Bitcode Enable the small vector POD optimization for BitCodeAbbrevOp. 2012-03-03 15:04:13 +00:00
CodeGen misched: implemented a framework for top-down or bottom-up scheduling. 2012-03-14 04:00:41 +00:00
Config Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
DebugInfo
ExecutionEngine Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
MC Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables. 2012-03-11 01:57:56 +00:00
Object Support reading GNU symbol versions in ELFObjectFile 2012-03-09 20:59:52 +00:00
Support Fix warnings when building with VS11. 2012-03-11 01:20:23 +00:00
TableGen Add Foreach Loop 2012-02-22 16:09:41 +00:00
Target Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores 2012-03-13 20:59:56 +00:00
Transforms Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These 2012-02-25 02:56:01 +00:00
Argument.h
Attributes.h
AutoUpgrade.h
BasicBlock.h
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h
Constants.h
DebugInfoProbe.h
DefaultPasses.h
DerivedTypes.h Cache the sized-ness of struct types, once we reach the steady state of 2012-03-07 02:33:09 +00:00
Function.h [Support] Drop verbose _ATTRIBUTE from LLVM_ATTRIBUTE_{READONLY,READNONE} macro 2012-03-09 16:30:33 +00:00
GlobalAlias.h
GlobalValue.h
GlobalVariable.h
GVMaterializer.h
InitializePasses.h
InlineAsm.h
InstrTypes.h
Instruction.def
Instruction.h
Instructions.h Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase. 2012-03-13 12:37:10 +00:00
IntrinsicInst.h
Intrinsics.h
Intrinsics.td
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td
IntrinsicsPowerPC.td
IntrinsicsPTX.td
IntrinsicsX86.td
IntrinsicsXCore.td
LinkAllPasses.h
LinkAllVMCore.h
Linker.h
LLVMContext.h
Metadata.h
Module.h s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. 2012-02-16 10:28:10 +00:00
OperandTraits.h
Operator.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h
Type.h
Use.h
User.h
Value.h Extend the inline cost calculation to account for bonuses due to 2012-03-14 23:19:53 +00:00
ValueSymbolTable.h