mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
889ecbc0f8
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 |
||
---|---|---|
.. | ||
AsmWriter.cpp | ||
Attributes.cpp | ||
AutoUpgrade.cpp | ||
BasicBlock.cpp | ||
CMakeLists.txt | ||
ConstantFold.cpp | ||
ConstantFold.h | ||
Constants.cpp | ||
ConstantsContext.h | ||
Core.cpp | ||
DebugInfoProbe.cpp | ||
DebugLoc.cpp | ||
Dominators.cpp | ||
Function.cpp | ||
GCOV.cpp | ||
Globals.cpp | ||
GVMaterializer.cpp | ||
InlineAsm.cpp | ||
Instruction.cpp | ||
Instructions.cpp | ||
IntrinsicInst.cpp | ||
IRBuilder.cpp | ||
LeakDetector.cpp | ||
LeaksContext.h | ||
LLVMBuild.txt | ||
LLVMContext.cpp | ||
LLVMContextImpl.cpp | ||
LLVMContextImpl.h | ||
Makefile | ||
Metadata.cpp | ||
Module.cpp | ||
Pass.cpp | ||
PassManager.cpp | ||
PassRegistry.cpp | ||
PrintModulePass.cpp | ||
SymbolTableListTraitsImpl.h | ||
Type.cpp | ||
Use.cpp | ||
User.cpp | ||
Value.cpp | ||
ValueSymbolTable.cpp | ||
ValueTypes.cpp | ||
Verifier.cpp |