1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/VMCore
Chandler Carruth 889ecbc0f8 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.

llvm-svn: 152752
2012-03-14 23:19:53 +00:00
..
AsmWriter.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00
Attributes.cpp Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
AutoUpgrade.cpp Add auto upgrade support for x86 pcmpgt/pcmpeq intrinics removed in r149367. 2012-02-03 06:10:55 +00:00
BasicBlock.cpp Add a constified getLandingPad() method. 2012-01-31 00:26:24 +00:00
CMakeLists.txt build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
ConstantFold.cpp Remove some dead code and tidy things up now that vectors use ConstantDataVector 2012-02-06 21:56:39 +00:00
ConstantFold.h
Constants.cpp Reserve space in these vectors to prevent having to grow the array too 2012-02-07 01:27:51 +00:00
ConstantsContext.h Switch this code to use hash_combine_range rather than incremental calls 2012-03-07 03:22:32 +00:00
Core.cpp Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
DebugInfoProbe.cpp
DebugLoc.cpp Spacing. 2011-10-11 22:58:58 +00:00
Dominators.cpp Change the implementation of dominates(inst, inst) to one based on what the 2012-02-26 02:19:19 +00:00
Function.cpp Emit the "is an intrinsic overloaded" table as a bitfield. 2012-03-01 02:16:57 +00:00
GCOV.cpp Remove extra semi-colons. 2012-02-22 17:25:00 +00:00
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instructions.cpp Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
IntrinsicInst.cpp
IRBuilder.cpp reapply the patches reverted in r149470 that reenable ConstantDataArray, 2012-02-05 02:29:43 +00:00
LeakDetector.cpp
LeaksContext.h
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
LLVMContext.cpp generalize LLVMContext::emitError to take a twine instead of a StringRef. 2012-01-03 23:47:05 +00:00
LLVMContextImpl.cpp Efficient Constant Uniquing. 2012-02-05 20:54:10 +00:00
LLVMContextImpl.h Replace the hashing functions on APInt and APFloat with overloads of the 2012-03-04 12:02:57 +00:00
Makefile Build system infrastructure for multiple tblgens. 2011-10-06 01:51:51 +00:00
Metadata.cpp Add a way to replace a field inside a metadata node. This can be 2012-02-15 09:09:29 +00:00
Module.cpp s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. 2012-02-16 10:28:10 +00:00
Pass.cpp Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. 2012-02-15 03:21:47 +00:00
PassManager.cpp Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
PassRegistry.cpp Cosmetic changes, as per Nick's review. 2011-09-29 16:46:47 +00:00
PrintModulePass.cpp
SymbolTableListTraitsImpl.h
Type.cpp Cache the sized-ness of struct types, once we reach the steady state of 2012-03-07 02:33:09 +00:00
Use.cpp
User.cpp Add some missing anchors. 2011-12-01 08:00:17 +00:00
Value.cpp Extend the inline cost calculation to account for bonuses due to 2012-03-14 23:19:53 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Verifier.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00