llvm-6502/lib/Transforms/Utils
Chris Lattner 6da12e6767 Implement rdar://6295824 and PR6724 with two tiny changes
that can have a big effect :).  The first is to enable the
iterative SCC passmanager juice that kicks in when the
scc passmgr detects that a function pass has devirtualized
a call.  In this case, it will rerun all the passes it 
manages on the SCC, up to the iteration count limit (4). This
is useful because a function pass may devirualize a call, and
we want the inliner to inline it, or pruneeh to infer stuff
about it, etc.

The second patch is to add *all* call sites to the 
DevirtualizedCalls list the inliner uses.  This list is
about to get renamed, but the jist of this is that the 
inliner now reconsiders *all* inlined call sites as candidates
for further inlining.  The intuition is this that in cases 
like this:

f() { g(1); }     g(int x) { h(x); }

We analyze this bottom up, and may decide that it isn't 
profitable to inline H into G.  Next step, we decide that it is
profitable to inline G into F, and do so, which means that F 
now calls H.  Even though the call from G -> H may not have been
profitable to inline, the call from F -> H may be (in this case
because a constant allows folding etc).

In my spot checks, this doesn't have a big impact on code.  For
example, the LLC output for 252.eon grew from 0.02% (from
317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612
to 1520964 bytes).  252.eon never iterated in the SCC Passmgr,
176.gcc iterated at most 1 time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-01 01:15:56 +00:00
..
AddrModeMatcher.cpp Revert 101465, it broke internal OpenGL testing. 2010-04-16 23:37:20 +00:00
BasicBlockUtils.cpp Code clean up. 2010-04-05 21:16:25 +00:00
BasicInliner.cpp refactor the interface to InlineFunction so that most of the in/out 2010-04-22 23:07:58 +00:00
BreakCriticalEdges.cpp rename pred_const_iterator to const_pred_iterator for consistency's sake 2010-03-25 23:25:28 +00:00
BuildLibCalls.cpp Revert 101465, it broke internal OpenGL testing. 2010-04-16 23:37:20 +00:00
CloneFunction.cpp There is no need to install ValueMapper.h header. 2010-04-20 22:18:31 +00:00
CloneLoop.cpp Use do+while instead of while for loops which obviously have a 2010-01-05 16:27:25 +00:00
CloneModule.cpp There is no need to install ValueMapper.h header. 2010-04-20 22:18:31 +00:00
CMakeLists.txt Update CMake build. 2010-03-05 22:34:16 +00:00
CodeExtractor.cpp rename llvm::llvm_report_error -> llvm::report_fatal_error 2010-04-07 22:58:41 +00:00
DemoteRegToStack.cpp Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst. 2009-07-15 23:53:25 +00:00
InlineFunction.cpp Implement rdar://6295824 and PR6724 with two tiny changes 2010-05-01 01:15:56 +00:00
InstructionNamer.cpp Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. 2010-01-05 13:12:22 +00:00
LCSSA.cpp Add a DominatorTree argument to isLCSSA so that it doesn't have to 2010-03-10 19:38:49 +00:00
Local.cpp There are two ways of checking for a given type, for example isa<PointerType>(T) 2010-02-16 11:11:14 +00:00
LoopSimplify.cpp Skip debug info intrinsics. 2010-03-15 21:25:29 +00:00
LoopUnroll.cpp Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap. 2010-04-20 22:24:18 +00:00
LowerInvoke.cpp Fix a problem that lower invoke has with allocas (PR6694), and 2010-04-26 23:49:32 +00:00
LowerSwitch.cpp Change errs() to dbgs(). 2010-01-05 01:26:45 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
Mem2Reg.cpp Pull LLVMContext out of PromoteMemToReg. 2009-11-23 03:50:44 +00:00
PromoteMemoryToRegister.cpp rename use_const_iterator to const_use_iterator for consistency's sake 2010-03-25 23:06:16 +00:00
SimplifyCFG.cpp Fix a grammaro. 2010-03-30 20:04:57 +00:00
SSAUpdater.cpp Fix a performance problem with the new SSAUpdater. This showed up in the 2010-04-21 18:39:03 +00:00
SSI.cpp Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. 2010-01-05 13:12:22 +00:00
UnifyFunctionExitNodes.cpp Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. 2010-01-05 13:12:22 +00:00
ValueMapper.cpp Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap. 2010-04-20 22:24:18 +00:00
ValueMapper.h Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap. 2010-04-20 22:24:18 +00:00