llvm-6502/tools
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
..
bugpoint Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
gold Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llc Delete some unnecessary flushes. 2009-08-25 17:48:17 +00:00
lli Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
llvm-ar remove the last *stream> #include from a public header. 2009-08-24 04:14:03 +00:00
llvm-as Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llvm-bcanalyzer Fix the build when using gcc-4.4 on linux. Header needed 2009-08-24 10:59:01 +00:00
llvm-config CMake: Automatic regeneration of the library dependencies file. 2009-08-14 16:59:41 +00:00
llvm-db Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
llvm-dis Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llvm-extract Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llvm-ld Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llvm-link Make LLVM command-line tools overwrite their output files without -f. 2009-08-25 15:34:52 +00:00
llvm-mc llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now. 2009-08-30 06:17:16 +00:00
llvm-nm Add plumbing for the `linker_private' linkage type. This type is meant for 2009-07-20 01:03:30 +00:00
llvm-prof Since all std::cout is gone, also remove iostream include. 2009-08-28 06:48:25 +00:00
llvm-ranlib To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now. 2009-07-15 22:16:10 +00:00
llvm-stub Silence MSVC warning. 2009-08-11 11:01:19 +00:00
llvmc Inverse logic to increase portability. 2009-08-27 12:02:34 +00:00
lto Delete some unnecessary flushes. 2009-08-25 17:48:17 +00:00
opt Fix some nasty callgraph dangling pointer problems in 2009-08-31 00:19:58 +00:00
CMakeLists.txt EXIT STAGE LEFT: gccas, gccld 2009-08-25 20:21:09 +00:00
Makefile EXIT STAGE LEFT: gccas, gccld 2009-08-25 20:21:09 +00:00