1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/Transforms
Chris Lattner 00a9240c9c 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. :)

llvm-svn: 86975
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
BranchFolding Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeExtractor Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeGenPrepare Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ConstantMerge Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ConstProp Convert a few tests to FileCheck for PR5307. 2009-10-26 22:52:03 +00:00
DeadArgElim Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
DeadStoreElimination Teach DSE to eliminate useless trampolines. 2009-11-10 13:49:50 +00:00
FunctionAttrs Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
GlobalDCE Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
IPConstantProp Constant propagating byval pointer is safe if function is readonly. 2009-09-24 18:33:42 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopUnswitch Move the dominator verification code out of special code embedded within 2009-09-28 00:27:48 +00:00
LowerInvoke Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSetJmp Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSwitch Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
PruneEH Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Reassociate Convert more tests to avoid llvm-as. 2009-09-11 18:36:27 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
SSI Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
StripSymbols Update test. 2009-09-09 02:41:50 +00:00
TailCallElim Improve tail call elimination to handle the switch statement. 2009-11-07 21:10:15 +00:00
TailDup Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00