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 Make headers standalone. 2011-11-14 17:45:03 +00:00
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 DebugInfo: Add equality operators and default constructor to DILineInfo. 2011-09-21 01:13:16 +00:00
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 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
Attributes.h Don't use static CTORs for the Attributes constants, while still keeping the class type-safe 2012-02-08 01:11:21 +00:00
AutoUpgrade.h remove autoupgrade support for really old-style debug info intrinsics. 2011-11-27 06:18:33 +00:00
BasicBlock.h Add a constified getLandingPad() method. 2012-01-31 00:26:24 +00:00
CallGraphSCCPass.h
CallingConv.h Use X86_thiscall calling convention for Win64 as well. 2011-03-03 07:49:07 +00:00
CMakeLists.txt build/cmake: Use tblgen macro directly instead of llvm_tablegen, which just 2011-11-04 19:04:23 +00:00
Constant.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Constants.h Efficient Constant Uniquing. 2012-02-05 20:54:10 +00:00
DebugInfoProbe.h Introduce DebugInfoProbe. This is used to monitor how llvm optimizer is treating debugging information. 2011-03-10 00:21:25 +00:00
DefaultPasses.h Add a couple missing includes; found while analyzing LLVM headers. 2011-11-04 18:19:43 +00:00
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 Remove DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS, folding its 2011-08-22 09:37:03 +00:00
GlobalValue.h Re-fix the issue Bill fixed in r147899 in a slightly different way, which doesn't abuse the semantics of linker_private. We don't really want to merge any string constant with a weak_odr global. 2012-01-11 22:06:46 +00:00
GlobalVariable.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
GVMaterializer.h
InitializePasses.h ThreadSanitizer, a race detector. First LLVM commit. 2012-02-13 22:50:51 +00:00
InlineAsm.h Encode register class constreaints in inline asm instructions. 2011-10-12 23:37:29 +00:00
InstrTypes.h Add some missing anchors. 2011-12-01 08:00:17 +00:00
Instruction.def [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instruction.h Move Instruction::isSafeToSpeculativelyExecute out of VMCore and 2011-12-14 23:49:11 +00:00
Instructions.h Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase. 2012-03-13 12:37:10 +00:00
IntrinsicInst.h Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copy 2012-01-31 01:46:13 +00:00
Intrinsics.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
Intrinsics.td Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics. 2012-01-31 01:58:48 +00:00
IntrinsicsARM.td Add support for ARM ldrexd/strexd intrinsics. They both use i32 register pairs 2011-05-28 04:07:29 +00:00
IntrinsicsCellSPU.td
IntrinsicsHexagon.td Hexagon backend support 2011-12-12 21:14:40 +00:00
IntrinsicsPowerPC.td
IntrinsicsPTX.td PTX: Add intrinsics to list of built-in intrinsics, which allows them to be 2011-04-20 15:37:17 +00:00
IntrinsicsX86.td Remove GCC builtins for vpermilp* intrinsics as clang no longer needs them. Custom lower the intrinsics to the vpermilp target specific node and remove intrinsic patterns. 2012-02-08 06:36:57 +00:00
IntrinsicsXCore.td Update IntrinsicsXCore.td with the normal LLVM notice at the top of the file. 2011-10-13 21:08:11 +00:00
LinkAllPasses.h Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LinkAllVMCore.h
Linker.h Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before. 2011-10-11 00:24:54 +00:00
LLVMContext.h generalize LLVMContext::emitError to take a twine instead of a StringRef. 2012-01-03 23:47:05 +00:00
Metadata.h Add a way to replace a field inside a metadata node. This can be 2012-02-15 09:09:29 +00:00
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 Remove DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS, folding its 2011-08-22 09:37:03 +00:00
Operator.h Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00
Pass.h Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. 2012-02-15 03:21:47 +00:00
PassAnalysisSupport.h Add a couple missing includes; found while analyzing LLVM headers. 2011-11-04 18:19:43 +00:00
PassManager.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassManagers.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassRegistry.h
PassSupport.h Add Tsan annotations to the pass system. 2011-12-08 00:15:41 +00:00
SymbolTableListTraits.h
Type.h add StructType helpers too. 2012-01-26 00:06:44 +00:00
Use.h Reinstate r133513 (reverted in r133700) with an additional fix for a 2011-06-23 09:09:15 +00:00
User.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Value.h Extend the inline cost calculation to account for bonuses due to 2012-03-14 23:19:53 +00:00
ValueSymbolTable.h