llvm-6502/test/Transforms/Inline
Chris Lattner dbab4dc942 implement a nice little efficiency hack in the inliner. Since we're now
running IPSCCP early, and we run functionattrs interlaced with the inliner,
we often (particularly for small or noop functions) completely propagate
all of the information about a call to its call site in IPSSCP (making a call
dead) and functionattrs is smart enough to realize that the function is
readonly (because it is interlaced with inliner).

To improve compile time and make the inliner threshold more accurate, realize
that we don't have to inline dead readonly function calls.  Instead, just 
delete the call.  This happens all the time for C++ codes, here are some
counters from opt/llvm-ld counting the number of times calls were deleted vs
inlined on various apps:

Tramp3d opt:
  5033 inline                - Number of call sites deleted, not inlined
 24596 inline                - Number of functions inlined
llvm-ld:
  667 inline           - Number of functions deleted because all callers found
  699 inline           - Number of functions inlined

483.xalancbmk opt:
  8096 inline                - Number of call sites deleted, not inlined
 62528 inline                - Number of functions inlined
llvm-ld:
   217 inline           - Number of allocas merged together
  2158 inline           - Number of functions inlined

471.omnetpp:
  331 inline                - Number of call sites deleted, not inlined
 8981 inline                - Number of functions inlined
llvm-ld:
  171 inline           - Number of functions deleted because all callers found
  629 inline           - Number of functions inlined


Deleting a call is much faster than inlining it, and is insensitive to the
size of the callee. :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 07:56:08 +00:00
..
2003-09-14-InlineValue.ll
2003-09-22-PHINodeInlineFail.ll
2003-09-22-PHINodesInExceptionDest.ll
2003-09-22-PHINodesInNormalInvokeDest.ll
2003-10-13-AllocaDominanceProblem.ll
2003-10-26-InlineInvokeExceptionDestPhi.ll
2004-04-15-InlineDeletesCall.ll
2004-04-20-InlineLinkOnce.ll
2004-10-17-InlineFunctionWithoutReturn.ll
2006-01-14-CallGraphUpdate.ll
2006-07-12-InlinePruneCGUpdate.ll
2006-11-09-InlineCGUpdate-2.ll
2006-11-09-InlineCGUpdate.ll
2007-04-15-InlineEH.ll
2007-06-06-NoInline.ll
2007-06-25-WeakInline.ll
2007-12-19-InlineNoUnwind.ll
2008-03-04-StructRet.ll
2008-03-07-Inline-2.ll
2008-03-07-Inline.ll
2008-09-02-AlwaysInline.ll
2008-09-02-NoInline.ll
2008-10-30-AlwaysInline.ll
2008-11-04-AlwaysInline.ll
2009-01-08-NoInlineDynamicAlloca.ll
2009-01-12-RecursiveInline.ll
2009-01-13-RecursiveInlineCrash.ll
2009-05-07-CallUsingSelfCrash.ll
alloca_test.ll
alloca-in-scc.ll
always_inline_dyn_alloca.ll
array_merge.ll
basictest.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
byval2.ll
byval.ll
callgraph-update.ll Make these tests more interesting by using 2009-10-24 23:23:04 +00:00
casts.ll
cfg_preserve_test.ll
crash.ll Simplify some code (first hunk) and fix PR5208 (second hunk) by 2009-10-17 05:39:39 +00:00
delete-call.ll implement a nice little efficiency hack in the inliner. Since we're now 2009-11-12 07:56:08 +00:00
dg.exp
dynamic_alloca_test.ll
externally_available.ll
indirect_resolve.ll
inline_cleanup.ll
inline_constprop.ll
inline_dce.ll
inline_prune.ll
inline-invoke-tail.ll
inline-tail.ll
invoke_test-1.ll
invoke_test-2.ll
invoke_test-3.ll
nested-inline.ll
PR4909.ll