llvm-6502/lib/Analysis
Chris Lattner 5095e3d1d1 Fix some nasty callgraph dangling pointer problems in
argpromotion and structretpromote.  Basically, when replacing
a function, they used the 'changeFunction' api which changes
the entry in the function map (and steals/reuses the callgraph
node).

This has some interesting effects: first, the problem is that it doesn't
update the "callee" edges in any callees of the function in the call graph.
Second, this covers for a major problem in all the CGSCC pass stuff, which 
is that it is completely broken when functions are deleted if they *don't*
reuse a CGN.  (there is a cute little fixme about this though :).

This patch changes the protocol that CGSCC passes must obey: now the CGSCC 
pass manager copies the SCC and preincrements its iterator to avoid passes
invalidating it.  This allows CGSCC passes to mutate the current SCC.  However
multiple passes may be run on that SCC, so if passes do this, they are now
required to *update* the SCC to be current when they return.

Other less interesting parts of this patch are that it makes passes update
the CG more directly, eliminates changeFunction, and requires clients of
replaceCallSite to specify the new callee CGN if they are changing it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 00:19:58 +00:00
..
IPA Fix some nasty callgraph dangling pointer problems in 2009-08-31 00:19:58 +00:00
AliasAnalysis.cpp Global Aliases are not identifiable objects. 2009-08-27 17:52:56 +00:00
AliasAnalysisCounter.cpp default count-aa to -print-all. The whole reason to use count-aa is 2009-08-30 04:25:40 +00:00
AliasAnalysisEvaluator.cpp Fix a missing newline, now that Value's operator<< doesn't add one of its own. 2009-08-26 14:34:12 +00:00
AliasDebugger.cpp
AliasSetTracker.cpp eliminate the std::ostream form of WriteAsOperand and update clients. 2009-08-23 05:17:37 +00:00
Analysis.cpp Tidy #includes. 2009-08-11 16:02:12 +00:00
BasicAliasAnalysis.cpp Use stripPointerCasts instead of doing the same manually. 2009-08-27 18:02:03 +00:00
CaptureTracking.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
CFGPrinter.cpp Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
CMakeLists.txt Unbreak CMake build 2009-08-26 16:33:57 +00:00
ConstantFolding.cpp Don't assume that the operand of an inttoptr is an pointer-sized integer. 2009-08-21 18:27:26 +00:00
DbgInfoPrinter.cpp Reapply 79977. 2009-08-28 23:24:31 +00:00
DebugInfo.cpp Reapply 79977. 2009-08-28 23:24:31 +00:00
InstCount.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
Interval.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
IntervalPartition.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
IVUsers.cpp remove a few dead insertion methods. 2009-08-24 02:39:26 +00:00
LibCallAliasAnalysis.cpp LibCallAliasAnalysis doesn't use TargetData. 2009-07-31 20:56:29 +00:00
LibCallSemantics.cpp Remove Value::getNameLen 2009-07-26 08:34:35 +00:00
LiveValues.cpp
LoopDependenceAnalysis.cpp remove a few dead insertion methods. 2009-08-24 02:39:26 +00:00
LoopInfo.cpp remove uses of llvm/Support/Streams.h. 2009-08-23 07:33:14 +00:00
LoopPass.cpp convert LoopInfo.h and GraphWriter.h to use raw_ostream 2009-08-23 07:19:13 +00:00
LoopVR.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
Makefile
MemoryDependenceAnalysis.cpp Make TargetData optional in MemoryDependenceAnalysis. 2009-07-31 20:53:12 +00:00
PointerTracking.cpp remove a few dead insertion methods. 2009-08-24 02:39:26 +00:00
PostDominators.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
ProfileEstimatorPass.cpp Implemented comments from Daniel Dunbar. 2009-08-26 15:13:44 +00:00
ProfileInfo.cpp Move ProfileInfo::Edge's operator<< out of line. Among other benefits, 2009-08-26 15:56:38 +00:00
ProfileInfoLoader.cpp Read profile files as binary as proposed in 2009-08-25 12:53:27 +00:00
ProfileInfoLoaderPass.cpp remove uses of llvm/Support/Streams.h. 2009-08-23 07:33:14 +00:00
ScalarEvolution.cpp Don't assume that two identical instructions that read from memory 2009-08-25 17:56:57 +00:00
ScalarEvolutionAliasAnalysis.cpp Add some comments. 2009-08-29 23:36:57 +00:00
ScalarEvolutionExpander.cpp Various comment and whitespace cleanups. 2009-08-20 16:42:55 +00:00
SparsePropagation.cpp eliminate the "Value" printing methods that print to a std::ostream. 2009-08-23 04:37:46 +00:00
Trace.cpp eliminate the "Value" printing methods that print to a std::ostream. 2009-08-23 04:37:46 +00:00
ValueTracking.cpp Handle TargetData with const. 2009-08-27 17:51:25 +00:00