llvm-6502/test/Transforms
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
..
ABCD Revert my previous patch to ABCD and fix things the right way. There are two problems addressed 2009-11-09 00:44:44 +00:00
ADCE
ArgumentPromotion 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
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp Convert a few tests to FileCheck for PR5307. 2009-10-26 22:52:03 +00:00
DeadArgElim
DeadStoreElimination Teach DSE to eliminate useless trampolines. 2009-11-10 13:49:50 +00:00
FunctionAttrs
GlobalDCE
GlobalOpt Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions. 2009-11-07 00:16:28 +00:00
GVN Default-addressspace null pointers don't alias anything. This allows 2009-11-09 19:29:11 +00:00
IndVarSimplify 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
Inline implement a nice little efficiency hack in the inliner. Since we're now 2009-11-12 07:56:08 +00:00
InstCombine Don't trivially delete unused calls to llvm.invariant.start. This allows 2009-11-11 15:34:13 +00:00
Internalize
IPConstantProp
JumpThreading use getPredicateOnEdge to fold comparisons through PHI nodes, 2009-11-12 05:24:05 +00:00
LCSSA Trim a bunch of unneeded code from this testcase. 2009-11-10 01:33:08 +00:00
LICM Convert a few tests to FileCheck for PR5307. 2009-10-26 22:52:03 +00:00
LoopDeletion Make LoopDeletion check the maximum backedge taken count, rather than the 2009-10-23 17:10:01 +00:00
LoopIndexSplit
LoopRotate Make these tests more interesting by using 2009-10-24 23:23:04 +00:00
LoopSimplify The introduction of indirectbr meant the introduction of 2009-11-05 21:14:46 +00:00
LoopStrengthReduce Block terminator may be a switch. 2009-11-11 00:00:21 +00:00
LoopUnroll
LoopUnswitch
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg fix a bug exposed by moving SRoA earlier which caused a crash building kc++ 2009-11-02 04:37:17 +00:00
MemCpyOpt 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
MergeFunc
PruneEH
Reassociate
ScalarRepl 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
SCCP fix a crash in SCCP handling extractvalue of an array, pointed out and 2009-11-10 22:02:09 +00:00
SimplifyCFG Optimize test more. 2009-11-10 21:02:18 +00:00
SimplifyLibCalls Teach SimplifyLibCalls to fold memcmp calls with constant arguments. 2009-11-05 17:44:22 +00:00
SRETPromotion
SSI
StripSymbols
TailCallElim Improve tail call elimination to handle the switch statement. 2009-11-07 21:10:15 +00:00
TailDup